USB Device Forensics: Tracing Drives, Users and Files
Identify every USB drive connected to a Windows host, date its connections, tie it to a user and prove which files were opened from it, step by step.
This guide takes you from "a USB drive was plugged in" to a defensible statement about which device it was, when it was connected, which user was logged on, and which files were opened from it. It covers the registry, text logs and event logs Windows 10 and 11 leave behind, what changed between versions, and a step-by-step workflow you can run on any case.
The identifiers you pivot on
USB investigations are an exercise in joining records that each hold a different identifier. Know these four before you start:
| Identifier | Example | Where it appears | Survives reformat? |
|---|---|---|---|
| Vendor ID / Product ID (VID/PID) | VID_0781&PID_5567 | Enum\USB, setupapi log, events | Yes (hardware) |
| Device serial number | 4C530001230518115455 | Enum\USBSTOR, Enum\USB, MountedDevices, EMDMgmt, events | Yes (hardware) |
| Volume GUID | {7c3e1a52-...} | MountedDevices, MountPoints2 | Per host, per volume |
| Volume serial number (VSN) | A4F2-19C0 | EMDMgmt, Partition/Diagnostic 1006 (VBR), LNK, Jump Lists | No, changes on format |
The device serial identifies the hardware. The VSN identifies the file system on it, and it is the only identifier that LNK files and Jump Lists record. Most of the work is linking the two.
Device identification in the SYSTEM hive
All paths below are under SYSTEM\ControlSet00x\; check Select\Current to know which control set was active.
Enum\USBSTOR
Mass storage devices appear under Enum\USBSTOR\Disk&Ven_<vendor>&Prod_<product>&Rev_<revision>\<serial>. For example:
Enum\USBSTOR\Disk&Ven_SanDisk&Prod_Cruzer_Blade&Rev_1.00\4C530001230518115455&0
The &0 suffix is a logical unit number added by Windows, not part of the hardware serial. Useful values in the serial key include FriendlyName and ContainerID.
If the second character of the serial is & (for example 7&2a1b3c4d&0), the device did not expose a unique serial number and Windows generated one. That ID is not stable across hosts, so you cannot use it to say "the same stick was plugged into both machines".
Enum\USB
Enum\USB\VID_xxxx&PID_yyyy\<serial> holds every USB device, not only storage: keyboards, phones, hubs. The serial here matches the USBSTOR serial (without the &0), which gives you the VID/PID for a storage device. ContainerID links related entries across Enum subtrees.
Connection timestamps (Windows 8 and later)
Under each device instance key, the Properties\{83da6326-97a6-4088-9453-a1923f573b29} subkey holds numbered subkeys whose value is a FILETIME in UTC:
| Subkey | Meaning | Windows |
|---|---|---|
0064 | First install | 7 and later |
0065 | Install date (most recent driver install) | 7 and later |
0066 | Last arrival (last connection) | 8 and later |
0067 | Last removal | 8 and later |
These keep only the first and most recent events. On a live system the Properties key is readable only with SYSTEM privileges, which is one reason to work from a collected hive. On Windows 7, fall back to key LastWrite times and the setupapi log, and treat them as approximations.
MountedDevices
SYSTEM\MountedDevices maps drive letters (\DosDevices\E:) and volume GUIDs (\??\Volume{GUID}) to devices. For removable media the value data is a UTF-16 string containing the USBSTOR device path and serial, which lets you tie a serial to a drive letter and, crucially, to a volume GUID. Drive letters are reassigned over time, so the current letter says nothing about which letter the device had during the incident.
SOFTWARE hive: Portable Devices and EMDMgmt
SOFTWARE\Microsoft\Windows Portable Devices\Devices lists devices with a FriendlyName, which for storage is often the volume label the user saw, and for phones the device name ("Galaxy S23"). The subkey name embeds the device serial.
SOFTWARE\Microsoft\Windows NT\CurrentVersion\EMDMgmt is maintained by ReadyBoost. Its subkey names contain the device path, the volume label and a trailing number that is the VSN in decimal; convert it to hex to compare with LNK files. Availability varies: EMDMgmt is typically not populated when the system drive is an SSD, which covers most modern machines, so do not rely on it.
# Convert an EMDMgmt decimal volume serial to the XXXX-XXXX form used by LNK parsers
$vsn = 2767329728
'{0:X8}' -f $vsn -replace '(.{4})(.{4})', '$1-$2'
User attribution with MountPoints2
The SYSTEM and SOFTWARE hives are machine-wide. To tie a device to a person, open each user's NTUSER.DAT and look at:
NTUSER.DAT\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\{volume GUID}
If the volume GUID from MountedDevices appears here, the volume was mounted while that user was logged on interactively. The subkey LastWrite approximates the last time it was mounted in that user's session. Map the profile to its SID through ProfileList and confirm the logon with Security events. MountPoints2 also records network shares as ##server#share, which helps when data left by another route.
setupapi.dev.log: first installation
C:\Windows\INF\setupapi.dev.log (on XP, C:\Windows\setupapi.log) records driver installation. The first time a device is seen, you get a block like:
>>> [Device Install (Hardware initiated) - USBSTOR\Disk&Ven_SanDisk&Prod_Cruzer_Blade&Rev_1.00\4C530001230518115455&0]
>>> Section start 2026/09/14 09:12:33.412
The section start time is in the host's local time, unlike the registry, so convert it (see UTC and local time). The log rolls over into setupapi.dev.<date>.log files on some systems and is recreated by feature updates, so collect every setupapi*.log in the folder.
Select-String -Path C:\Windows\INF\setupapi.dev*.log -Pattern 'USBSTOR' -Context 0,1
Event logs: every connection, not just first and last
The registry keeps first and last. Event logs give you individual connections, as long as they have not rolled over.
| Channel | Event ID | What it gives | Notes |
|---|---|---|---|
Microsoft-Windows-Partition/Diagnostic | 1006 | Device make, model, serial, capacity, partition table, raw VBR bytes | Windows 10 and 11; logged on connection (removals typically produce a 1006 with empty partition data) |
Microsoft-Windows-Kernel-PnP/Configuration | 400, 410 | Device configured / started, with the device instance ID | Useful to date connections of any USB device |
Microsoft-Windows-DriverFrameworks-UserMode/Operational | 2003, 2100, 2102 and related | Driver load and device connect / disconnect sequence | Disabled by default on recent builds; valuable on older systems where it was enabled |
Security | 6416 | New external device recognized | Only with "Audit PNP Activity" enabled |
Partition/Diagnostic 1006 is the most valuable of these because it can include the volume boot record of each partition. The VSN sits at a fixed offset in the VBR (0x43 for FAT32, 0x48 for NTFS, 0x64 for exFAT), so you can recover the VSN from the event and link a hardware serial directly to LNK files, even when EMDMgmt is empty. The channel is small and rolls over quickly, so check its oldest record before drawing conclusions from absence. Exact field names vary by build, so verify against the event XML rather than trusting a single parser's column names.
# Parse only the USB-relevant events from a collected log folder
EvtxECmd.exe -d E:\case\C\Windows\System32\winevt\Logs --csv E:\out\evtx --inc 1006,400,410,2003,2100,2102,6416
# Quick look on a live system
Get-WinEvent -FilterHashtable @{ LogName = 'Microsoft-Windows-Partition/Diagnostic'; Id = 1006 } |
Select-Object TimeCreated, Id, Message -First 20
The EVTX Parser is handy for inspecting a single exported channel in the browser.
From device to files: VSN, LNK, Jump Lists and ShellBags
Once you have the VSN, pivot into the user activity artifacts (covered in depth in ShellBags, LNK files and Jump Lists):
- LNK files: filter LECmd output on
DriveSerialNumberequal to the VSN andDriveTyperemovable. Each hit is a file opened from that volume, with the path, the target's timestamps and the shortcut's own created/modified times. - Jump Lists: the same fields in JLECmd output, plus the application used and the DestList last access time.
- ShellBags: folders browsed on the drive letter the device had during the connection window. ShellBags do not store the VSN, so link them by drive letter and time.
- OpenSavePidlMRU and LastVisitedPidlMRU: files saved to, or selected from, the drive letter in open/save dialogs.
# LNK and Jump List entries on a given volume serial
LECmd.exe -d E:\case\C\Users --csv E:\out\lnk
JLECmd.exe -d E:\case\C\Users --csv E:\out\jl
Import-Csv (Get-ChildItem E:\out\lnk\*.csv).FullName | Where-Object { $_.DriveSerialNumber -match 'A4F219C0|A4F2-19C0' }
Note what this does and does not show. A LNK proves a file was opened from the drive. It does not prove a file was copied to it; copying through Explorer creates no LNK. For copies, look at the $MFT and USN journal on the source volume, OpenSavePidlMRU for "Save As" to the drive, and, if you have the device itself, the file system timestamps on it.
When you have the device itself
If the drive is seized, close the loop from the other side. Connect it through a write blocker and image it before anything else. Read the hardware serial from the USB descriptors (on a Linux examination host, lsusb -v or udevadm info shows iSerial) and compare it with USBSTOR. Read the VSN from the VBR of each partition and compare it with the LNK and Jump List hits. Then check the file system on the device: files whose names match the LNK targets, and their created times on the device, which on a copy typically reflect when the copy landed there. A matching serial, a matching VSN and matching file names turn a registry inference into physical corroboration. If the VSN does not match but the serial does, the drive was reformatted after the files were opened.
# Hardware serial and VID/PID of an attached device, from a Linux examination host
lsusb -v 2>/dev/null | grep -E 'idVendor|idProduct|iSerial'
MTP phones and cameras
Phones connected in file transfer mode use Media Transfer Protocol. They appear under Enum\USB (and under a SWD\WPDBUSENUM entry), in Windows Portable Devices with their friendly name, and in Kernel-PnP events, but not under USBSTOR and without a drive letter or VSN. ShellBags are the best record of browsing: paths such as Galaxy S23\Internal storage\DCIM\Camera. LNK files for items opened directly from an MTP device are less consistent than for mass storage, so do not treat their absence as meaningful.
Building the exfiltration narrative
A convincing USB exfiltration finding usually has five parts:
- The device: vendor, product, serial (unique, not
&-generated), VID/PID. - The window: first install, connection times from 1006 or Kernel-PnP, last arrival and removal from
0066/0067. - The user:
MountPoints2in their profile, a matching interactive logon. - The data: LNK and Jump List entries with the device VSN, ShellBags on its drive letter, dialog MRUs pointing to it, and source-side file system activity inside the window.
- The absence of alternatives: no other user session, no remote access at that time.
Write each timestamp with its meaning and time zone, and state the limits: "last arrival" is the last one, not the only one.
Pitfalls
- Feature updates wipe history. Major Windows upgrades can remove USBSTOR entries and recreate setupapi logs. Check
Windows.old, volume shadow copies andSYSTEM\Setup\Upgrade\Pnp\CurrentControlSet\Control\DeviceMigrationbefore concluding a device was never used. - Assuming the current drive letter. Letters change; use the mapping valid during the window.
- Comparing Windows-generated serials across hosts. They are not hardware identifiers.
- Mixing time zones. Registry and events are UTC; setupapi is local time.
- Expecting DriverFrameworks-UserMode logs. They are off by default on recent builds.
- Treating a reformatted drive as a different drive. The VSN changes on format; the hardware serial does not.
- Not parsing registry transaction logs. Recent device activity may only be in
SYSTEM.LOG1/.LOG2.
Tools
- Registry Explorer and RECmd (Eric Zimmerman): bookmarks for USBSTOR, MountedDevices and MountPoints2; RECmd batch files dump them to CSV.
- EvtxECmd: maps for Partition/Diagnostic and Kernel-PnP events.
- USB Detective: automates correlation across registry, setupapi, events, LNK and Jump Lists; the commercial editions go further than the community edition.
- RegRipper:
usbstor,usb,mountdev,mp2plugins for quick text reports. - The browser parsers on this site, such as the Registry Parser, for single hives.
RECmd.exe -d E:\case\C --bn .\BatchExamples\RECmd_Batch_MC.reb --csv E:\out\registry
Step-by-step workflow
- Collect:
SYSTEM,SOFTWAREand their logs, everyNTUSER.DAT,C:\Windows\INF\setupapi*.log, the event logs, each profile'sRecentfolder, and shadow copies. The triage guide lists the KAPE targets. - Inventory devices: list USBSTOR and USB entries with serials, VID/PID and friendly names; flag Windows-generated serials.
- Date them:
0064to0067, setupapi first install (converted to UTC), then every 1006 and Kernel-PnP event. - Map volumes:
MountedDevicesfor drive letters and volume GUIDs; VSN from 1006 VBR data or EMDMgmt. - Attribute: find the volume GUID in each user's
MountPoints2, map the profile to a SID, confirm the logon. - Find the files: LNK and Jump List entries matching the VSN, ShellBags on the drive letter, dialog MRUs, and source-side $MFT/USN activity inside the connection window.
- Report: a UTC timeline with each timestamp's meaning, the identifiers linking each step, and the gaps you could not close.
For the broader registry context behind these keys, see Windows registry forensics, and for the full USB key reference, the USB devices cheat sheet.
Area 09
USB & External Devices
The artifact cheat sheets behind this guide: location by Windows version, what each one proves and the tools to parse it.