#Why this matters
Real intrusions rarely present themselves as a single self-explanatory alert. A Tier 2 SOC analyst usually starts from one medium-confidence signal, such as an encoded PowerShell process or an outbound HTTP request to an unfamiliar domain. Within minutes, the analyst must determine whether that alert is harmless administrative noise or one link in an active compromise.
Handling an incident end to end requires moving fluidly across telemetry silos. You must trace an intrusion backward to initial phishing delivery, trace forward to payload staging and persistence, sweep the wider fleet with Sigma and YARA, and contain every affected asset in the right order.
#Anatomy of a phishing-to-persistence chain
Most workplace compromises follow a recognizable sequence of MITRE ATT&CK stages, each leaving distinct telemetry across different sensors:
Because no single log source captures the whole story, analysts map each stage to its primary telemetry and pivot fields:
| Intrusion stage | ATT&CK technique | Primary telemetry | Key pivot fields |
|---|---|---|---|
| Initial access | T1566.001 Spearphishing Attachment |
Email gateway logs | sender, recipient, attachment_sha256 |
| Execution | T1059.001 PowerShell |
Sysmon Event ID 1 / Win 4688 | Computer, User, ParentProcessGuid, CommandLine |
| Payload staging | T1105 Ingress Tool Transfer |
Sysmon Event ID 3 & 11, Proxy/DNS | DestinationIp, QueryName, TargetFilename, Hashes |
| Persistence | T1547.001 Run Key / T1053.005 Task |
Sysmon Event ID 13 / Win 4698 | TargetObject, Details, TaskName |
#Pivoting across multi-source logs
The core rule of timeline reconstruction is normalize to UTC first. Workstations, email gateways, and proxies may log in different local time zones; comparing unnormalized timestamps leads to broken causality.
Once timestamps are aligned in UTC, pivot backward from the trigger alert to establish root cause, then pivot forward to measure full impact:
$ jq -r 'select(.Computer=="wks-014.lab.local") | [.UtcTime, .Source, .EventID, .Summary] | @tsv' soc-case07.jsonl | sort
2026-11-12T07:51:10Z MailGW MSG_DELIVER to=d.karimov@example.test subj="Invoice_4091" sha256=9f86d081...
2026-11-12T07:54:03Z Sysmon 1 Parent=winword.exe Image=powershell.exe Cmd="-NoP -W Hidden -Enc JABz..."
2026-11-12T07:54:05Z DNS QUERY qname=cdn-sync.example.test src=10.10.10.14
2026-11-12T07:54:06Z Sysmon 11 Image=powershell.exe Target=C:\Users\d.karimov\AppData\Local\Temp\sync_agent.exe
2026-11-12T07:54:08Z Sysmon 13 Image=sync_agent.exe Target=HKCU\Software\Microsoft\Windows\CurrentVersion\Run\SyncSvc Details="C:\Users\d.karimov\AppData\Local\Temp\sync_agent.exe"Every line connects cleanly to the next. Within three minutes of email delivery (07:51:10Z), winword.exe spawned a hidden PowerShell command, queried cdn-sync.example.test, wrote sync_agent.exe into AppData\Local\Temp, and registered an HKCU\...\Run persistence entry.
#Applying Sigma and YARA during live scoping
To sweep the rest of the environment rapidly, analysts pair behavioural Sigma rules in the SIEM with artifact-level YARA rules on collected or quarantined binaries.
A portable Sigma rule detects the Office-to-PowerShell execution pattern across SIEM backends without relying on a single file hash:
title: Suspicious PowerShell Spawned by Microsoft Word
id: 7b4e1c2a-91d4-4a62-8c1e-3f0a55b12d01
status: experimental
description: Detects winword.exe spawning powershell.exe during phishing execution
logsource:
category: process_creation
product: windows
detection:
selection:
ParentImage|endswith: '\winword.exe'
Image|endswith: '\powershell.exe'
condition: selection
level: highMeanwhile, when EDR or forensic collection retrieves suspicious binaries from Temp or AppData, a targeted YARA signature confirms whether samples share the same loader family and reveals sibling files on disk:
rule Lab_SyncAgent_Persistence_Marker {
meta:
description = "Detects lab training dropper referencing cdn-sync.example.test and Run key"
author = "CyberSamSU SOC"
strings:
$mz = { 4D 5A }
$dom = "cdn-sync.example.test" ascii wide nocase
$run = "Software\\Microsoft\\Windows\\CurrentVersion\\Run" ascii wide
condition:
$mz at 0 and $dom and $run
}Running YARA against the lab quarantine folder verifies which collected samples match the campaign:
$ yara -r sync_agent.yar /lab/quarantine/case07/
Lab_SyncAgent_Persistence_Marker /lab/quarantine/case07/wks-014_sync_agent.exe
Lab_SyncAgent_Persistence_Marker /lab/quarantine/case07/wks-029_updater_tmp.exeNotice what the YARA scan caught: a second host (wks-029) held the same payload under a different filename (updater_tmp.exe). Hash-only searching would have missed it if the binary had been recompiled or padded.
#Containment, eradication, and common mistakes
Order of operations matters during live incident response:
- Scope before tipping off the attacker: Check email recipients, DNS queries, and sibling hosts quietly before deleting messages or blocking domains that might warn an active operator.
- Isolate and preserve: Network-isolate compromised endpoints via EDR so the host stays powered on for memory or disk acquisition before wiping processes.
- Revoke identities: Reset passwords and revoke active OAuth or SSO refresh tokens for compromised accounts.
- Eradicate completely: Remove both the dropped binary and its persistence trigger (
Runkey, scheduled task, or service), then verify across a reboot.
Common mistakes that prolong incidents include:
- Comparing mixed time zones: Building a timeline from local workstation time alongside UTC firewall logs, reversing cause and effect.
- Deleting the file without removing persistence: Removing
sync_agent.exewhile leaving a scheduled task or downloader script intact allows automatic re-infection. - Reimaging before scoping: Wiping the first noisy host immediately destroys volatile memory and leaves undetected sibling infections running elsewhere on the subnet.
- Relying solely on hash blocks: Blocking one SHA-256 while ignoring the underlying phishing sender, C2 domain, and behavioural Sigma pattern.
#Summary
- End-to-end SOC investigations correlate email, process, network, and registry telemetry on a unified UTC timeline.
- Analysts pivot backward from an alert to find initial access and forward to trace payload staging, C2 traffic, and persistence.
- Combining behavioural Sigma queries with YARA artifact scans ensures scoping catches renamed or modified variants across the fleet.
- Effective response follows a strict order: scope quietly, isolate and preserve evidence, revoke credentials, and eradicate both payloads and persistence mechanisms.