☼
⌃
☰

windows client DFIR

Table of Contents

DFIR methodology for Windows endpoints. Covers both live system investigation and post-fact artifact analysis. Live investigations prioritise volatile data capture before it is lost; post-fact investigations work from collected artifacts, exported logs, or a disk image.

Related: DFIR Windows Event Logs Core Windows Processes KAPE Autopsy Volatility dfir Digital Forensics and Incidence response

1. First Response — Live System

Before touching anything document the system state. Note the system time first — everything else is relative to it.

SHELL
# Time and identity
date /t & time /t
hostname
query user
whoami

# Volatile state — capture before anything changes
tasklist /svc                           # running processes
netstat -ano                            # active connections
net use                                 # mapped drives
net share                               # active shares
wmic startup list full                  # startup items
ipconfig /all                           # network config

Memory Acquisition

Capture RAM before rebooting or shutting down. Lost on restart.

SHELL
# Magnet RAM Capture — GUI, save to external drive
# Winpmem — command line
winpmem_mini_x64.exe memory.raw

# RamCapture x64 — GUI alternative
# Always save to external drive — never write to suspect system

Artifact Collection

KAPE is the fastest way to collect a consistent artifact set from a live system:

SHELL
# Gkape — GUI
# Select Target: !BasicCollection or !SANS_Triage
# Select Module: as appropriate
# Output to external drive

# Command line
kape.exe --tsource C: --tdest E:\output --target !BasicCollection

2. Key Artifact Locations

Event Logs

Primary source for user and system activity. See Windows Event Logs for full Event ID reference.

TEXT
C:\Windows\System32\winevt\Logs\
Log Key Contents
Security.evtx Logon/logoff, privilege use, account changes
System.evtx Service start/stop, driver events, crashes
Application.evtx Application errors and events
PowerShell/Operational.evtx PowerShell execution
Sysmon/Operational.evtx Process, network, file events (if Sysmon deployed)
TaskScheduler/Operational.evtx Scheduled task creation and execution
TerminalServices-LocalSessionManager RDP session activity

Prefetch

Proves execution — file name, run count, first and last run time. Survives executable deletion.

TEXT
C:\Windows\Prefetch\*.pf
SHELL
# Parse with PECmd (Eric Zimmerman)
PECmd.exe -d C:\Windows\Prefetch --csv output\
PECmd.exe -f C:\Windows\Prefetch\MALWARE.EXE-XXXXXXXX.pf

# Look for:
# — Executables run from \Temp\, \AppData\, \Downloads\
# — Suspicious names: random strings, mimicking system processes
# — Execution timestamps for timeline

Registry — User Activity

TEXT
# Per-user hive
C:\Users\<user>\NTUSER.DAT

# Key locations within NTUSER.DAT:
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs
  → recently opened files by extension

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist
  → GUI application execution with run count and last run time
  → values are ROT13-encoded

HKCU\Software\Microsoft\Windows\Shell\Bags
  → folder browsing history (ShellBags)
  → persists even for deleted folders and removable media

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU
  → commands run via Win+R (Run dialog)

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\TypedPaths
  → paths typed directly into Explorer address bar

Registry — System and Persistence

TEXT
# Autorun / persistence locations
HKLM\Software\Microsoft\Windows\CurrentVersion\Run
HKCU\Software\Microsoft\Windows\CurrentVersion\Run
HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce
HKLM\System\CurrentControlSet\Services
  → malware frequently registers as a service

# Installed software
HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall

# USB devices ever connected
HKLM\System\CurrentControlSet\Enum\USBSTOR
  → device type, vendor, product, serial number

# Network interfaces and recent connections
HKLM\Software\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles

Parse hives with Registry Explorer or RegRipper (Eric Zimmerman).

Shimcache and Amcache

Prove a file existed on the system and was executed — even after deletion.

TEXT
# Shimcache — execution evidence, no timestamps in Win11
HKLM\System\CurrentControlSet\Control\Session Manager\AppCompatCache

# Amcache — richer: SHA1 hash, file path, first execution time
C:\Windows\AppCompat\Programs\Amcache.hve

# Parse with AppCompatCacheParser and AmcacheParser (Eric Zimmerman)
AppCompatCacheParser.exe -f SYSTEM --csv output\
AmcacheParser.exe -f Amcache.hve --csv output\

Jump Lists and LNK Files

Jump Lists: recently opened files per application LNK files: shortcut files auto-created when files are opened

TEXT
# Jump Lists
C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations\
C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Recent\CustomDestinations\

# LNK files
C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Recent\

# LNK files contain: original path, timestamps, volume serial
# number, host MAC address — useful for proving file access and
# identifying other machines files were accessed from

# Parse with LECmd and JLECmd (Eric Zimmerman)
LECmd.exe -d "C:\Users\user\AppData\Roaming\Microsoft\Windows\Recent\" --csv output\
JLECmd.exe -d "C:\Users\user\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations\" --csv output\

Browser Artifacts

