Investigating Windows Endpoints
Windows records execution, persistence, and access in dozens of artifacts the
attacker rarely cleans completely. The event logs are only the surface -- the
registry, prefetch, amcache, and the file-system journals corroborate or
contradict them. The investigation is cross-referencing independent artifacts
into one timeline that no single cleared log can defeat.
When to Use
- Triaging a compromised or suspicious Windows host, live or from an image
- Working through a KAPE, Velociraptor, or EDR triage collection
- Reconstructing what executed on a Windows machine and in what order
- Parsing EVTX / Sysmon / PowerShell logs to reconstruct attacker activity
- Hunting persistence and lateral-movement traces across the endpoint
- Detecting timestomping, log clears, and other on-host anti-forensics
When NOT to Use
- The host is Linux -- use
analyzing-linux-persistence
- You need the overall IR process and multi-host coordination -- use
responding-to-incidents; come here when one Windows host is the focus
- You have a RAM capture to work -- use
analyzing-memory-images; come
here for the on-disk artifacts
- The compromise is in cloud identity, not on the endpoint -- use
investigating-m365-entra
- Proactive fleet-wide hunting with no specific host -- use
hunting-threats
- You are the attacker on the host, not the responder -- use
escalating-windows-privileges
Triage Collection First
Do not analyze the live disk in place. Collect a triage set, hash it, and work
on the copy. For most incidents a targeted triage collection answers the
question faster than a full image; image only the hosts that matter.
Dead vs. live acquisition. A powered-off host or a mounted disk image is a
dead acquisition -- consistent, but you lose running processes, network state,
and unflushed logs. A live host lets you capture volatile state (memory,
netstat -anob, Get-NetTCPConnection, tasklist /svc) but every action
mutates the disk; record what you touch. Capture memory first if the host is
live and "are they still here" is open, then hand it to analyzing-memory-images.
:: KAPE targeted triage -- the fastest way to a defensible artifact set
kape.exe --tsource C: --target !SANS_Triage --tdest E:\out\host01 --vhdx host01
:: Broader coverage: registry hives, event logs, $MFT/$J, browser, prefetch
kape.exe --tsource C: --target KapeTriage,RegistryHives,EventLogs,FileSystem ^
--tdest E:\out\host01
:: Then run the parsers (Modules) over what you collected
kape.exe --msource E:\out\host01 --mdest E:\out\host01\parsed ^
--module !EZParser
Velociraptor (Windows.KapeFiles.Targets) collects the same set at fleet scale
over an agent. Whatever the tool, verify hashes before and after every copy.
Key artifact directories to make sure your collection contains:
C:\Windows\System32\winevt\Logs\ Event logs (.evtx)
C:\Windows\System32\config\ Registry hives: SYSTEM, SOFTWARE, SAM, SECURITY
C:\Users\<u>\NTUSER.DAT Per-user registry hive
C:\Users\<u>\AppData\Local\Microsoft\Windows\UsrClass.dat Shellbags, COM
C:\Windows\Prefetch\ *.pf execution evidence
C:\Windows\appcompat\Programs\Amcache.hve Amcache
C:\Windows\System32\sru\SRUDB.dat SRUM
C:\Windows\System32\Tasks\ Scheduled task XML
C:\$MFT C:\$Extend\$UsnJrnl C:\$LogFile Filesystem journals
C:\$Recycle.Bin\ Deleted-file $I records
Evidence of Execution
Multiple independent artifacts record that a binary ran. Cross-reference them --
agreement raises confidence, disagreement is itself a finding.
:: Prefetch -- run count, first/last run, files/dirs the binary touched.
:: Absent on most Servers; disabled on SSD-only systems -- note that, don't assume.
PECmd.exe -d C:\Windows\Prefetch --csv E:\out\parsed -q
:: Amcache -- SHA-1 of executed/present binaries, compile times, driver load
AmcacheParser.exe -f C:\Windows\appcompat\Programs\Amcache.hve ^
--csv E:\out\parsed -i
:: Shimcache / AppCompatCache (SYSTEM hive) -- path + last-modified; presence
:: means the file was seen, NOT necessarily executed. Order is roughly LRU.
AppCompatCacheParser.exe -f C:\Windows\System32\config\SYSTEM --csv E:\out\parsed
:: SRUM -- per-process bytes sent/received and CPU over 30-60 days.
:: Ties an executable to network volume even when netflow is gone.
SrumECmd.exe -f C:\Windows\System32\sru\SRUDB.dat ^
-r C:\Windows\System32\config\SOFTWARE --csv E:\out\parsed
From the user (NTUSER.DAT / UsrClass.dat) hives, parse GUI-execution and
file-access evidence with RECmd:
:: UserAssist (GUI program launches, run count, focus time),
:: BAM/DAM (background/desktop activity moderator: last-run per exe per SID),
:: RecentDocs, and RunMRU in one pass with the bundled batch file
RECmd.exe -d C:\Users --bn BatchExamples\UserActivity.reb --csv E:\out\parsed
- Jump Lists (
...\Recent\AutomaticDestinations\*.automaticDestinations-ms)
and LNK files (...\Recent\*.lnk) record opened files/apps with target
path, volume serial, and MAC times -- parse with JLECmd and LECmd.
- RecentDocs and shellbags (below) show what folders and files were opened.
The Event-Log Workhorses
Parse EVTX first with a triage engine (Chainsaw / Hayabusa, below), then pivot
into specific channels. The IDs that carry the most weight:
Security (Security.evtx):
- 4624 logon success -- decode Logon Type: 2 interactive, 3
network (SMB, shares, PtH), 10 RemoteInteractive (RDP), 9
NewCredentials (runas /netonly, often Overpass-the-Hash). Pivot on
LogonId to correlate a session's activity.
- 4625 logon failure -- password spraying and brute force by source IP.
- 4672 special privileges assigned -- admin-equivalent logon; pair with
4624 to flag privileged sessions.
- 4648 explicit-credential logon -- runas and lateral movement.
- 4688 process creation -- with command-line auditing enabled, the full
command line and parent process. The single most valuable Security event.
- 4720/4722/4738 account created/enabled/changed; 4728/4732/4756
member added to a global/local/universal privileged group (Domain Admins,
local Administrators) -- attacker account and group manipulation.
- 4698/4699/4702 scheduled task created/deleted/updated.
- 7045 (System log) new service installed; 7036 service state change --
the PsExec and lateral-tooling signature.
- 1102 the audit log was cleared -- an anti-forensic act and itself an
indicator; correlate the gap it leaves.
Sysmon (Microsoft-Windows-Sysmon/Operational), if deployed, is the
richest source:
- 1 process create (with hashes, command line, parent) -- 3 network
connection -- 7 image/DLL load (unsigned DLLs, sideloading) -- 8
CreateRemoteThread (injection) -- 10 process access (LSASS handle =
credential dumping) -- 11 file create -- 12/13/14 registry
create/set/rename (autoruns) -- 15 file-stream create (Zone.Identifier,
ADS) -- 22 DNS query -- 23/26 file delete.
PowerShell:
- 4104 script-block logging (
Microsoft-Windows-PowerShell/Operational) --
deobfuscated script content; hunt for -enc, FromBase64String,
DownloadString, IEX, AMSI-bypass strings. 4103 module/pipeline
logging. 400/800 in Windows PowerShell.evtx (engine start, version --
a v2 downgrade is evasion).
RDP / TerminalServices:
- Security 4778/4779 session reconnect/disconnect (RDP or Fast User
Switching, not a fresh logon -- that is 4624). 1149 in
TerminalServices-RemoteConnectionManager (auth succeeded -- user + source
IP). 21/22/25 in TerminalServices-LocalSessionManager (logon,
shell start, reconnect).
WMI (Microsoft-Windows-WMI-Activity/Operational): 5857 provider
loaded, 5858 operation error, 5859-5861 permanent event-subscription
registration -- WMI persistence.
Task Scheduler (Microsoft-Windows-TaskScheduler/Operational): 106
task registered, 140 updated, 141 deleted, 200/201 action
executed/completed -- corroborates Security 4698.
Persistence Hunting
Sweep every autostart, not the handful your tool checks by default. This is the
defensive mirror of establishing-persistence -- read that skill for how each
mechanism is planted, then hunt for the traces here.
- Run keys --
...\Software\Microsoft\Windows\CurrentVersion\Run and
RunOnce, per SOFTWARE and each NTUSER.DAT; also ...\Policies\Explorer\Run.
- Services -- SYSTEM hive
...\Services; correlate installs with 7045.
- Scheduled tasks --
C:\Windows\System32\Tasks\ XML (parse the Actions
and Triggers); correlate 4698 / TaskScheduler 106.
- WMI event subscriptions --
__EventFilter, __EventConsumer,
__FilterToConsumerBinding in the OBJECTS.DATA repository;
Get-WMIObject -Namespace root\subscription -Class __EventConsumer.
- Startup folders --
...\Start Menu\Programs\Startup\ (per-user and
All Users).
- Winlogon --
Shell, Userinit, Notify under
...\Winlogon; anything appended after explorer.exe / userinit.exe.
- IFEO --
Image File Execution Options\<exe>\Debugger (and
GlobalFlag + Silent Process Exit) hijacking a legit binary.
- COM hijacks -- user-hive
Software\Classes\CLSID\...\InprocServer32
shadowing a HKLM CLSID.
- LSA / SSP --
...\Lsa\Security Packages and Notification Packages;
...\Lsa\OSConfig.
- BITS jobs --
bitsadmin /list /allusers /verbose or parse
...\Microsoft\Network\Downloader\qmgr*.dat for download-and-execute jobs.
:: Autoruns from Sysinternals, offline against a mounted image, VirusTotal + verify
autorunsc.exe -accepteula -a * -h -s -c -o autoruns.csv "\\?\E:\mount"
:: RECmd has batch files that dump every autostart location from the hives
RECmd.exe -d E:\out\host01 --bn BatchExamples\RegistryASEPs.reb --csv E:\out\parsed
Lateral-Movement Traces
Movement leaves paired artifacts on source and destination. Correlate by time,
account, and source IP.
- Network logons -- destination Security 4624 Type 3 (SMB/admin
shares, PtH) and Type 10 (RDP); 4648 on the source. A Type 3 with
NTLM to a domain-joined host where Kerberos was expected is a
pass-the-hash signature. A Type 9 (NewCredentials) points to
Overpass-the-Hash /
runas /netonly.
- PsExec / service-based exec -- 7045 service install (random or
PSEXESVC-style name) plus 7036 start on the destination; 5145 if
detailed file-share auditing logged the \ADMIN$\<svc>.exe write. RemCom and
similar clones follow the same 7045+7036 pattern.
- WMI / WinRM exec -- WMI-Activity 5857-5861,
wmiprvse.exe spawning a
child in Sysmon 1; WinRM over 5985/5986 (HTTP/HTTPS), with
Microsoft-Windows-WinRM/Operational and 4624 Type 3.
- Admin-share access --
C$, ADMIN$, IPC$ in 5140/5145;
correlate with the tool written to ADMIN$.
- SMB / file staging -- 5140/5145 and
$MFT entries for tools dropped to
the destination.
Filesystem Forensics
The NTFS metadata files are the ground truth the attacker is least likely to
scrub, and the timestomp check that no cleared log defeats.
:: $MFT -- every file's four SI + four FN timestamps, parent, size, resident data
MFTECmd.exe -f "E:\out\host01\$MFT" --csv E:\out\parsed
:: USN change journal -- creates/deletes/renames even after the file is gone
MFTECmd.exe -f "E:\out\host01\$Extend\$J" --csv E:\out\parsed
:: $LogFile -- transactional, can recover changes the USN rolled past
- Timestomp detection.
$STANDARD_INFORMATION times are settable from
user land (SetFileTime, timestomp); $FILE_NAME times are set only by the
kernel on rename/move. SI earlier than FN, sub-second zeros on SI, or SI
disagreeing with the USN entry all flag forgery. Parse both from MFTECmd and
diff them.
- USN Journal (
$Extend\$UsnJrnl:$J) records the filename, reason
(FileCreate, RenameNew, FileDelete), and USN for changes -- reconstructs
drop, rename, and cleanup of tooling even after deletion.
- Recycle Bin --
$I files in C:\$Recycle.Bin\<SID>\ hold the original
path, size, and deletion time of each $R file (RBCmd.exe).
- Shellbags (UsrClass.dat / NTUSER.DAT) prove a user browsed a specific
folder, including deleted, external, and network paths --
SBECmd.exe -d E:\out\host01 --csv E:\out\parsed.
- Alternate Data Streams --
dir /r, Get-Item -Stream *;
Zone.Identifier marks downloaded files (mark-of-the-web) and named streams
hide payloads.
Browser and Account Artifacts
- Browser history / downloads -- Chrome/Edge
History (SQLite,
...\User Data\Default\History), Firefox places.sqlite; the downloads
table plus Zone.Identifier ADS establish what was pulled onto the host.
- Local accounts -- SAM hive for created/enabled accounts, RID, last
logon; correlate with Security 4720/4722/4732.
- RDP cache / bitmaps (
...\Terminal Server Client\Cache\*.bmc) can
reconstruct what an interactive intruder saw.
Anti-Forensics Detection
Cleanup is signal, not silence. Hunt the traces of it:
- Log clears -- Security 1102 (Security log cleared) and System 104
(any log cleared) name the account and time. An event-log gap with no
corresponding shutdown is itself a finding.
- Timestomping -- SI vs. FN disagreement (above).
- Prefetch disabled --
...\Memory Management\PrefetchParameters\EnablePrefetcher = 0.
- USN journal deleted --
fsutil usn deletejournal leaves the journal
truncated; note the missing history as a gap.
- Sysmon / EDR tampering -- service stop (7036/7045 for the driver),
config change, or a v2 PowerShell downgrade to dodge script-block logging.
State every such gap explicitly in the timeline as a limitation -- never let a
cleared log become an implicit "nothing happened."
Building the Super-Timeline
Fast triage first, then the full timeline. Normalize everything to UTC,
cite the source artifact on every row, and separate observed from inferred.
:: Chainsaw -- fast EVTX triage with built-in + Sigma rules, minutes not hours
chainsaw hunt E:\out\host01\...\winevt\Logs -s sigma\ ^
--mapping mappings\sigma-event-logs-all.yml -r rules\ --csv -o chainsaw_out
:: Hayabusa -- EVTX -> single timeline scored by severity, Sigma-backed
hayabusa.exe csv-timeline -d E:\out\host01\...\winevt\Logs -o hayabusa.csv -p verbose
# Plaso -- ingest the whole triage set (or image) into one storage file...
log2timeline.py --storage-file plaso.db E:\out\host01
# ...then filter and export the super-timeline
psort.py -o l2tcsv -w super.csv plaso.db "date > '2026-07-01 00:00:00'"
Load the parsed CSVs (EZ Tools output, Chainsaw, psort) into Timeline
Explorer to pivot, tag, and color across artifacts in one grid. The Eric
Zimmerman suite -- PECmd, AmcacheParser, AppCompatCacheParser, SrumECmd,
MFTECmd, RECmd, SBECmd, JLECmd, LECmd, RBCmd -- plus Chainsaw / Hayabusa
for EVTX and Plaso for the union timeline is the core toolchain. Write
detections for what you find with writing-sigma-rules; hand the narrative to
reporting-security-findings.
Rationalizations to Reject
- "The Security log was cleared, so we're blind." Sysmon, Prefetch, Amcache,
SRUM, and the USN journal each independently record execution. A 1102 is
itself an indicator, and it names the account that cleared it.
- "No Prefetch entry, so it never ran." Prefetch is off on most Servers and
disabled on some SSD systems. Amcache, Shimcache, SRUM, 4688, and Sysmon 1
all corroborate execution independently.
- "Shimcache shows it, so it executed." Shimcache/AppCompatCache records that
a file was seen by the shim engine, not that it ran. Confirm with Prefetch,
Amcache, or a process-creation event.
- "The file timestamps look old, so it's original."
$STANDARD_INFORMATION
is trivially forged. Check $FILE_NAME and the USN journal; disagreement is
the finding.
- "There's no EDR, so there's nothing to analyze." The registry, event logs,
prefetch, amcache, SRUM, and $MFT exist on every Windows host regardless of
EDR. Most of this investigation predates EDR entirely.
- "One host alerted, so the intrusion is one host." Correlate 4624 Type
3/10, 4648, and 7045 outward -- lateral movement is the default assumption
until auth logs rule it out.
- "PowerShell was obfuscated, so we can't read it." Script-block logging
(4104) records the deobfuscated content Windows actually executed. If 4104
is missing, that gap points to a v2 downgrade -- itself a finding.
References
analyzing-linux-persistence -- the same host-forensic sweep for Linux
responding-to-incidents -- the IR process and multi-host coordination this
feeds
analyzing-memory-images -- RAM analysis for the volatile half of the host
investigating-m365-entra -- when the compromise is in cloud identity
hunting-threats -- proactive fleet-wide hunting with no specific host
establishing-persistence -- offensive view of the autostarts hunted here
writing-sigma-rules -- detections for the event-log patterns found
reporting-security-findings -- turning the timeline into the deliverable
- Eric Zimmerman tools (https://ericzimmerman.github.io) -- PECmd,
AmcacheParser, MFTECmd, RECmd, SBECmd, Timeline Explorer
- KAPE (Kroll Artifact Parser and Extractor) -- triage collection and parsing
- Chainsaw and Hayabusa -- fast Sigma-backed EVTX triage
- Plaso / log2timeline -- super-timeline generation
- Autoruns (Sysinternals) -- autostart enumeration
- Velociraptor -- endpoint triage collection at scale
1---2name: investigating-windows-endpoints3description: Investigate a compromised or suspicious Windows host from on-disk artifacts -- triage collection, evidence of execution (Prefetch, Amcache, Shimcache, SRUM, UserAssist, BAM), the event-log workhorses by ID (Security 4624/4688/4720/7045/1102, Sysmon, PowerShell 4104, RDP, WMI), persistence hunting across every autostart, lateral-movement traces, $MFT/USN filesystem forensics, anti-forensics detection, and building a super-timeline with the Eric Zimmerman suite, Chainsaw, Hayabusa, and Plaso. Use when triaging a compromised or suspicious Windows host, working through EVTX/Sysmon logs, reconstructing what executed on a Windows machine, hunting persistence and lateral-movement traces, or analyzing a KAPE/triage collection.4---56# Investigating Windows Endpoints78Windows records execution, persistence, and access in dozens of artifacts the9attacker rarely cleans completely. The event logs are only the surface -- the10registry, prefetch, amcache, and the file-system journals corroborate or11contradict them. The investigation is cross-referencing independent artifacts12into one timeline that no single cleared log can defeat.1314## When to Use1516- Triaging a compromised or suspicious Windows host, live or from an image17- Working through a KAPE, Velociraptor, or EDR triage collection18- Reconstructing what executed on a Windows machine and in what order19- Parsing EVTX / Sysmon / PowerShell logs to reconstruct attacker activity20- Hunting persistence and lateral-movement traces across the endpoint21- Detecting timestomping, log clears, and other on-host anti-forensics2223## When NOT to Use2425- **The host is Linux** -- use `analyzing-linux-persistence`26- **You need the overall IR process and multi-host coordination** -- use27 `responding-to-incidents`; come here when one Windows host is the focus28- **You have a RAM capture to work** -- use `analyzing-memory-images`; come29 here for the on-disk artifacts30- **The compromise is in cloud identity, not on the endpoint** -- use31 `investigating-m365-entra`32- **Proactive fleet-wide hunting with no specific host** -- use33 `hunting-threats`34- **You are the attacker on the host, not the responder** -- use35 `escalating-windows-privileges`3637## Triage Collection First3839Do not analyze the live disk in place. Collect a triage set, hash it, and work40on the copy. For most incidents a targeted triage collection answers the41question faster than a full image; image only the hosts that matter.4243**Dead vs. live acquisition.** A powered-off host or a mounted disk image is a44dead acquisition -- consistent, but you lose running processes, network state,45and unflushed logs. A live host lets you capture volatile state (memory,46`netstat -anob`, `Get-NetTCPConnection`, `tasklist /svc`) but every action47mutates the disk; record what you touch. Capture memory first if the host is48live and "are they still here" is open, then hand it to `analyzing-memory-images`.4950```cmd51:: KAPE targeted triage -- the fastest way to a defensible artifact set52kape.exe --tsource C: --target !SANS_Triage --tdest E:\out\host01 --vhdx host0153:: Broader coverage: registry hives, event logs, $MFT/$J, browser, prefetch54kape.exe --tsource C: --target KapeTriage,RegistryHives,EventLogs,FileSystem ^55 --tdest E:\out\host015657:: Then run the parsers (Modules) over what you collected58kape.exe --msource E:\out\host01 --mdest E:\out\host01\parsed ^59 --module !EZParser60```6162Velociraptor (`Windows.KapeFiles.Targets`) collects the same set at fleet scale63over an agent. Whatever the tool, verify hashes before and after every copy.6465**Key artifact directories** to make sure your collection contains:6667```68C:\Windows\System32\winevt\Logs\ Event logs (.evtx)69C:\Windows\System32\config\ Registry hives: SYSTEM, SOFTWARE, SAM, SECURITY70C:\Users\<u>\NTUSER.DAT Per-user registry hive71C:\Users\<u>\AppData\Local\Microsoft\Windows\UsrClass.dat Shellbags, COM72C:\Windows\Prefetch\ *.pf execution evidence73C:\Windows\appcompat\Programs\Amcache.hve Amcache74C:\Windows\System32\sru\SRUDB.dat SRUM75C:\Windows\System32\Tasks\ Scheduled task XML76C:\$MFT C:\$Extend\$UsnJrnl C:\$LogFile Filesystem journals77C:\$Recycle.Bin\ Deleted-file $I records78```7980## Evidence of Execution8182Multiple independent artifacts record that a binary ran. Cross-reference them --83agreement raises confidence, disagreement is itself a finding.8485```cmd86:: Prefetch -- run count, first/last run, files/dirs the binary touched.87:: Absent on most Servers; disabled on SSD-only systems -- note that, don't assume.88PECmd.exe -d C:\Windows\Prefetch --csv E:\out\parsed -q8990:: Amcache -- SHA-1 of executed/present binaries, compile times, driver load91AmcacheParser.exe -f C:\Windows\appcompat\Programs\Amcache.hve ^92 --csv E:\out\parsed -i9394:: Shimcache / AppCompatCache (SYSTEM hive) -- path + last-modified; presence95:: means the file was seen, NOT necessarily executed. Order is roughly LRU.96AppCompatCacheParser.exe -f C:\Windows\System32\config\SYSTEM --csv E:\out\parsed9798:: SRUM -- per-process bytes sent/received and CPU over 30-60 days.99:: Ties an executable to network volume even when netflow is gone.100SrumECmd.exe -f C:\Windows\System32\sru\SRUDB.dat ^101 -r C:\Windows\System32\config\SOFTWARE --csv E:\out\parsed102```103104From the user (NTUSER.DAT / UsrClass.dat) hives, parse GUI-execution and105file-access evidence with `RECmd`:106107```cmd108:: UserAssist (GUI program launches, run count, focus time),109:: BAM/DAM (background/desktop activity moderator: last-run per exe per SID),110:: RecentDocs, and RunMRU in one pass with the bundled batch file111RECmd.exe -d C:\Users --bn BatchExamples\UserActivity.reb --csv E:\out\parsed112```113114- **Jump Lists** (`...\Recent\AutomaticDestinations\*.automaticDestinations-ms`)115 and **LNK files** (`...\Recent\*.lnk`) record opened files/apps with target116 path, volume serial, and MAC times -- parse with `JLECmd` and `LECmd`.117- **RecentDocs** and shellbags (below) show what folders and files were opened.118119## The Event-Log Workhorses120121Parse EVTX first with a triage engine (Chainsaw / Hayabusa, below), then pivot122into specific channels. The IDs that carry the most weight:123124**Security** (`Security.evtx`):125126- **4624** logon success -- decode Logon Type: **2** interactive, **3**127 network (SMB, shares, PtH), **10** RemoteInteractive (RDP), **9**128 NewCredentials (runas /netonly, often Overpass-the-Hash). Pivot on129 LogonId to correlate a session's activity.130- **4625** logon failure -- password spraying and brute force by source IP.131- **4672** special privileges assigned -- admin-equivalent logon; pair with132 4624 to flag privileged sessions.133- **4648** explicit-credential logon -- runas and lateral movement.134- **4688** process creation -- with command-line auditing enabled, the full135 command line and parent process. The single most valuable Security event.136- **4720/4722/4738** account created/enabled/changed; **4728/4732/4756**137 member added to a global/local/universal privileged group (Domain Admins,138 local Administrators) -- attacker account and group manipulation.139- **4698/4699/4702** scheduled task created/deleted/updated.140- **7045** (System log) new service installed; **7036** service state change --141 the PsExec and lateral-tooling signature.142- **1102** the audit log was cleared -- an anti-forensic act and itself an143 indicator; correlate the gap it leaves.144145**Sysmon** (`Microsoft-Windows-Sysmon/Operational`), if deployed, is the146richest source:147148- **1** process create (with hashes, command line, parent) -- **3** network149 connection -- **7** image/DLL load (unsigned DLLs, sideloading) -- **8**150 CreateRemoteThread (injection) -- **10** process access (LSASS handle =151 credential dumping) -- **11** file create -- **12/13/14** registry152 create/set/rename (autoruns) -- **15** file-stream create (Zone.Identifier,153 ADS) -- **22** DNS query -- **23/26** file delete.154155**PowerShell**:156157- **4104** script-block logging (`Microsoft-Windows-PowerShell/Operational`) --158 deobfuscated script content; hunt for `-enc`, `FromBase64String`,159 `DownloadString`, `IEX`, AMSI-bypass strings. **4103** module/pipeline160 logging. **400/800** in `Windows PowerShell.evtx` (engine start, version --161 a v2 downgrade is evasion).162163**RDP / TerminalServices**:164165- Security **4778/4779** session reconnect/disconnect (RDP or Fast User166 Switching, not a fresh logon -- that is 4624). **1149** in167 `TerminalServices-RemoteConnectionManager` (auth succeeded -- user + source168 IP). **21/22/25** in `TerminalServices-LocalSessionManager` (logon,169 shell start, reconnect).170171**WMI** (`Microsoft-Windows-WMI-Activity/Operational`): **5857** provider172loaded, **5858** operation error, **5859-5861** permanent event-subscription173registration -- WMI persistence.174175**Task Scheduler** (`Microsoft-Windows-TaskScheduler/Operational`): **106**176task registered, **140** updated, **141** deleted, **200/201** action177executed/completed -- corroborates Security 4698.178179## Persistence Hunting180181Sweep every autostart, not the handful your tool checks by default. This is the182defensive mirror of `establishing-persistence` -- read that skill for how each183mechanism is planted, then hunt for the traces here.184185- **Run keys** -- `...\Software\Microsoft\Windows\CurrentVersion\Run` and186 `RunOnce`, per SOFTWARE and each NTUSER.DAT; also `...\Policies\Explorer\Run`.187- **Services** -- SYSTEM hive `...\Services`; correlate installs with 7045.188- **Scheduled tasks** -- `C:\Windows\System32\Tasks\` XML (parse the Actions189 and Triggers); correlate 4698 / TaskScheduler 106.190- **WMI event subscriptions** -- `__EventFilter`, `__EventConsumer`,191 `__FilterToConsumerBinding` in the OBJECTS.DATA repository;192 `Get-WMIObject -Namespace root\subscription -Class __EventConsumer`.193- **Startup folders** -- `...\Start Menu\Programs\Startup\` (per-user and194 All Users).195- **Winlogon** -- `Shell`, `Userinit`, `Notify` under196 `...\Winlogon`; anything appended after `explorer.exe` / `userinit.exe`.197- **IFEO** -- `Image File Execution Options\<exe>\Debugger` (and198 `GlobalFlag` + Silent Process Exit) hijacking a legit binary.199- **COM hijacks** -- user-hive `Software\Classes\CLSID\...\InprocServer32`200 shadowing a HKLM CLSID.201- **LSA / SSP** -- `...\Lsa\Security Packages` and `Notification Packages`;202 `...\Lsa\OSConfig`.203- **BITS jobs** -- `bitsadmin /list /allusers /verbose` or parse204 `...\Microsoft\Network\Downloader\qmgr*.dat` for download-and-execute jobs.205206```cmd207:: Autoruns from Sysinternals, offline against a mounted image, VirusTotal + verify208autorunsc.exe -accepteula -a * -h -s -c -o autoruns.csv "\\?\E:\mount"209:: RECmd has batch files that dump every autostart location from the hives210RECmd.exe -d E:\out\host01 --bn BatchExamples\RegistryASEPs.reb --csv E:\out\parsed211```212213## Lateral-Movement Traces214215Movement leaves paired artifacts on source and destination. Correlate by time,216account, and source IP.217218- **Network logons** -- destination Security **4624 Type 3** (SMB/admin219 shares, PtH) and **Type 10** (RDP); **4648** on the source. A Type 3 with220 **NTLM** to a domain-joined host where Kerberos was expected is a221 pass-the-hash signature. A Type 9 (NewCredentials) points to222 Overpass-the-Hash / `runas /netonly`.223- **PsExec / service-based exec** -- **7045** service install (random or224 `PSEXESVC`-style name) plus **7036** start on the destination; **5145** if225 detailed file-share auditing logged the `\ADMIN$\<svc>.exe` write. RemCom and226 similar clones follow the same 7045+7036 pattern.227- **WMI / WinRM exec** -- WMI-Activity **5857-5861**, `wmiprvse.exe` spawning a228 child in Sysmon 1; WinRM over **5985/5986** (HTTP/HTTPS), with229 `Microsoft-Windows-WinRM/Operational` and 4624 Type 3.230- **Admin-share access** -- `C$`, `ADMIN$`, `IPC$` in **5140/5145**;231 correlate with the tool written to `ADMIN$`.232- **SMB / file staging** -- 5140/5145 and `$MFT` entries for tools dropped to233 the destination.234235## Filesystem Forensics236237The NTFS metadata files are the ground truth the attacker is least likely to238scrub, and the timestomp check that no cleared log defeats.239240```cmd241:: $MFT -- every file's four SI + four FN timestamps, parent, size, resident data242MFTECmd.exe -f "E:\out\host01\$MFT" --csv E:\out\parsed243:: USN change journal -- creates/deletes/renames even after the file is gone244MFTECmd.exe -f "E:\out\host01\$Extend\$J" --csv E:\out\parsed245:: $LogFile -- transactional, can recover changes the USN rolled past246```247248- **Timestomp detection.** `$STANDARD_INFORMATION` times are settable from249 user land (SetFileTime, `timestomp`); `$FILE_NAME` times are set only by the250 kernel on rename/move. SI **earlier than** FN, sub-second zeros on SI, or SI251 disagreeing with the USN entry all flag forgery. Parse both from MFTECmd and252 diff them.253- **USN Journal** (`$Extend\$UsnJrnl:$J`) records the filename, reason254 (FileCreate, RenameNew, FileDelete), and USN for changes -- reconstructs255 drop, rename, and cleanup of tooling even after deletion.256- **Recycle Bin** -- `$I` files in `C:\$Recycle.Bin\<SID>\` hold the original257 path, size, and deletion time of each `$R` file (`RBCmd.exe`).258- **Shellbags** (UsrClass.dat / NTUSER.DAT) prove a user browsed a specific259 folder, including deleted, external, and network paths -- `SBECmd.exe -d260 E:\out\host01 --csv E:\out\parsed`.261- **Alternate Data Streams** -- `dir /r`, `Get-Item -Stream *`;262 `Zone.Identifier` marks downloaded files (mark-of-the-web) and named streams263 hide payloads.264265## Browser and Account Artifacts266267- **Browser history / downloads** -- Chrome/Edge `History` (SQLite,268 `...\User Data\Default\History`), Firefox `places.sqlite`; the `downloads`269 table plus `Zone.Identifier` ADS establish what was pulled onto the host.270- **Local accounts** -- SAM hive for created/enabled accounts, RID, last271 logon; correlate with Security 4720/4722/4732.272- **RDP cache / bitmaps** (`...\Terminal Server Client\Cache\*.bmc`) can273 reconstruct what an interactive intruder saw.274275## Anti-Forensics Detection276277Cleanup is signal, not silence. Hunt the traces of it:278279- **Log clears** -- Security **1102** (Security log cleared) and System **104**280 (any log cleared) name the account and time. An event-log **gap** with no281 corresponding shutdown is itself a finding.282- **Timestomping** -- SI vs. FN disagreement (above).283- **Prefetch disabled** -- `...\Memory Management\PrefetchParameters\EnablePrefetcher = 0`.284- **USN journal deleted** -- `fsutil usn deletejournal` leaves the journal285 truncated; note the missing history as a gap.286- **Sysmon / EDR tampering** -- service stop (7036/7045 for the driver),287 config change, or a v2 PowerShell downgrade to dodge script-block logging.288289State every such gap explicitly in the timeline as a limitation -- never let a290cleared log become an implicit "nothing happened."291292## Building the Super-Timeline293294Fast triage first, then the full timeline. Normalize everything to **UTC**,295cite the source artifact on every row, and separate observed from inferred.296297```cmd298:: Chainsaw -- fast EVTX triage with built-in + Sigma rules, minutes not hours299chainsaw hunt E:\out\host01\...\winevt\Logs -s sigma\ ^300 --mapping mappings\sigma-event-logs-all.yml -r rules\ --csv -o chainsaw_out301302:: Hayabusa -- EVTX -> single timeline scored by severity, Sigma-backed303hayabusa.exe csv-timeline -d E:\out\host01\...\winevt\Logs -o hayabusa.csv -p verbose304```305306```bash307# Plaso -- ingest the whole triage set (or image) into one storage file...308log2timeline.py --storage-file plaso.db E:\out\host01309# ...then filter and export the super-timeline310psort.py -o l2tcsv -w super.csv plaso.db "date > '2026-07-01 00:00:00'"311```312313Load the parsed CSVs (EZ Tools output, Chainsaw, psort) into **Timeline314Explorer** to pivot, tag, and color across artifacts in one grid. The Eric315Zimmerman suite -- **PECmd, AmcacheParser, AppCompatCacheParser, SrumECmd,316MFTECmd, RECmd, SBECmd, JLECmd, LECmd, RBCmd** -- plus **Chainsaw / Hayabusa**317for EVTX and **Plaso** for the union timeline is the core toolchain. Write318detections for what you find with `writing-sigma-rules`; hand the narrative to319`reporting-security-findings`.320321## Rationalizations to Reject322323- *"The Security log was cleared, so we're blind."* Sysmon, Prefetch, Amcache,324 SRUM, and the USN journal each independently record execution. A 1102 is325 itself an indicator, and it names the account that cleared it.326- *"No Prefetch entry, so it never ran."* Prefetch is off on most Servers and327 disabled on some SSD systems. Amcache, Shimcache, SRUM, 4688, and Sysmon 1328 all corroborate execution independently.329- *"Shimcache shows it, so it executed."* Shimcache/AppCompatCache records that330 a file was *seen* by the shim engine, not that it ran. Confirm with Prefetch,331 Amcache, or a process-creation event.332- *"The file timestamps look old, so it's original."* `$STANDARD_INFORMATION`333 is trivially forged. Check `$FILE_NAME` and the USN journal; disagreement is334 the finding.335- *"There's no EDR, so there's nothing to analyze."* The registry, event logs,336 prefetch, amcache, SRUM, and $MFT exist on every Windows host regardless of337 EDR. Most of this investigation predates EDR entirely.338- *"One host alerted, so the intrusion is one host."* Correlate 4624 Type339 3/10, 4648, and 7045 outward -- lateral movement is the default assumption340 until auth logs rule it out.341- *"PowerShell was obfuscated, so we can't read it."* Script-block logging342 (4104) records the *deobfuscated* content Windows actually executed. If 4104343 is missing, that gap points to a v2 downgrade -- itself a finding.344345## References346347- `analyzing-linux-persistence` -- the same host-forensic sweep for Linux348- `responding-to-incidents` -- the IR process and multi-host coordination this349 feeds350- `analyzing-memory-images` -- RAM analysis for the volatile half of the host351- `investigating-m365-entra` -- when the compromise is in cloud identity352- `hunting-threats` -- proactive fleet-wide hunting with no specific host353- `establishing-persistence` -- offensive view of the autostarts hunted here354- `writing-sigma-rules` -- detections for the event-log patterns found355- `reporting-security-findings` -- turning the timeline into the deliverable356- Eric Zimmerman tools (https://ericzimmerman.github.io) -- PECmd,357 AmcacheParser, MFTECmd, RECmd, SBECmd, Timeline Explorer358- KAPE (Kroll Artifact Parser and Extractor) -- triage collection and parsing359- Chainsaw and Hayabusa -- fast Sigma-backed EVTX triage360- Plaso / log2timeline -- super-timeline generation361- Autoruns (Sysinternals) -- autostart enumeration362- Velociraptor -- endpoint triage collection at scale