0x The Malware Lab
Injector
Injector.WerFlt.Win32

C / Win32 · WerFlt

A C/GCC-compiled stage-0 loader that performs classic CreateRemoteThread process injection into WerFault.exe. It unpacks a helper binary (werflt.exe), injects shellcode into a legitimate Windows process, and spawns a reverse shell to a remote host on TCP 8443.

Identification

Original name
Malware.stage0.exe.malz
Aliases
Malware.stage0.exe.malz
File type
PE32 executable (GUI) Intel 80386, for MS Windows
SHA256
fca62097b364b2f0338c5e4c5bac86134cedffa4f8ddf27ee9901734128952e3
MD5
6d8895c63a77ebe5e49b656bdefdb822
VirusTotal
No result (not seen by VirusTotal)

Capabilities

Indicators of Compromise

Network indicators

TypeValueNote
portTCP 8443Reverse shell callback port

Host indicators

TypeValueNote
fileC:\Users\Public\werflt.exeHelper binary unpacked/used by the loader (typosquat of WerFault)
fileC:\Windows\SysWOW64\WerFault.exeLegitimate process abused as the injection target
path\\.\pipe\stdin and \\.\pipe\stdoutNamed pipes used for I/O staging

MITRE ATT&CK

TechniqueIDNote
Process Injection: Portable Executable InjectionT1055.002Injects shellcode into WerFault via CreateRemoteThread.
Process InjectionT1055OpenProcess / VirtualAllocEx / WriteProcessMemory / CreateRemoteThread chain.
Masquerading: Match Legitimate Name or LocationT1036.005werflt.exe mimics the legitimate WerFault.exe.
Non-Standard PortT1571Reverse shell on TCP 8443.

Execution flow

1. Unpack / drop the helper binary werflt.exe (from the main binary). 2. Launch the legitimate WerFault.exe and obtain a handle to it. 3. Allocate memory in WerFault with VirtualAllocEx. 4. Write shellcode into it with WriteProcessMemory. 5. Run the shellcode with CreateRemoteThread. 6. The shellcode opens a reverse shell to TCP 8443, running inside the trusted WerFault process.

Static analysis

Interesting strings / FLOSS output reveal the injection targets and pipe names in the clear:


@\\.\pipe\stdin
@\\.\pipe\stdout
@C:\Users\Public\werflt.exe
@C:\Windows\SysWOW64\WerFault.exe
GCC: (GNU) 9.2-win32 20191008

The IAT is a textbook injection toolkit: CreateNamedPipeW, CreateFileW, DuplicateHandle, CreateProcessW, SuspendThread, WriteProcessMemory, OpenProcess, VirtualAllocEx, CreateRemoteThread. The GCC: marker shows it was written in C and compiled with GCC/MinGW.

Dynamic analysis

then also runs werflt.exe, most likely unpacked from the main binary, and creates a temporary TCP connection to remote port 8443.

This is the classic CreateRemoteThread injection pattern: it obtains the handle of WerFault, allocates memory with VirtualAllocEx, writes the shellcode with WriteProcessMemory, then injects and runs it with CreateRemoteThread, spawning the reverse shell. The shellcode lives in WerFault's memory with RWX permissions, which is very unusual and a strong detection signal.

Screenshots

Strings — injection targets and pipe names
Strings — injection targets and pipe names
Injection-related imports (IAT)
Injection-related imports (IAT)
Dynamic behaviour — WerFault + werflt.exe
Dynamic behaviour — WerFault + werflt.exe
Reverse shell / RWX memory in WerFault
Reverse shell / RWX memory in WerFault
← All samples