What You'll Learn
- Perform registry analysis to identify persistence mechanisms and system configuration changes
- Build a user activity timeline from Windows artifacts (RecentDocs, UserAssist, BAM/DAM)
- Extract browser forensic artifacts including history, downloads, and cached credentials
- Analyze USB device history to determine external storage connections
- Construct a complete attack narrative by correlating evidence from multiple artifact categories
Lab Overview
| Detail | Value |
|---|---|
| Lab Profile | lab-velociraptor |
| Containers | Velociraptor Server, Velociraptor Client (Windows endpoint) |
| Estimated Time | 70–80 minutes |
| Difficulty | Advanced |
| Browser Access | Velociraptor Web UI |
| Pre-Loaded Data | Planted artifacts: registry keys, browser history, USB history, user activity traces |
| Deliverable | Complete Windows forensic report with attack narrative |
The Full Picture. Labs 9.1 and 9.2 focused on evidence collection and execution artifacts. This lab brings it all together — registry analysis, user activity, browser history, USB devices, and more. By the end, you'll construct a complete attack narrative: how the attacker got in, what they did, what they stole, and how they tried to cover their tracks.
The Scenario
WIN-ENDPOINT-01 was compromised in a targeted attack. Labs 9.1 and 9.2 established the evidence collection and identified executed malicious tools. Now you need to answer the bigger questions:
- How did the attacker establish persistence? (Registry analysis)
- What did the user do before and during the compromise? (User activity timeline)
- Did the attacker use a web browser? (Browser artifacts)
- Was data exfiltrated to a USB device? (USB history)
- What's the complete story? (Attack narrative)
Part 1: Registry Analysis — Persistence Mechanisms
Why the Registry Matters
The Windows Registry is the single most information-rich artifact source in forensics. Attackers use it to:
- Establish persistence (Run keys, services, scheduled tasks)
- Store configuration (malware settings, C2 addresses)
- Leave traces (MRU lists, typed URLs, search history)
Key Registry Locations for Persistence
| Registry Key | Purpose | Artifact |
|---|---|---|
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run | Programs that run at every logon | Persistence |
HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run | Per-user startup programs | Persistence |
HKLM\SYSTEM\CurrentControlSet\Services | Windows services (can be attacker-created) | Persistence |
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache | Scheduled tasks | Persistence |
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon | Shell and userinit values | Persistence |
Collecting Registry Persistence Artifacts
- Open Velociraptor Web UI → select WIN-ENDPOINT-01
- Create a new collection:
Windows.Persistence.PermanentWMIEvents - Create another collection:
Windows.Sys.StartupItems - Create another collection:
Windows.System.TaskScheduler
Analyzing Persistence
For each persistence mechanism found, document:
PERSISTENCE ANALYSIS
════════════════════
Type: [Run Key / Service / Scheduled Task / WMI Event]
Location: [full registry path or task path]
Value: [executable path or command]
Created: [timestamp if available]
Suspicious?: [Y/N + reasoning]
Red flags to watch for:
- Run key entries pointing to
C:\Temp\,C:\Users\Public\, orAppData\paths - Services with
UNKNOWNpublisher or binary paths outsideSystem32\ - Scheduled tasks that execute PowerShell with encoded commands
- WMI event subscriptions (often used for fileless persistence)
Fileless Persistence. Modern attackers avoid dropping files entirely. They use WMI event subscriptions, registry-stored PowerShell scripts, or COM object hijacking. These won't appear in Prefetch or Amcache — only registry analysis reveals them.
Part 2: User Activity Timeline
Background Activity Moderator (BAM/DAM)
BAM tracks execution of programs by each user. This is separate from Prefetch (system-wide) — BAM shows which USER ran which program.
- Collect:
Windows.Registry.BAM - Analyze results for:
- Programs executed by the compromised user account
- Programs executed by SYSTEM (may indicate privilege escalation)
- Timestamps that correlate with your Prefetch/Amcache timeline from Lab 9.2
UserAssist — GUI Program Execution
UserAssist records every program launched via Windows Explorer (double-click, Start Menu):
- Collect:
Windows.Forensics.UserAssist - Analyze results for:
- Programs the user explicitly launched (vs. automated/scripted execution)
- Run counts and last execution times
- Focus time (how long the application window was in focus)
RecentDocs — Recently Accessed Files
- Collect:
Windows.Forensics.RecentApps - Analyze results for:
- Documents opened around the time of compromise
- File types that suggest data staging (ZIP, RAR, 7z archives)
- Files accessed from unusual locations
USER ACTIVITY TIMELINE
══════════════════════
Time (UTC) | User | Action | Source
---------------|---------------|---------------------------|-------
[timestamp] | [username] | Launched [program] | UserAssist
[timestamp] | [username] | Opened [document] | RecentDocs
[timestamp] | SYSTEM | Executed [program] | BAM
UserAssist Is ROT13 Encoded. Windows encodes UserAssist program paths with ROT13 (a trivial cipher). Velociraptor automatically decodes this, but if you ever examine raw registry exports, remember to decode the paths. This is NOT encryption — it's obfuscation to prevent casual browsing.
Part 3: Browser Forensic Artifacts
Why Browser Artifacts Matter
Browsers record everything: sites visited, files downloaded, credentials cached, form data submitted. Attackers use browsers to:
- Download additional tools
- Access webmail to exfiltrate data
- Log into cloud services with stolen credentials
- Research the internal network
Collecting Browser History
- Collect:
Windows.Applications.Chrome.History(for Chromium-based browsers) - Also collect:
Windows.Applications.Chrome.Extensions(malicious extensions)
Analyzing Browser Artifacts
BROWSER FORENSIC ANALYSIS
══════════════════════════
Browser: [Chrome / Edge / Firefox]
Profile: [Default / specific profile name]
HISTORY (Suspicious Entries)
Time (UTC) | URL | Title | Visit Count
---------------|----------------------------------|-----------------------|------------
[timestamp] | [URL] | [page title] | [count]
DOWNLOADS
Time (UTC) | File Name | Source URL | Save Path
---------------|--------------------|--------------------------------|----------
[timestamp] | [filename] | [download URL] | [local path]
What to look for:
- Downloads of hacking tools (mimikatz, PsExec, netcat, Cobalt Strike)
- Visits to file-sharing sites (pastebin, file.io, mega.nz) — data exfiltration
- Visits to webmail services during off-hours
- Visits to IP addresses instead of domain names (direct C2 communication)
- Search queries related to "how to disable antivirus" or "privilege escalation"
Part 4: USB Device History
Why USB History Matters
USB devices are the most common physical data exfiltration method. Windows records every USB device ever connected, including:
- Device manufacturer and model
- Serial number (unique identifier)
- First and last connection times
- Drive letter assigned
Collecting USB History
- Collect:
Windows.Forensics.Usb - Review the results for all USB storage devices
Analyzing USB Artifacts
USB DEVICE HISTORY
══════════════════
Device | Serial Number | First Connected | Last Connected | Drive Letter
-------------------|------------------|--------------------|--------------------|------------
[manufacturer] | [serial] | [timestamp UTC] | [timestamp UTC] | [letter]
Red flags:
- USB devices connected for the first time during the compromise window
- USB connections that coincide with large file access in RecentDocs
- Multiple USB devices connected in rapid succession (attacker swapping drives)
- USB connection followed immediately by disconnection (quick copy-and-go)
USB + RecentDocs = Exfiltration Evidence. If RecentDocs shows a large ZIP file was accessed at 02:30 UTC, and USB history shows a new device connected at 02:28 UTC and disconnected at 02:35 UTC, you have strong circumstantial evidence of data exfiltration to removable media.
Part 5: Building the Complete Attack Narrative
Correlation Methodology
Now combine ALL your findings from Labs 9.1, 9.2, and 9.3 into a single narrative:
- Initial Access: How did the attacker get in? (Browser downloads? Phishing? Remote exploit?)
- Execution: What tools did they run? (Prefetch/Amcache from Lab 9.2)
- Persistence: How did they maintain access? (Registry from Part 1)
- Discovery: What did they look for? (User activity from Part 2, browser from Part 3)
- Collection: What did they stage for exfiltration? (RecentDocs, file access)
- Exfiltration: How did they get data out? (USB from Part 4, browser uploads)
- Anti-Forensics: Did they try to cover tracks? (Missing artifacts, cleared logs)
Write Your Attack Narrative
ATTACK NARRATIVE — WIN-ENDPOINT-01
═══════════════════════════════════
Case ID: IR-2026-[today's date]
Examiner: [your name]
EXECUTIVE SUMMARY
─────────────────
[3-5 sentences summarizing the entire incident]
DETAILED TIMELINE
─────────────────
Phase 1 — Initial Access ([time range])
Evidence: [specific artifacts]
Finding: [what happened]
Phase 2 — Tool Deployment ([time range])
Evidence: [specific artifacts]
Finding: [what tools were used]
Phase 3 — Persistence ([time range])
Evidence: [specific artifacts]
Finding: [how they maintained access]
Phase 4 — Discovery & Lateral Movement ([time range])
Evidence: [specific artifacts]
Finding: [what they explored]
Phase 5 — Data Collection & Exfiltration ([time range])
Evidence: [specific artifacts]
Finding: [what was stolen and how]
Phase 6 — Anti-Forensics ([time range])
Evidence: [specific artifacts — or absence of expected artifacts]
Finding: [cleanup attempts]
INDICATORS OF COMPROMISE
────────────────────────
- IP Addresses: [list]
- File Hashes (SHA1): [list from Amcache]
- File Paths: [attacker tool locations]
- Registry Keys: [persistence mechanisms]
- USB Devices: [serial numbers]
RECOMMENDATIONS
───────────────
1. [Containment action]
2. [Eradication action]
3. [Recovery action]
4. [Lessons learned]
Deliverable Checklist
Before completing the lab, ensure you have:
- Persistence Analysis — all identified persistence mechanisms with registry paths and values
- User Activity Timeline — BAM, UserAssist, and RecentDocs correlated by timestamp
- Browser Forensic Analysis — suspicious history entries, downloads, and search queries
- USB Device History — all devices with connection times and correlation to file access
- Complete Attack Narrative — 6-phase timeline with evidence citations for each phase
- Indicators of Compromise — IPs, hashes, paths, registry keys, USB serials
Key Takeaways
- The Windows Registry is the richest single artifact source — persistence, configuration, user activity, and device history all live there
- User activity artifacts (BAM, UserAssist, RecentDocs) reveal the human side of the investigation: what the user (or attacker) explicitly interacted with
- Browser artifacts record downloads, visits, and searches — attackers who use the browser leave extensive trails
- USB history combined with file access timestamps provides strong exfiltration evidence
- A complete attack narrative maps findings to the MITRE ATT&CK framework phases, creating a story that technical and non-technical stakeholders can understand
- Anti-forensics (missing artifacts, cleared logs) is itself evidence — the absence of expected data indicates deliberate cleanup
What's Next
In Lab 9.4 — Memory Forensics, you'll analyze a memory dump using Volatility to find malware that never touched disk — process injection, in-memory shellcode, and hidden network connections that only exist in RAM.
Lab Challenge: Windows Forensic Investigation
10 questions · 70% to pass
Which Windows registry key is most commonly used by attackers to establish persistence that survives reboots?
What is 'fileless persistence' and why is it harder to detect than file-based persistence?
How does the Background Activity Moderator (BAM) differ from Prefetch for tracking program execution?
Windows UserAssist entries are encoded with ROT13. What is ROT13 and why does Windows use it?
You find browser history showing visits to 'mega.nz' and 'file.io' at 03:15 UTC during the compromise window. What is the most likely explanation?
USB history shows a device with serial number 'AA00000001' first connected at 02:28 UTC and last connected at 02:35 UTC. RecentDocs shows a 500MB ZIP file accessed at 02:30 UTC. What conclusion can you draw?
In a forensic attack narrative, what does Phase 7 'Anti-Forensics' refer to, and why is the ABSENCE of expected artifacts itself evidence?
Which Velociraptor artifact would you use to detect WMI-based persistence on a Windows endpoint?
When building an attack narrative, why should findings be mapped to MITRE ATT&CK framework phases?
You've completed a full Windows forensic investigation. Your report lists 12 IOCs including IP addresses, file hashes, registry keys, and USB serial numbers. What is the PRIMARY purpose of documenting IOCs in the final report?
0/10 answered