Detection of Remote Thread Process Injection via Sysmon
This brief describes the detection of remote thread creation (Sysmon Event ID 8) in sensitive Windows processes used by malware such as Qakbot and Warzone RAT to perform process injection.
Remote thread injection is a common technique utilized by multiple malware families, including Qakbot, Warzone RAT, and Vidar Stealer, to maintain persistence and execute malicious code within the address space of a legitimate process. By leveraging the CreateRemoteThread API or its equivalents, attackers can move from a low-privilege loader into a high-privilege or commonly trusted system process. This activity often serves as a precursor to credential dumping, privilege escalation, or full system compromise. Defenders should prioritize monitoring for remote thread creation events targeting processes that are frequently abused for living-off-the-land techniques, such as explorer.exe, powershell.exe, and wermgr.exe.
Attack Chain
- Initial infection (e.g., via malicious email or drive-by download) results in the execution of a loader or dropper on the target host.
- The primary malware process identifies a target system process (e.g., notepad.exe or explorer.exe) for injection.
- The malware performs process discovery to locate the Process ID (PID) of the desired target.
- The malware calls OpenProcess with appropriate access rights to obtain a handle to the target process.
- The malware allocates memory within the target process using VirtualAllocEx.
- The malware writes malicious shellcode or a DLL path into the allocated memory space using WriteProcessMemory.
- The malware executes the injected code within the target process by triggering CreateRemoteThread (Sysmon Event ID 8).
- The malicious code executes with the context and privileges of the target process to evade detection or achieve persistence.
Impact
Successful process injection allows attackers to bypass endpoint security controls, maintain stealthy persistence, and execute arbitrary code with the elevated privileges of the target process. This technique has been documented in major campaigns attributed to actors using Qakbot, Warzone RAT, and other commodity stealers, resulting in widespread data exfiltration and ransomware deployment.
Recommendation
- Enable Sysmon logging on all Windows endpoints and ensure Event ID 8 (CreateRemoteThread) is active.
- Deploy the provided Sigma rule to identify remote thread creation targeting high-value processes.
- Investigate instances where processes like wermgr.exe or explorer.exe are spawned by unknown or unsigned parent processes.
- Use the provided drilldown searches to correlate detected remote thread events with historical risk alerts for the affected host.
Immediate actions
Enable Sysmon Event ID 8 logging across enterprise fleet
Threat Hunt
Search for remote thread events targeting critical system processes in past 30 days
Data: Sysmon Event ID 8
Detection coverage 1
Detect Windows Remote Thread Process Injection
mediumDetects the creation of remote threads in common target processes, a technique used by malware like Qakbot for process injection.
Detection queries are available on the platform. Get full rules →