Digital Forensic Tools
Home / Workflows / USB drive history on Windows
Case workflow

Was a USB drive connected to this Windows computer?

Windows keeps a record each time a USB storage device is plugged in. This workflow shows how to find which device it was, when it was connected, which drive letter and volume name it had, which user account used it, and which files were opened from it.

This workflow was written from the tools' documentation and published references. It has not yet been checked step by step on the practice data. If a step does not match what you see, please report it.

What you will be able to answer

  • Which USB storage devices were connected (make, model, serial number)
  • When each one was first and last connected
  • Which drive letter and volume name it had
  • Which user account had it mounted
  • Which files or folders were opened from it

What you need

  • A forensic image of the Windows computer, or a practice image (see the practice section on this page)
  • A Windows workstation for the analysis tools. Eric Zimmerman's tools now need the .NET 10 runtime, or .NET Framework 4.7.2 for the command-line versions
  • Free disk space of about three times the image size

Steps

  1. 1

    Work on an image, never the original

    If you start from a real disk, image it through a write blocker and write down the hash value. Every later step uses the image or a copy of it. In FTK Imager, use File, Add Evidence Item, Image File to browse an image read-only. For practice, download the public image and compare its hash with the values the case publishes.

  2. 2

    Get a first answer with Autopsy

    Create a case, add the image as a data source and run the Recent Activity module. Open the result list named USB Device Attached (older versions call it Devices Attached). Each row gives the make, model and device ID, with a date and time. Autopsy's own page describes the module as a view of recent activity, so an old device can be missing. Treat the list as leads to confirm in the next steps.

    ToolsAutopsy
  3. 3

    Export the files that hold the evidence

    Copy these files out of the image. In Autopsy, right-click a file and choose Extract File(s). Export the transaction logs that sit next to each hive (names ending .LOG1 and .LOG2). They hold the newest registry changes, and Eric Zimmerman's tools read them when you open a hive that was not closed cleanly. Export one NTUSER.DAT and one UsrClass.dat for each user.

    Windows\System32\config\SYSTEM (and SYSTEM.LOG1, SYSTEM.LOG2)Windows\System32\config\SOFTWARE (and its .LOG files)Users\<user name>\NTUSER.DAT (and its .LOG files)Users\<user name>\AppData\Local\Microsoft\Windows\UsrClass.datUsers\<user name>\AppData\Roaming\Microsoft\Windows\RecentWindows\INF\setupapi.dev.logWindows\System32\winevt\Logs\System.evtxWindows\System32\winevt\Logs\Microsoft-Windows-Partition%4Diagnostic.evtx
  4. 4

    Identify the device

    Open SYSTEM in Registry Explorer. First read Select\Current to see which control set was in use (often 1, shown as ControlSet001). Under Enum\USBSTOR, each sub-key is a model, such as Disk&Ven_SanDisk&Prod_Cruzer_Fit&Rev_..., and the key below it is the instance ID: the serial number followed by &0. If the second character of the instance ID is &, Windows made it up, so it is not a unique serial number. Enum\USB gives the vendor and product ID.

    rip.exe -r "C:\case\export\SYSTEM" -p usbstor > usbstor.txt
    SYSTEM\SelectSYSTEM\ControlSet001\Enum\USBSTORSYSTEM\ControlSet001\Enum\USB

    The rule about the second character is common practice, but a SANS article calls it not exactly correct. Docks and adapters can also change the value Windows reports. Verify against the physical drive label when you can.

  5. 5

    Find the drive letter and volume name

    In SYSTEM, MountedDevices has one value per drive letter, named like \DosDevices\E:. Its data is text that starts with \??\STORAGE#RemovableMedia# and holds the device's ParentIdPrefix, which links it to the device. It keeps only the last device that used each letter. For the volume label, look at the friendly name under Windows Portable Devices in SOFTWARE, and at Windows Search\VolumeInfoCache, which has a key per drive letter with a VolumeLabel value.

    SYSTEM\MountedDevicesSOFTWARE\Microsoft\Windows Portable Devices\DevicesSOFTWARE\Microsoft\Windows Search\VolumeInfoCache
  6. 6

    Work out when it was connected

    Search setupapi.dev.log for the serial number. The header line above it, in square brackets, holds the date and time Windows first installed the device, in the computer's local time. On Windows 8 and later, the device's Properties key (GUID 83da6326-97a6-4088-9453-a1923f573b29) has sub-keys 0064 install, 0065 first install, 0066 last arrival and 0067 last removal, stored in UTC. Registry Explorer shows them as dates.

    Windows\INF\setupapi.dev.logSYSTEM\ControlSet001\Enum\USBSTOR\<model>\<instance ID>\Properties\{83da6326-97a6-4088-9453-a1923f573b29}

    Registry times are UTC. setupapi.dev.log uses local time. Read the time zone from SYSTEM\ControlSet001\Control\TimeZoneInformation and write it down before you compare them. NirSoft warns that on Windows 7 the last-write time of the device key can change at every reboot, so do not use it as a connect time.

  7. 7

    Add the event logs

    On Windows 10 and later, the Partition/Diagnostic log has event 1006 for each connect. It can hold the manufacturer, model, serial number and a copy of the volume boot record. The volume serial number is 4 bytes, stored little-endian, at offset 0x48 for NTFS, 0x43 for FAT32 and 0x64 for exFAT. On Windows 7, System.evtx has UserPnp events 20001 and 20003 for device installs. Parse the logs with EvtxECmd and open the CSV in Timeline Explorer.

    EvtxECmd.exe -f "Microsoft-Windows-Partition%4Diagnostic.evtx" --csv "C:\case\out" --csvf partition.csv

    Major Windows updates can clear the Partition/Diagnostic log. The DriverFrameworks-UserMode Operational log can also hold device events, but it is often not switched on.

  8. 8

    Link the device to a user and to opened files

    Open each NTUSER.DAT and look at MountPoints2. If the volume GUID from MountedDevices is there, that account was logged in while the volume was mounted. Treat this as supporting evidence only. For files opened from the drive, parse the Recent folder with LECmd and its -r option, which keeps only shortcuts that point to removable drives. Match the volume serial number inside each shortcut with the one from step 7. Shellbags in NTUSER.DAT and UsrClass.dat show folders browsed.

    LECmd.exe -d "C:\case\export\Recent" -r --csv "C:\case\out"
    NTUSER.DAT\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2Users\<user name>\AppData\Roaming\Microsoft\Windows\Recent
  9. 9

    Cross-check and write it down

    Read the same SYSTEM hive with a second tool. NirSoft USBDeview can load an exported hive from the command line (below). Compare make, model and serial number with your first list. In your notes, record the tool name and version, the file each value came from, and the time zone.

    USBDeview.exe /regfile "C:\case\export\SYSTEM"

