T1134.004

Parent PID Spoofing

Adversaries may spoof the parent process identifier (PPID) of a new process to evade process-monitoring defenses or to elevate privileges. By calling CreateProcess with a PROC_THREAD_ATTRIBUTE_PARENT_PROCESS entry in the process attribute list, an attacker can assign any running process as the apparent parent of the newly spawned child. Security tools that rely on parent-child process lineage for detection see only the spoofed parent, masking the true origin. This technique is also exploited for privilege escalation: by opening a handle to a SYSTEM-level process such as lsass.exe and using it as the spoofed parent, the child process inherits the SYSTEM access token. Used in the wild by Cobalt Strike, KONNI, PipeMon, and DarkGate.

Microsoft Sentinel / Defender
kusto
// T1134.004 — Parent PID Spoofing
// Branch 1: High-privilege system processes spoofed as parents — these never legitimately spawn interactive tools or LOLBins
let HighValueSpoofTargets = dynamic(["lsass.exe", "wininit.exe", "smss.exe", "csrss.exe", "winlogon.exe", "services.exe"]);
let SuspiciousChildren = dynamic(["cmd.exe", "powershell.exe", "pwsh.exe", "rundll32.exe", "regsvr32.exe", "mshta.exe", "wscript.exe", "cscript.exe", "msbuild.exe", "certutil.exe", "bitsadmin.exe", "cmstp.exe", "installutil.exe"]);
DeviceProcessEvents
| where Timestamp > ago(24h)
| where InitiatingProcessFileName has_any (HighValueSpoofTargets)
| where FileName has_any (SuspiciousChildren)
| extend SpoofBranch = "HighPrivilegeParentSpawn"
| union (
    // Branch 2: Integrity level mismatch — SYSTEM child spawned from Medium/Low/High integrity parent
    // Legitimate SYSTEM processes spawn SYSTEM children; a mismatch indicates token inheritance via spoofed parent handle
    DeviceProcessEvents
    | where Timestamp > ago(24h)
    | where ProcessIntegrityLevel == "System"
    | where InitiatingProcessIntegrityLevel in~ ("Medium", "Low", "High")
    | where FileName has_any (SuspiciousChildren)
    | extend SpoofBranch = "IntegrityMismatchElevation"
)
| union (
    // Branch 3: explorer.exe as parent of a SYSTEM-integrity process — impossible in normal Windows operation
    DeviceProcessEvents
    | where Timestamp > ago(24h)
    | where InitiatingProcessFileName =~ "explorer.exe"
    | where ProcessIntegrityLevel == "System"
    | extend SpoofBranch = "ExplorerSystemChild"
)
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, ProcessId,
         InitiatingProcessFileName, InitiatingProcessCommandLine, InitiatingProcessId,
         InitiatingProcessParentFileName, ProcessIntegrityLevel, InitiatingProcessIntegrityLevel,
         SpoofBranch
| sort by Timestamp desc
high severity high confidence

Data Sources

Process: Process Creation Microsoft Defender for Endpoint Process: OS API Execution

Required Tables

DeviceProcessEvents

False Positives

  • UAC elevation mediated by consent.exe may briefly show svchost.exe as a parent during token reassignment in certain Windows versions before the handoff completes
  • Enterprise EDR or AV agents that use indirect process spawning for self-protection modules may appear with unexpected parent process assignments in telemetry
  • Windows Remote Management (WinRM) and PowerShell remoting sessions may produce unusual parent-child relationships when executing cmdlets via the wsmprovhost.exe service host
  • SCCM/ConfigMgr client agent (CcmExec.exe) spawning PowerShell or cmd.exe for software deployment tasks may produce apparent process tree anomalies from service context

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections