Windows artifacts
Windows leaves a huge trail of what happens: program execution, logons, file opens, folder browsing and persistence are recorded across dozens of artifacts. Knowing them, and knowing exactly what each one proves, is what lets you reconstruct an attack even after the attacker has deleted part of the evidence. They are collected during triage and feed the timeline.
What it solves
Section titled “What it solves”The artifacts answer the questions of any investigation on a Windows host: what ran?, who logged on, how and from where?, which files and folders were touched?, where is the persistence? Redundancy is the analyst’s big advantage: if the attacker deletes Prefetch, Amcache, BAM or SRUM usually still give the execution away.
The most common mistake is not missing an artifact but over-reading it: treating a binary’s presence in ShimCache as proof it ran, or taking an artifact’s timestamp as the time of the action when it is actually the time it was written.
Artifact map
Section titled “Artifact map”flowchart TD
Q1["What ran?"] --> E1["Prefetch · Amcache · BAM<br/>ShimCache · UserAssist · SRUM"]
Q2["Who logged on, from where?"] --> E2["Security.evtx 4624/4625/4648<br/>RDP 1149 · 21 · 24 · 25"]
Q3["Which files and folders?"] --> E3["LNK · Jump Lists · ShellBags<br/>$MFT · $UsnJrnl"]
Q4["What persists?"] --> E4["Run/RunOnce · services 7045<br/>tasks 4698 · WMI"]
E1 --> T["Timeline"]
E2 --> T
E3 --> T
E4 --> T
Evidence of execution
Section titled “Evidence of execution”| Artifact | Location | What it proves | Limits |
|---|---|---|---|
| Prefetch | C:\Windows\Prefetch\*.pf |
Execution, run count and up to the last 8 run times (Windows 8 and later); files and directories loaded in the first seconds | Usually disabled on Windows Server; can be deleted |
| Amcache | C:\Windows\appcompat\Programs\Amcache.hve |
File path, SHA-1 and metadata; installed programs | Shows presence or installation more reliably than execution; corroborate with other sources |
| ShimCache (AppCompatCache) | SYSTEM hive, ControlSet00x\Control\Session Manager\AppCompatCache |
That the system saw the executable (path and file last-modified time) | Since Windows 10 it does not prove execution; written at shutdown, so the current session’s entries are only in memory |
| BAM | SYSTEM hive, Services\bam\State\UserSettings\<SID> |
Per-user execution with last run time | Windows 10 1709 and later only; old entries are purged |
| UserAssist | NTUSER.DAT\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist |
Programs launched from Explorer, with count and last time | Names ROT13-encoded; does not record console execution |
| SRUM | C:\Windows\System32\sru\SRUDB.dat |
Resource usage per app and user, including bytes sent and received | Aggregated in intervals; useful for spotting exfiltration by volume |
User and file activity
Section titled “User and file activity”- LNK (
%APPDATA%\Microsoft\Windows\Recent\): shortcuts created when a file is opened; they store the path, the target file’s timestamps, the volume serial number and even the machine name if the file was on a share. - Jump Lists (
...\Recent\AutomaticDestinations\): files opened per application. - ShellBags (
UsrClass.datandNTUSER.DAT): folders browsed in Explorer, even if they no longer exist or were on a USB drive or share. - Recycle Bin (
$Recycle.Bin\<SID>\):$Ifiles store the original path, size and deletion time. - Browsers: history, downloads and cache; a downloaded file’s
Zone.Identifierstream (Mark of the Web) stores the source URL. $MFTand$UsnJrnl:$J: file creation, renames and deletions on NTFS; the basis of the timeline.
Logons and key events
Section titled “Logons and key events”| Event | Log | What it means |
|---|---|---|
| 4624 | Security | Successful logon. Type 2 interactive, 3 network (SMB, WinRM), 5 service, 10 RDP |
| 4625 | Security | Failed logon (brute force, password spraying) |
| 4648 | Security | Logon with explicit credentials (runas, lateral movement) |
| 4672 | Security | Special privileges assigned to the session (administrative account) |
| 4688 | Security | Process creation; command line only if enabled by policy |
| 4698 | Security | Scheduled task created (requires object access auditing) |
| 4720 / 4732 | Security | Account created / added to a privileged local group |
| 1102 | Security | The Security log was cleared |
| 7045 | System | Service installed |
| 104 | System | An event log was cleared |
| 1149 | TerminalServices-RemoteConnectionManager | Successful RDP authentication, with source IP |
| 21 / 24 / 25 | TerminalServices-LocalSessionManager | RDP session logon, disconnect and reconnect |
| 4104 | PowerShell/Operational | Script Block Logging: the script actually run, already deobfuscated |
| 1 / 3 / 11 | Sysmon | Process with hash and command line, network connection, file created (Sysmon) |
Windows default auditing does not record 4688 with command lines or 4698: if they were not configured before the incident, those events do not exist. It is one of the reasons preparation is part of incident response.
Persistence: where to look
Section titled “Persistence: where to look”- Run/RunOnce keys (
HKLMandHKCU\Software\Microsoft\Windows\CurrentVersion\Run) and startup folders. - Services:
HKLM\SYSTEM\CurrentControlSet\Servicesand event 7045. - Scheduled tasks:
C:\Windows\System32\Tasks\(XML) and theTaskCachekey in the SOFTWARE hive; a task with no XML or no registry entry is suspicious. - WMI subscriptions: filters, consumers (
CommandLineEventConsumer) and bindings in theOBJECTS.DATArepository. - Others:
Winlogon\UserinitandShell, Image File Execution Options, AppInit_DLLs, COM hijacking. Details in malware persistence.
Tools and commands
Section titled “Tools and commands”Eric Zimmerman’s tools are the de facto standard for parsing Windows artifacts to CSV; Hayabusa and Chainsaw apply Sigma rules to EVTX files.
MFTECmd.exe -f "E:\...\C\$MFT" --csv E:\out --csvf mft.csvMFTECmd.exe -f "E:\...\C\$Extend\$UsnJrnl`$J" -m "E:\...\C\$MFT" --csv E:\outPECmd.exe -d "E:\...\C\Windows\Prefetch" --csv E:\outAmcacheParser.exe -f "E:\...\C\Windows\appcompat\Programs\Amcache.hve" -i --csv E:\outAppCompatCacheParser.exe -f "E:\...\C\Windows\System32\config\SYSTEM" --csv E:\outEvtxECmd.exe -d "E:\...\C\Windows\System32\winevt\Logs" --csv E:\outSrumECmd.exe -d "E:\...\C\Windows\System32\sru" -r "E:\...\C\Windows\System32\config\SOFTWARE" --csv E:\out
# Hunt the EVTX files with Sigma ruleshayabusa.exe csv-timeline -d "E:\...\C\Windows\System32\winevt\Logs" -o E:\out\hayabusa.csvchainsaw hunt "E:\...\winevt\Logs" -s sigma\ --mapping mappings\sigma-event-logs-all.ymlTimeline Explorer opens the resulting CSVs with filters and grouping; Registry Explorer browses hives, including deleted keys.
Anti-forensics
Section titled “Anti-forensics”- Log clearing (
wevtutil cl,Clear-EventLog): generates 1102 or 104. If events were shipped to a SIEM, clearing locally does not erase the central copy. - Disabling auditing or the event log service before acting: an absence of events in a window is itself an indicator.
- Deleting shadow copies (
vssadmin delete shadows,wmic shadowcopy delete): an almost universal ransomware step before encryption. - Timestomping: alters
$STANDARD_INFORMATION; detected by comparing with$FILE_NAMEand the$UsnJrnl(see timeline). - Cleaning Prefetch or Amcache: redundancy with BAM, SRUM, ShimCache and memory usually gives the execution away anyway.
- Living off the land: using legitimate Windows binaries makes execution artifacts show “normal” names; what gives it away is the command line, the parent and the context.
Real-world cases
Section titled “Real-world cases”- Volt Typhoon (joint advisory AA24-038A, February 2024): the authoring agencies saw indications that the actor had kept access in some victims for at least five years, relying almost entirely on native Windows tools (
ntdsutil,netsh,wmic,wevtutil, PowerShell) rather than custom malware. Among its immediate actions, the advisory asks organizations to turn on application, access and security logging and store the logs in a central system. Lesson: with an attacker living off the land, the evidence is the command lines (4688, 4104, Sysmon 1) and their retention; if logs only last a few days on the host, five years of intrusion are invisible.
Checklist
Section titled “Checklist”- Full triage collection: hives, EVTX, Prefetch, Amcache, SRUM,
$MFT,$UsnJrnl, LNK, Jump Lists - Execution: Prefetch, Amcache, BAM, UserAssist, SRUM, interpreting what each one proves
- Logons: 4624 (types 3 and 10), 4625, 4648, 4672, RDP 1149/21/24/25
- Persistence: Run, services (7045), tasks (4698, XML and TaskCache), WMI
- Clearing: 1102, 104, gaps in the logs, shadow copies
- Sigma hunt (Hayabusa or Chainsaw) over the EVTX files
- Findings merged into the timeline and mapped to ATT&CK
References
Section titled “References”- Eric Zimmerman’s Tools: https://ericzimmerman.github.io/
- Hayabusa: https://github.com/Yamato-Security/hayabusa
- Chainsaw: https://github.com/WithSecureLabs/chainsaw
- Microsoft Learn, logon audit events (4624): https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4624
- CISA and partners, AA24-038A PRC State-Sponsored Actors Compromise and Maintain Persistent Access to U.S. Critical Infrastructure: https://www.cisa.gov/news-events/cybersecurity-advisories/aa24-038a
- SANS, Windows Forensic Analysis poster: https://www.sans.org/posters/windows-forensic-analysis/