Where the evidence is stored

USBSTOR and USBSYSTEM hive, Enum
Vendor, product, revision and serial number (instance ID) of each USB storage device
Properties timestamps 0064 to 0067SYSTEM hive, under each device (Windows 8 and later)
Install, first install, last arrival and last removal times in UTC
MountedDevicesSYSTEM hive
The last device that used each drive letter, and the volume GUIDs
Windows Portable Devices and VolumeInfoCacheSOFTWARE hive
Friendly name and volume label of the drive
MountPoints2NTUSER.DAT of each user
Which user account had the volume mounted (supporting evidence)
setupapi.dev.logWindows\INF
First time the device was installed, in local time
Partition/Diagnostic log, event 1006Windows event logs (Windows 10 and later)
Each connect, with manufacturer, model, serial number and volume boot record
LNK files, jump lists, shellbagsUser profile and user registry hives
Files and folders opened, with drive letter and volume serial number

Check your result

  • Read the same SYSTEM hive with RegRipper and with USBDeview, and compare make, model and serial number.
  • Check that the serial number in USBSTOR also appears in setupapi.dev.log, and on Windows 10 in event 1006.
  • Match the volume serial number inside a shortcut file with the one in the volume boot record. If you have the physical drive, read its volume serial number through a write blocker.
  • Compare your list with the Autopsy list. Look into every device that only one of them shows.

Common mistakes

  • Comparing registry times (UTC) with setupapi.dev.log times (local time) without converting one of them.
  • Reading ControlSet001 without checking Select\Current, and so looking at an old control set.
  • Exporting a hive without its .LOG1 and .LOG2 files, which can leave out the newest entries.
  • Treating a serial number with & as the second character as one unique drive.
  • Writing that files were copied because a device was connected.

Write it up

A short, careful way to state this kind of finding in a report. Change the details to match your own results.

The SYSTEM registry hive of the examined image (hash <hash>) holds a record of a USB storage device, vendor <vendor>, product <product>, instance ID <serial>. Windows first installed it on <date and time> (<time zone>) and the record shows it was last connected on <date and time>. This shows that the device was connected. It does not show who connected it or what was copied.

What this does not prove

  • A device record shows that a device was connected. It does not show who physically plugged it in.
  • It does not show that files were copied. Copying needs its own evidence, such as opened-file records or an examination of the USB drive itself.
  • Records can be missing. Cleaning tools remove them, and the Partition/Diagnostic log can be cleared by major Windows updates.
  • Some sources keep only the first and the last time, not every connection. MountedDevices keeps only the last device for each drive letter.
  • The serial number Windows shows may belong to a dock, adapter or enclosure, or may be made up by Windows. Two drives can then look the same.
  • Phones and cameras that connect as media devices leave different traces from USB storage drives.
  • Key names, event logs and timestamps change between Windows versions. Check what applies to the version you are examining.

Practise on public data

NIST CFReDS: Data Leakage Case

by NIST

A simulated intellectual property theft on a Windows 7 computer. The PC image is about 5 GB to download as a compressed DD image, or about 7.3 GB in E01 format. The case also has small images of the removable media: RM#2, a USB drive, is about 243 MB as E01. NIST publishes an answer document, so you can check your result. The page was online when this workflow was reviewed.

Your task. Answer question 22 of the case: "External storage devices attached to PC." Use steps 4 to 6 to list each device with its serial number, volume name and first connected time. You should end with two devices. Then compare with the published answers, which give times in US Eastern time. Optional: open the RM#2 image and match its volume serial number with a shortcut file on the PC.

The practice computer runs Windows 7, so the Properties timestamps and the Partition/Diagnostic log in steps 6 and 7 will not be there. Use setupapi.dev.log, MountedDevices, the VolumeInfoCache key and the UserPnp events in System.evtx instead.

Where to go next

Sources and further reading

A study guide written in our own words. It is not a legal or laboratory procedure. Follow your own lab's approved method on real cases. Last reviewed 24 Nov 2026.