T1055.012 Microsoft Sentinel · KQL

Detect Process Hollowing in Microsoft Sentinel

Adversaries may inject malicious code into suspended and hollowed processes in order to evade process-based defenses. Process hollowing is commonly performed by creating a process in a suspended state then unmapping/hollowing its memory, which can then be replaced with malicious code. A victim process can be created with native Windows API calls such as CreateProcess (which includes a flag to suspend the processes primary thread). At this point the process can be unmapped using APIs calls such as ZwUnmapViewOfSection or NtUnmapViewOfSection before being written to, realigned to the injected code, and resumed via VirtualAllocEx, WriteProcessMemory, SetThreadContext, then ResumeThread respectively. This is a widely-used technique employed by Cobalt Strike, Emotet, QakBot, and many other threat actors.

MITRE ATT&CK

Tactic
Defense Evasion Privilege Escalation
Technique
T1055 Process Injection
Sub-technique
T1055.012 Process Hollowing
Canonical reference
https://attack.mitre.org/techniques/T1055/012/

KQL Detection Query

Microsoft Sentinel (KQL)
kusto
// Detect Process Hollowing via suspended process creation + memory unmapping
// Key indicator: legitimate process spawned by unusual parent with empty/mismatched command line
let HollowingTargets = dynamic(["svchost.exe", "explorer.exe", "rundll32.exe", "notepad.exe", "cmd.exe", "mspaint.exe", "calc.exe", "dllhost.exe", "werfault.exe", "iexplore.exe", "MSBuild.exe", "RegAsm.exe", "InstallUtil.exe", "vbc.exe", "certutil.exe"]);
let LegitParents = dynamic(["services.exe", "svchost.exe", "explorer.exe", "winlogon.exe", "System", "smss.exe", "csrss.exe", "wininit.exe"]);
DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ (HollowingTargets)
| where InitiatingProcessFileName !in~ (LegitParents)
| where ProcessCommandLine == "" or ProcessCommandLine == FileName or strlen(ProcessCommandLine) < 5
  or (FileName =~ "svchost.exe" and ProcessCommandLine !has "-k")
| extend HollowingIndicator = case(
    FileName =~ "svchost.exe" and InitiatingProcessFileName !=~ "services.exe", "Critical - svchost.exe not from services.exe",
    FileName in~ ("MSBuild.exe", "RegAsm.exe", "InstallUtil.exe") and strlen(ProcessCommandLine) < 5, "Critical - .NET LOLBin with empty cmdline",
    strlen(ProcessCommandLine) < 5, "High - Empty command line (CREATE_SUSPENDED indicator)",
    true, "Medium - Unusual parent-child relationship"
)
| project Timestamp, DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine,
         FileName, ProcessCommandLine, ProcessId, HollowingIndicator
| sort by Timestamp desc
critical severity high confidence

Detects Process Hollowing by identifying common hollowing target processes spawned by unusual parents with empty or minimal command lines. The CREATE_SUSPENDED flag used in hollowing results in the target process appearing with no arguments because the legitimate command line is never set. Key indicators: svchost.exe not from services.exe, MSBuild.exe/RegAsm.exe/InstallUtil.exe with no arguments, and any system process with an empty command line from an unusual parent.

Data Sources

Process: Process CreationProcess: Process AccessMicrosoft Defender for Endpoint

Required Tables

DeviceProcessEvents

False Positives & Tuning

  • Legitimate COM activation spawning dllhost.exe with minimal arguments
  • Windows Error Reporting spawning WerFault.exe
  • Application installers creating helper processes that appear with minimal command lines
  • Debugging scenarios where processes are started suspended intentionally
Download portable Sigma rule (.yml)

Other platforms for T1055.012


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Process Hollowing Detection - Anomalous svchost.exe Parent

    Expected signal: Sysmon Event ID 1: svchost.exe with ParentImage=powershell.exe and empty/minimal CommandLine. This is a CRITICAL indicator — svchost.exe should only be spawned by services.exe with -k arguments.

  2. Test 2MSBuild.exe Hollowing Target Simulation

    Expected signal: Sysmon Event ID 1: MSBuild.exe spawned by PowerShell with empty CommandLine. MSBuild.exe normally requires a project file as argument — empty execution is anomalous.

  3. Test 3Hollowed notepad.exe with Network Connection Check

    Expected signal: Sysmon Event ID 1: notepad.exe spawned by cmd.exe. Sysmon Event ID 3: If notepad.exe makes network connections (it shouldn't normally). Security Event ID 4688 with command line auditing.

Unlock Pro Content

Get the full detection package for T1055.012 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections