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
Capabilities
- Written in C, compiled with GCC (MinGW)
- Classic remote-thread code injection (OpenProcess -> VirtualAllocEx -> WriteProcessMemory -> CreateRemoteThread)
- Injects shellcode into a legitimate Windows process (WerFault.exe)
- Drops/uses a typosquatted helper binary (werflt.exe vs WerFault.exe)
- Stores RWX shellcode in the host process' memory (highly unusual)
- Spawns a reverse shell on TCP 8443
- Uses named pipes for stdin/stdout staging
Indicators of Compromise
Network indicators
| Type | Value | Note |
|---|---|---|
| port | TCP 8443 | Reverse shell callback port |
Host indicators
| Type | Value | Note |
|---|---|---|
| file | C:\Users\Public\werflt.exe | Helper binary unpacked/used by the loader (typosquat of WerFault) |
| file | C:\Windows\SysWOW64\WerFault.exe | Legitimate process abused as the injection target |
| path | \\.\pipe\stdin and \\.\pipe\stdout | Named pipes used for I/O staging |
MITRE ATT&CK
| Technique | ID | Note |
|---|---|---|
| Process Injection: Portable Executable Injection | T1055.002 | Injects shellcode into WerFault via CreateRemoteThread. |
| Process Injection | T1055 | OpenProcess / VirtualAllocEx / WriteProcessMemory / CreateRemoteThread chain. |
| Masquerading: Match Legitimate Name or Location | T1036.005 | werflt.exe mimics the legitimate WerFault.exe. |
| Non-Standard Port | T1571 | Reverse 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
- Without internet: nothing visibly happens.
- With INetSim: it runs the legitimate
WerFault.exe(from SysWOW64),
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



