Saturday, December 28, 2024
HomeMalwareBlackTech Hackers Group Using API Hooking Technique in Malware to Evade Detection...

BlackTech Hackers Group Using API Hooking Technique in Malware to Evade Detection & Attack Government Networks

Published on

SIEM as a Service

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.

- Advertisement - SIEM as a Service

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.

Balaji
Balaji
BALAJI is an Ex-Security Researcher (Threat Research Labs) at Comodo Cybersecurity. Editor-in-Chief & Co-Founder - Cyber Security News & GBHackers On Security.

Latest articles

Lumma Stealer Attacking Users To Steal Login Credentials From Browsers

Researchers observed Lumma Stealer activity across multiple online samples, including PowerShell scripts and a...

New ‘OtterCookie’ Malware Attacking Software Developers Via Fake Job Offers

Palo Alto Networks reported the Contagious Interview campaign in November 2023, a financially motivated...

NjRat 2.3D Pro Edition Shared on GitHub: A Growing Cybersecurity Concern

The recent discovery of the NjRat 2.3D Professional Edition on GitHub has raised alarms...

Palo Alto Networks Vulnerability Puts Firewalls at Risk of DoS Attacks

A critical vulnerability, CVE-2024-3393, has been identified in the DNS Security feature of Palo...

API Security Webinar

72 Hours to Audit-Ready API Security

APIs present a unique challenge in this landscape, as risk assessment and mitigation are often hindered by incomplete API inventories and insufficient documentation.

Join Vivek Gopalan, VP of Products at Indusface, in this insightful webinar as he unveils a practical framework for discovering, assessing, and addressing open API vulnerabilities within just 72 hours.

Discussion points

API Discovery: Techniques to identify and map your public APIs comprehensively.
Vulnerability Scanning: Best practices for API vulnerability analysis and penetration testing.
Clean Reporting: Steps to generate a clean, audit-ready vulnerability report within 72 hours.

More like this

Lumma Stealer Attacking Users To Steal Login Credentials From Browsers

Researchers observed Lumma Stealer activity across multiple online samples, including PowerShell scripts and a...

New ‘OtterCookie’ Malware Attacking Software Developers Via Fake Job Offers

Palo Alto Networks reported the Contagious Interview campaign in November 2023, a financially motivated...

Skuld Malware Using Weaponized Windows Utilities Packages To Deliver Malware

Researchers discovered a malware campaign targeting the npm ecosystem, distributing the Skuld info stealer...