TEXT
# Chrome / Edge (Chromium-based)
C:\Users\<user>\AppData\Local\Google\Chrome\User Data\Default\History
C:\Users\<user>\AppData\Local\Microsoft\Edge\User Data\Default\History
  → SQLite databases — open with DB Browser for SQLite or NirSoft tools

# Firefox
C:\Users\<user>\AppData\Roaming\Mozilla\Firefox\Profiles\*.default-release\
  → places.sqlite (history and bookmarks)
  → downloads.sqlite (download history)

# Key tables in Chrome/Edge History SQLite:
# urls — visited URLs with visit count and last visit time
# downloads — downloaded files with source URL and local path

USB History

TEXT
# Devices connected
HKLM\System\CurrentControlSet\Enum\USBSTOR
  → VID/PID, serial number, friendly name

# First connection time
C:\Windows\inf\setupapi.dev.log
  → search for device serial number

# Last connection / removal times
HKLM\System\CurrentControlSet\Enum\USB (timestamps)
HKLM\Software\Microsoft\Windows NT\CurrentVersion\EMDMgmt

# Drive letter assigned
HKLM\System\MountedDevices

3. Timeline Reconstruction

Build a timeline by correlating timestamps across artifact sources. Use a spreadsheet or timeline tool (e.g. Plaso / log2timeline).

Time Source Event
T+0 Security.evtx 4624 User logged on
T+2m Prefetch malware.exe first executed
T+2m Amcache malware.exe recorded
T+3m Security.evtx 4698 Scheduled task created
T+5m USBSTOR USB device connected
T+6m LNK files Files accessed on USB

Key timestamp types to be aware of:

Artifact Timestamps available
Prefetch First run, last run, run count
Amcache First execution time, SHA1 hash
LNK files Target created, modified, accessed
Event logs Log entry timestamp (UTC)
NTFS MFT Created, modified, accessed, MFT entry changed
Browser history Visit time, download start/end

Note: NTFS timestamps can be manipulated by attackers (timestomping). Cross-reference against other artifact sources.

4. Common Incident Patterns

Malware Execution

TEXT
Indicators:
— Prefetch entry for unknown executable in \Temp\ or \AppData\
— Amcache entry with no corresponding installed software
— New service or Run key pointing to unusual path
— Scheduled task created at time of execution
— UserAssist entry for executable not in Program Files

Event IDs to check:
— 4688: Process creation (if auditing enabled)
— 7045: New service installed
— 4698: Scheduled task created
— Sysmon 1: Process creation (if Sysmon deployed)

Credential Theft

TEXT
Indicators:
— Mimikatz or known credential dumper in Prefetch / Amcache
— lsass.exe accessed by non-system process (Sysmon Event 10)
— SAM / SYSTEM hive accessed or copied
— Security event 4656: Handle to SAM requested
— LSASS dump file in temp directory

Event IDs to check:
— 4648: Logon with explicit credentials (Pass-the-Hash indicator)
— 4672: Special privileges assigned (admin token)
— 4624 type 3: Network logon (lateral movement)

Persistence

TEXT
Indicators:
— New Run / RunOnce registry key pointing to unusual binary
— New service with suspicious binary path
— New scheduled task (Event 4698)
— LNK file or startup folder entry for unknown executable
— Modified hosts file: C:\Windows\System32\drivers\etc\hosts

Event IDs to check:
— 7045: Service installed
— 4698 / 4702: Task created / modified
— 4657: Registry value modified

Lateral Movement

TEXT
Indicators:
— Event 4624 type 3 (network logon) from unexpected source IP
— Event 4648: Explicit credential logon
— PsExec in Prefetch (PSEXEC.EXE or PSEXESVC.EXE)
— WMI activity: wmiprvse.exe spawning child processes (Sysmon 1)
— New admin share connections in event log

Event IDs to check:
— 4624 / 4625: Successful / failed logon
— 4776: Credential validation (NTLM)
— 4768 / 4769: Kerberos ticket requested

5. Eric Zimmerman Tools Reference

The EZ tools are the standard for parsing Windows artifacts offline. All output to CSV for easy filtering.

Tool Artifact
PECmd Prefetch
AppCompatCacheParser Shimcache
AmcacheParser Amcache
LECmd LNK files
JLECmd Jump Lists
Registry Explorer Registry hives (GUI)
RegRipper Registry (automated report)
MFTECmd NTFS MFT
EvtxECmd Event logs → CSV
Timeline Explorer View and filter CSV output (GUI)

Download: https://ericzimmerman.github.io

Tips

  • Always note the system timezone before pulling timestamps — event logs are UTC but some artifacts use local time
  • Prefetch is disabled by default on systems with SSDs in some configurations — verify it is enabled before relying on absence of entries as evidence of non-execution
  • ShellBags persist for folders that no longer exist — useful for proving access to deleted directories or previously connected removable media
  • Timestomping (MACE timestamp manipulation) is common in targeted attacks — cross-reference NTFS timestamps against Prefetch and event log timestamps which are harder to manipulate
  • UserAssist values are ROT13-encoded — decode before reading
  • EvtxECmd + Timeline Explorer is the fastest workflow for event log analysis — export all logs to CSV, filter in Timeline Explorer