Add NirSoft_USBDriveLog module - #1124
Merged
Merged
Conversation
AndrewRathbun
approved these changes
Sep 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a new KAPE module,
NirSoft_USBDriveLog, which parses theMicrosoft-Windows-Partition/DiagnosticandMicrosoft-Windows-Storsvc/Diagnosticevent log channels (on by defaulton Windows 10/11) into a plug/unplug history for USB storage devices,
using Nirsoft's
USBDriveLog.exe.Sourced from the maintainers' own "NirSoft Module To Do List" (the
usb_drive_log.htmlitem). This is a different artifact from theexisting
USBDeviewmodule: USBDeview lists devices that have ever beenconnected to the system (a historical inventory), while USBDriveLog is a
timestamped log of individual plug/unplug events - when a specific
device was connected and disconnected, not just that it was connected at
some point. Both have real, complementary evidentiary value.
Verified directly against NirSoft's own documentation that the tool's
offline "external folder" data source (for loading an already-collected
copy of the event logs) is GUI-only - accessed via the "Choose Data
Source" window (F7), no command-line switch exposes it. Same pattern
already hit with RecentFilesView's "external source" loading. So this is
Category: LiveResponse, matching the shape of the existingTaskSchedulerView/ExecutedProgramsList/RecentFilesView/MyLastSearch
modules.
Requires Windows 10/11, since the two source event log channels don't
exist on earlier versions.
Testing
a fresh, verifiable event.
.\kape.exe --msource C: --mdest <output> --module NirSoft_USBDriveLog --debugSanDisk Cruzer Fit flash drive, external HGST hard drives, etc.).
pre-existing evidentiary value, not just the manufactured test
event.
correctly with no Unplug Time yet recorded - confirming it captured
the live event mid-connection.
Checklist:
Please replace every instance of
[ ]with[X]OR click on the checkboxes after you submit your PRGUIDfor my Target(s)/Module(s)Miscfolder or created a relevant subfolder with justification--tlist/--mlistand corrected any errorsN/Aunderneath the Documentation header