Back to Blog
Malware Analysis May 13, 2026 64 views

Firefox Trojan Analysis, DLL Hijacking, Keylogging & Stealth Techniques

A multi-stage Windows trojan masquerading as a Firefox module injects keylogging into MsBuild.exe, establishes startup persistence, and exfiltrates data via an encrypted C2 channel, full technical breakdown inside.

By Osama Ellahi, Security Researcher, Cytomate

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)
- File hash: 75BEF67BB34E8856088FC708F916D1DB39DA3682D28DBF0C491208F9E0E1B96E
  • sarape.txt, encrypted payload file (639 KB)
- Hash: B76FA44855B0BDB110C5B1C22B1594AB7FF6AE1872A45BEE6C336A2919D513EC

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
Multi-Stage Attack Chain

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

More from the Blog

Threat Intelligence Nov 29, 2026

The Build-Pipeline Backdoor: Inside the NullReceiver Supply-Chain Campaign

Read More
Deception Nov 29, 2026

Lying to the Machines: The Secret Weapon Against AI Attacks

Read More
Agentic Security Nov 24, 2026

Your AI Coding Agents Need an EDR Too: Introducing cADRe

Read More