USB Device & External Storage - DFIR Workflow & Cheatsheet
Quick Reference: Investigation Priority Matrix
HIGH
USBSTOR Registry
What devices? When? Serial?
High
All
HIGH
LNK Files
What files accessed from USB?
Very High
All
HIGH
Connection Timestamps
First/Last plug times?
High
Win7+
MEDIUM
MountPoints2
Which users accessed device?
High
All
MEDIUM
Partition/Diagnostic Logs
Connect/Disconnect events?
Medium
Win7+
MEDIUM
setupapi.dev.log
First connection time?
Low
All
MEDIUM
Volume Serial Number
Link device to files?
Medium
Varies
LOW
Windows Portable Devices
Last drive letter? Volume name?
Medium
Vista+
LOW
Event Logs
Detailed activity?
Low
All
Investigation Workflow
Phase 1: USB Device Identification (Critical Priority)
Goal: Identify all USB devices ever connected to the system
1.1 Primary USB Device Enumeration
What it tells you: Vendor, Product, Version, Serial Number, First/Last Connection
Registry Locations:
USBSTOR (Primary - Storage Devices):
USB (All USB Devices):
SCSI (Linked Storage):
HID (Human Interface Devices):
Key Structure:
Key Investigation Points:
✓ Vendor: Manufacturer (SanDisk, Kingston, etc.)
✓ Product: Device model/type
✓ Version: Firmware revision
✓ Serial Number: Unique device identifier
⚠️ "&" in 2nd character = No unique serial (Windows-generated)
⚠️ Internal serial ≠ printed label serial
✓ ParentIdPrefix: Links USBSTOR → SCSI keys
✓ Properties timestamps: 64-bit FILETIME format
Data Retention:
Analysis Commands:
PowerShell - Enumerate USB Devices:
Registry Export for Analysis:
Forensic Value:
1.2 Connection Timestamps (First, Last, Removal)
What it tells you: Precise timing of USB device usage
Method 1: Registry Properties (Win7+)
Location:
Alternate Location (SCSI):
Timestamp Format: Windows 64-bit FILETIME (100-nanosecond intervals since 1601-01-01)
PowerShell - Extract Timestamps:
Method 2: setupapi.dev.log (First Connection)
Location:
Key Investigation Points:
✓ Text log file (searchable)
✓ Records Plug and Play driver installations
✓ Timestamps in LOCAL TIME ZONE (important!)
✓ Search by device serial number
✓ Shows first time device was ever connected
Analysis Command:
Method 3: Partition/Diagnostic Event Log (All Connections)
Location:
Key Investigation Points:
✓ Event ID 1006: Device connect/disconnect events
✓ Includes connect time, disconnect time
✓ May include VBR data with Volume Serial Number
⚠️ Log cleared during major OS updates
✓ Available Win7+
PowerShell - Parse Event Log:
Forensic Value:
Phase 2: Device-to-User Attribution (High Priority)
Goal: Identify which user accounts accessed the USB device
2.1 User MountPoints2 (Per-User USB Access)
What it tells you: Which users had the USB device connected while logged in
Location (Per User):
Investigation Workflow:
Step 1: Get Device Volume GUID from MountedDevices
Step 2: Match Volume GUID in User's MountPoints2
PowerShell - User Attribution:
RegRipper Analysis:
Forensic Value:
Phase 3: Drive Letter & Volume Identification (Medium Priority)
Goal: Determine drive letter assignment and volume name
3.1 Last Drive Letter Assignment
What it tells you: Last drive letter (E:, F:, etc.) assigned to USB device
Location 1: MountedDevices (Primary)
Key Investigation Points:
✓ Maps drive letters to Volume GUIDs and Serial Numbers
✓ Only shows LAST device mapped to each drive letter
⚠️ No historical records (only current/last mapping)
✓ Value names:
\DosDevices\E:,\DosDevices\F:, etc.✓ Value data contains device serial number
PowerShell - Extract Drive Letters:
Location 2: Windows Portable Devices (Volume Name)
Key Investigation Points:
✓ Contains friendly device names
✓ Volume labels and device descriptions
✓ Match serial numbers to get volume name
Location 3: VolumeInfoCache (Windows Search)
Key Investigation Points:
✓ Volume label (friendly name)
✓ Device type information
✓ Last mount time
Forensic Value:
Phase 4: Volume Serial Number (VSN) Analysis
Goal: Link USB device to specific files via VSN
4.1 Volume Serial Number Extraction
What it tells you: File system VSN (NOT device unique serial)
Understanding VSNs:
Method 1: EMDMgmt Registry (Legacy)
Location:
Extraction Process:
Key Investigation Points:
⚠️ Often missing on modern SSD systems
✓ Useful for older systems
✓ Links device serial to VSN
Method 2: Partition/Diagnostic Event Log (Win10+)
Location:
Key Investigation Points:
✓ Event ID 1006 may include VBR data
✓ VSN embedded in Volume Boot Record (VBR)
✓ VSN location in VBR:
FAT: Offset 0x43 (4 bytes)
exFAT: Offset 0x64 (4 bytes)
NTFS: Offset 0x48 (4 bytes)
⚠️ Log cleared during major OS updates
PowerShell - Extract VSN from Event:
Method 3: LNK File Extraction (Most Reliable)
Forensic Value:
Phase 5: File Access Evidence (Critical Priority)
Goal: Identify specific files accessed from USB device
5.1 LNK (Shortcut) Files Analysis
What it tells you: Files opened from USB, even if deleted
Primary Locations:
LNK File Naming Convention:
Key Investigation Points:
✓ Persists after target file deletion (high value!)
✓ .lnk extension hidden in Windows Explorer
✓ Only latest access recorded per filename
✓ Created automatically when file opened
LNK File Metadata (Embedded):
LNK File Timestamps:
Analysis Commands:
Basic Directory Listing:
ExifTool Analysis:
LECmd (Eric Zimmerman) - Comprehensive Parsing:
Single File:
Directory of Files:
Entire System (All Users):
PowerShell - Find USB-Related LNK Files:
Forensic Value:
USB-Specific Investigation:
Phase 6: System Context (Supporting Priority)
Goal: Establish system configuration and timeline context
6.1 Operating System Version
What it tells you: OS type, version, installation dates, update history
Location:
CurrentVersion Key Data:
Source OS Keys (Update History):
Key Investigation Points:
✓ InstallTime in key name is extraneous (ignore)
✓ InstallTime value = actual installation time
Win10+: 64-bit FILETIME format
Older: Unix 32-bit epoch format
✓ Helps determine system age
✓ Explains artifact availability (Win7 vs Win10 vs Win11)
PowerShell - Extract OS Info:
Forensic Value:
6.2 Computer Name
What it tells you: System hostname
Location:
Key Investigation Points:
✓ Facilitates correlation with logs
✓ Network activity attribution
✓ Multi-system investigation
✓ Matches hostname in LNK files
PowerShell:
6.3 System Last Shutdown Time
What it tells you: When system was last powered off
Location:
Shutdown Count (Windows XP Only):
PowerShell:
Forensic Value:
6.4 System Boot & Autostart Programs
What it tells you: Programs that run at boot/login (persistence mechanisms)
Locations:
User-Level Autostart:
System-Level Autostart:
Services:
Key Investigation Points:
✓ Malware persistence detection
✓ Unauthorised program execution
✓ USB-based malware delivery
⚠️ Not exhaustive (many autorun locations exist)
PowerShell - Enumerate Autoruns:
RegRipper:
Forensic Value:
Phase 7: Event Log Correlation (Supporting Priority)
Goal: Detailed timeline from Windows Event Logs
7.1 System Event Log
Location:
Key Event IDs:
PowerShell:
7.2 Security Event Log
Location:
Key Event IDs:
Key Investigation Points:
⚠️ Depends on audit settings (may not be enabled)
✓ Detailed access attempts
✓ Failed access (permissions issues)
✓ Device recognition events
PowerShell:
7.3 Partition/Diagnostic Event Log (Already Covered)
Location:
Key Event ID:
Phase 8: Cloud Sync & OneDrive (Modern Systems)
Goal: Identify cloud-synced files that may have USB origin
8.1 OneDrive Integration
What it tells you: OneDrive sync status, file metadata, cloud storage
Installation & Enablement:
✓ Installed by default on Windows 8+
✓ Must be enabled by user authentication
✓ Requires Microsoft Cloud account
Default Local Storage Locations:
Registry Configuration:
Metadata Locations:
SyncDiagnostics Log:
SyncEngine ODL Logs:
User CID File:
Key Investigation Points:
✓ Critical: Always check registry for actual storage location
✓ Metadata files only exist if OneDrive enabled
✓ SyncDiagnostics.log may contain file metadata
⚠️ Some files only stored in cloud (not local)
✓ Deleted items: Recycle bin for 30 days (personal) / 93 days (business)
✓ OneDrive for Business: Unified Audit Logs = 90 days of activity
PowerShell - Check OneDrive Status:
USB to OneDrive Scenario:
Forensic Value:
Advanced Investigation Techniques
Complete USB Device Timeline Reconstruction
Step-by-Step Process:
1. Identify All Devices:
2. Extract All Timestamps:
3. Determine Drive Letter Assignment:
4. Extract Volume Serial Number:
5. User Attribution:
6. File Access Analysis:
7. Create Master Timeline:
8. Correlation & Analysis:
USB Device Identification Cheat Sheet
Quick Device Info Extraction:
LNK File to USB Device Mapping
Workflow:
LECmd CSV Output Columns of Interest:
Cross-Artifact Correlation Matrix
USBSTOR
Device ID, Serial
SCSI, MountedDevices
Install/Last/Removal
Properties 0064/0066/0067
Timestamps
Device serial
Precise (FILETIME)
setupapi.dev.log
First install
Serial number
Local timezone
Event 1006
All connections, VSN
Device, VSN, Timeline
Precise
MountedDevices
Drive letter, Serial
Device serial, GUID
Last only
MountPoints2
User, GUID
User, Device
Key write time
LNK Files
VSN, Files, Path
Device via VSN
Create/Modify
EMDMgmt
VSN
Serial, VSN
N/A
Investigation Checklists
Initial USB Triage Checklist
[ ] Identify all user accounts on system
[ ] Document system OS version and build
[ ] Record current date/time and timezone
[ ] Export SYSTEM registry hive
[ ] Export SOFTWARE registry hive
[ ] Export all user NTUSER.DAT files
[ ] Copy setupapi.dev.log
[ ] Copy Partition/Diagnostic.evtx
[ ] Copy System.evtx and Security.evtx
[ ] Collect all user Recent folders (LNK files)
USB Device Enumeration
[ ] Parse USBSTOR registry
[ ] Parse USB registry
[ ] Parse SCSI registry
[ ] Parse HID registry (peripherals)
[ ] Document all device serials
[ ] Check for "&" in serial (non-unique)
[ ] Extract ParentIdPrefix values
[ ] Cross-reference USBSTOR ↔ SCSI
Timestamp Extraction
[ ] Extract Properties 0064, 0066, 0067
[ ] Convert FILETIME to readable dates
[ ] Parse setupapi.dev.log (first install)
[ ] Extract Event 1006 from Partition log
[ ] Compile device timeline
[ ] Document timezone for all timestamps
[ ] Cross-validate timestamps
Drive Letter & Volume Analysis
[ ] Parse MountedDevices
[ ] Map drive letters to serials
[ ] Extract Windows Portable Devices
[ ] Get volume names/labels
[ ] Extract VSN from EMDMgmt (if present)
[ ] Extract VSN from Event 1006
[ ] Extract VSN from LNK files
[ ] Create VSN → Device mapping table
User Attribution
[ ] For each user NTUSER.DAT:
[ ] Parse MountPoints2
[ ] Extract Volume GUIDs
[ ] Match to MountedDevices
[ ] Document user → device access
[ ] Note MountPoints2 last write times
[ ] Identify shared device access
File Access Investigation
[ ] Collect all LNK files (all users)
[ ] Parse with LECmd to CSV
[ ] Filter for DriveType = "Removable"
[ ] Extract Volume Serial Numbers
[ ] Match VSNs to USB devices
[ ] List files per device per user
[ ] Extract file timestamps
[ ] Check for deleted file evidence
OneDrive Investigation (if applicable)
[ ] Check OneDrive enablement per user
[ ] Document local storage paths
[ ] Collect SyncDiagnostics.log
[ ] Review sync logs for USB files
[ ] Check cloud recycle bin (30-93 days)
[ ] Request Unified Audit Logs (Business)
[ ] Correlate USB file → Cloud sync
Event Log Analysis
[ ] Extract Event 20001, 20003 (System)
[ ] Extract Event 4663, 4656, 6416 (Security)
[ ] Extract Event 1006 (Partition/Diagnostic)
[ ] Create event timeline
[ ] Correlate with registry timestamps
[ ] Document all connect/disconnect events
Timeline & Reporting
[ ] Build master USB device timeline
[ ] Document first/last connection per device
[ ] List all files accessed per device
[ ] Map users to devices
[ ] Identify sensitive file access
[ ] Create evidence summary
[ ] Generate visual timeline
[ ] Prepare findings report
Essential DFIR Tools
Registry Analysis
LNK File Analysis
Event Log Analysis
USB-Specific Tools
Comprehensive Suites
Timeline Tools
Quick Command Reference
PowerShell USB Investigation Script
Batch USB Parsing Script
Timeline Creation with Plaso
Common Forensic Scenarios
Scenario 1: Data Exfiltration via USB
Investigation Steps:
Scenario 2: Unauthorised USB Device
Investigation Steps:
Scenario 3: Deleted File Recovery from USB
Investigation Steps:
Scenario 4: Malware Delivery via USB
Investigation Steps:
Investigation Gotchas & Notes
USB Device Serial Numbers
Timestamps
Drive Letter Assignments
Volume Serial Numbers
LNK Files
Event Logs
OneDrive
Best Practices
Evidence Preservation
Analysis Methodology
Reporting
Critical Principles:
Volume Serial Number (VSN) is the key to linking devices to files
Cross-artifact correlation is essential for accurate attribution
Timestamps come from multiple sources with different precisions
LNK files are the most reliable source for file access evidence
Always document timezone for all timestamps
User attribution requires MountPoints2 analysis
Key Evidence Chain: Device Serial → Drive Letter → VSN → LNK Files → Specific Files → User Attribution
Last updated