NailaoLoader employs sophisticated techniques to obscure its execution flow, leveraging Windows Management Instrumentation (WMI) for lateral movement and file transfer.
Threat actors use WMI to deploy three files—usysdiag.exe, sensapi.dll, and usysdiag.exe.dat—to targeted machines. The process begins with the execution of usysdiag.exe, a legitimate signed executable by Huorong Internet Security.
usysdiag.exe calls LoadLibraryA() to load sensapi.dll. However, a malicious version of sensapi.dll (NailaoLoader) is side-loaded from the same directory. Once loaded, the malicious DLL’s DllMain() function is executed..text section of usysdiag.exe. If the bytes match expected values, it proceeds; otherwise, it exits without executing malicious code. This ensures that only the intended executable (usysdiag.exe) can trigger the loader..text section of usysdiag.exe. It retrieves the address of VirtualProtect() from kernel32.dll and changes memory protection to PAGE_READWRITE. The patched instructions redirect execution to NailaoLoader’s decryption function.usysdiag.exe.dat) using a XOR key. The decrypted payload is mapped into memory, and control is transferred to its entry point.PAGE_EXECUTE_READ). This final step helps avoid detection by security tools.The critical innovation lies in NailaoLoader’s ability to hide its execution flow. By patching instructions in a legitimate process (usysdiag.exe) rather than calling malicious functions directly from its own DLL, it avoids raising suspicion.
This technique ensures that security tools monitoring DLL behavior are less likely to detect malicious activity.
NailaoLoader exemplifies advanced malware techniques like DLL side-loading, memory patching, and execution flow obfuscation. These methods make it challenging for defenders to trace or block its activities effectively.
General Working of a Web Application Firewall (WAF) A Web Application Firewall (WAF) acts as…
How to Send POST Requests Using curl in Linux If you work with APIs, servers,…
If you are a Linux user, you have probably seen commands like chmod 777 while…
Vim and Vi are among the most powerful text editors in the Linux world. They…
Working with compressed files is a common task for any Linux user. Whether you are…
In the digital era, an email address can reveal much more than just a contact…