This sophisticated multi-stage Windows trojan masquerades as a Firefox module while targeting system processes. The malware modifies cmd.exe and MsBuild.exe, injecting keylogging functionality into the latter to capture user input. It establishes persistence through startup folder manipulation and evades detection via legitimate process spaces and dynamic injection techniques.
Host Indicators
- mozglue.dll, contains encrypted payload (sarape.txt)
- sarape.txt, encrypted payload file (639 KB)
Execution Flow
When "1 DOCUMENTO JURIDICO.exe" executes, it loads tampered DLLs rather than launching Firefox. The corrupted mozglue.dll locates and decrypts sarape.txt, then copies files to %AppData%/Roaming/OMHost.
Injection Technique
The malware uses GlobalAlloc to reserve shared memory space and proceeds through:
- Memory Allocation, reserves space within cmd.exe
- Code Writing, uses NtWriteVirtualMemory to insert payload
- Execution Permission, calls NtProtectVirtualMemory to make code executable
- Thread Manipulation, NtQueryInformationThread and ZwSetInformationThread prepare the execution environment
- Thread Resumption, activates malicious code via NtResumeThread
Stage 1 (cmd.exe): Establishes persistence by adding infected Firefox paths to startup folders and prepares secondary injection.
Stage 2 (MsBuild.exe): Injects a keylogger that records keystrokes to Log.tmp in the Temp directory, then exfiltrates data to a C2 server at Dinamic-Tigo-191-92-96-62.tigo.com.co:5757.
Evasion Mechanisms
Detection difficulty stems from: indirect syscalls, dynamic shellcodes, multi-staging architecture, anti-analysis techniques, and trojan embedding within legitimate Firefox binaries, making traditional signature-based detection highly unreliable.
Originally published on cytomate.net
