Sunday, November 24, 2024
HomeCyber AttackWinnti Hackers' New UNAPIMON Tool Hijacks DLL And Unhook API Calls

Winnti Hackers’ New UNAPIMON Tool Hijacks DLL And Unhook API Calls

Published on

Hackers commonly employ dynamic-link library (DLL) hijacking and unhooking of APIs to damage security measures and authorize harmful activities on breached systems.

In this regard, DLL hijacking permits them to load malicious code by utilizing flaws in the way applications load external libraries.

On the other hand, API unhooking helps bypass some monitoring mechanisms by modifying processes’ interaction with system APIs.

- Advertisement - SIEM as a Service

APT41 (aka Winnti) ‘s most recent attack on an organization was just traced back to Earth Freybug, a cyber threat group that has been active since 2012 and has been actively targeting firms in different sectors and countries.

Document
Run Free ThreatScan on Your Mailbox

AI-Powered Protection for Business Email Security

Trustifi’s Advanced threat protection prevents the widest spectrum of sophisticated attacks before they reach a user’s mailbox. Try Trustifi Free Threat Scan with Sophisticated AI-Powered Email Protection .

Earth Freybug uses two mechanisms, “DLL hijacking and API unhooking,” to evade child process monitoring. It utilizes a new unknown malware called UNAPIMON. 

Winnti Hackers’ New UNAPIMON Tool

This case was about exploiting genuine Windows utilities (schtasks.exe, vmtoolsd.exe) to implant malware.

It began by injecting codes into vmtoolsd.exe to create a scheduled task from the remote that started a batch script pre-staged.

This script gathered wide details about the system and created another scheduled task that ran a second script.

Earth Freybug attack chain (Source – Trend Micro)

The second script used DLL side-loading in order to load malicious DLLs into SessionEnv service and a new cmd.exe process which turned the machine into a backdoor for the attacker.

Experts observed using a strange malware dubbed UNAPIMON, a straightforward C++ DLL that hooks the CreateProcessW API. 

Its hooking mechanism launches new suspended processes, loads a local copy of each loaded DLL, creates an in-memory copy in the suspended process, and verifies that the two copies match before resuming the new process. 

This obfuscates monitoring of loaded DLLs in child processes as a defense evasion technique.

UNAPIMON verifies the in-memory copy matches the local copy by comparing headers and exported function details for each loaded DLL in the suspended child process. 

It analyzes the first few bytes of code to check if any exported functions were modified (hooked). Any hooked functions are then “unpatched” by overwriting the modified code with the original bytes from the local DLL copy. 

This removes any hooks/patches applied to the child process’s loaded DLLs before allowing execution, evading monitoring.

When unloaded, UNAPIMON removes its CreateProcessW hook.

UNAPIMON aims to unhook monitored API functions in child processes, evading detection from sandboxes and other API hooking-based monitoring. 

Its originality lies in creatively using existing tools like Microsoft Detours—instead of the malware doing the hooking, it un-hooks any hooked functions before execution. 

This simple yet effective technique showcases the malware author’s coding skills in repurposing ordinary libraries maliciously.

By removing API hooks, UNAPIMON allows unmonitored execution of malicious child processes.

Limiting administrative privileges follows the principle of least privilege, which limits attack possibilities.

Earth Freybug evolves its strategies over time by applying simple yet effective methods to old patterns, making detection difficult.

Is Your Network Under Attack? - Read CISO’s Guide to Avoiding the Next Breach - Download Free Guide
Tushar Subhra
Tushar Subhra
Tushar is a Cyber security content editor with a passion for creating captivating and informative content. With years of experience under his belt in Cyber Security, he is covering Cyber Security News, technology and other news.

Latest articles

Nearest Neighbor Attacks: Russian APT Hack The Target By Exploiting Nearby Wi-Fi Networks

Recent research has revealed that a Russian advanced persistent threat (APT) group, tracked as...

240+ Domains Used By PhaaS Platform ONNX Seized by Microsoft

Microsoft's Digital Crimes Unit (DCU) has disrupted a significant phishing-as-a-service (PhaaS) operation run by...

Russian TAG-110 Hacked 60+ Users With HTML Loaded & Python Backdoor

The Russian threat group TAG-110, linked to BlueDelta (APT28), is actively targeting organizations in...

Earth Kasha Upgraded Their Arsenal With New Tactics To Attack Organizations

Earth Kasha, a threat actor linked to APT10, has expanded its targeting scope to...

Free Webinar

Protect Websites & APIs from Malware Attack

Malware targeting customer-facing websites and API applications poses significant risks, including compliance violations, defacements, and even blacklisting.

Join us for an insightful webinar featuring Vivek Gopalan, VP of Products at Indusface, as he shares effective strategies for safeguarding websites and APIs against malware.

Discussion points

Scan DOM, internal links, and JavaScript libraries for hidden malware.
Detect website defacements in real time.
Protect your brand by monitoring for potential blacklisting.
Prevent malware from infiltrating your server and cloud infrastructure.

More like this

Nearest Neighbor Attacks: Russian APT Hack The Target By Exploiting Nearby Wi-Fi Networks

Recent research has revealed that a Russian advanced persistent threat (APT) group, tracked as...

Russian TAG-110 Hacked 60+ Users With HTML Loaded & Python Backdoor

The Russian threat group TAG-110, linked to BlueDelta (APT28), is actively targeting organizations in...

Earth Kasha Upgraded Their Arsenal With New Tactics To Attack Organizations

Earth Kasha, a threat actor linked to APT10, has expanded its targeting scope to...