SkillsReviewed · mukul975

Analyzing USB Device Connection History

Analyzing USB Device Connection History is an AI assistant skill for Windows forensic investigators, but its Python helper produces a partial timeline with unverified timestamp labels. It combines investigation instructions with registry and installation-log parsing code. Drive mappings and installation records are not incorporated into the exported timeline, and the helper does not parse event logs.

Researched 17 Nov 2026

In short.

Analyzing USB Device Connection History is an AI assistant skill for Windows incident responders and forensic developers, but its implementation leaves several documented correlations incomplete. The helper reads USBSTOR device records, selected drive mappings and optional per-user volume records, then exports a CSV and prints a JSON summary. SetupAPI installation records are only counted, and event-log parsing appears only in documentation examples. Registry modification times are labelled as connection or access events without corroboration. Runtime correctness, forensic accuracy and compatibility remain unassessed.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage includes all supplied files in skills/analyzing-usb-device-connection-history: SKILL.md, scripts/agent.py, references/api-reference.md and LICENSE, plus the repository-root LICENSE, at revision 54a798831d2266a3ca61ce68a7acb80b81160d57. It excludes other repository skills, external reference contents, dependency implementations and forensic case data. Findings concern the supplied text and visible implementation only; installation, assistant loading, runtime behavior, Windows compatibility and forensic accuracy were not tested.

The overview

Identity

The resource is the analyzing-usb-device-connection-history folder in mukul975/Anthropic-Cybersecurity-Skills. It contains SKILL.md, scripts/agent.py, references/api-reference.md and a local Apache licence. Original source: [https://github.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/analyzing-usb-device-connection-history].

SKILL.md declares version 1.0 and author mahipal; the licence notices name copyright holder mukul975. An official Anthropic relationship is not established by the supplied files. The Python helper is a local command-line parser with no model invocation or assistant-host integration.

Assessment

The useful starting point is its concrete map of Windows USB artifacts and readable extraction code. An investigator can see which registry keys are consulted, how device fields are extracted and which records enter the CSV.

Its forensic conclusions need more care than its output labels suggest. The code calls registry key modification times last_connected and last_accessed, then labels timeline events Last Connected and Volume Accessed. The supplied material does not validate those interpretations. The helper therefore supports artifact inspection, while reliable event reconstruction still requires independent corroboration.

Users

The documented audience includes incident responders investigating removable-media use, insider threats, policy violations and possible data exfiltration. Developers building forensic assistants may also find the artifact descriptions and small Python functions useful.

Beginners need background in registry hives, device identifiers and timestamp interpretation. Experienced investigators should expect manual correlation: the helper does not establish file transfers, match devices against an approved inventory or attribute an action to a named user.

Capabilities

The helper enumerates USBSTOR entries from a SYSTEM hive and extracts vendor, product, revision, instance identifier and optional friendly name. It also extracts selected drive-letter mappings from MountedDevices. An optional NTUSER.DAT supplies MountPoints2 volume identifiers and key modification times.

An optional setupapi.dev.log is searched for device-installation entries, but only their count is printed. The exported timeline contains USBSTOR and MountPoints2 rows. Drive mappings appear in the console JSON summary but are not joined to those rows. Event-log parsing and broader investigative correlations are documented examples, not implemented helper capabilities.

Using it

Requirements

The helper requires Python 3, the regipy library, a readable SYSTEM registry hive and a writable output directory. It accepts one optional NTUSER.DAT and one optional SetupAPI log. It does not acquire a forensic image or extract these artifacts itself.

The broader instructions additionally discuss SOFTWARE, Windows event logs and specialist forensic tools. Their inline registry examples import Registry.Registry, while the helper uses regipy.registry.RegistryHive; the event-log example imports evtx.PyEvtxParser. No dependency versions, lockfile, supported Windows-version matrix or model requirements are supplied.

Mechanism

The helper reads Select/Current from SYSTEM to choose the active control set, then walks its USBSTOR key. It splits device-class names into vendor, product and revision fields and records each instance key's last-modified value. MountedDevices values qualify as USB mappings only when they are byte strings longer than 24 bytes that decode as UTF-16LE and contain USBSTOR or USB#.

MountPoints2 subkeys containing an opening brace become volume records. The timeline combines those records with USBSTOR entries and sorts their timestamp strings. Although build_timeline receives drive mappings, it does not use them. SetupAPI parsing is separate and does not contribute records to the timeline or JSON report.

Setup

Obtain the complete skill folder so the helper and reference material accompany SKILL.md. Prepare Python 3 with regipy and supply separately extracted forensic artifacts. No supported assistant host, activation procedure or compatible dependency version is documented.

A source-derived command example is: python3 scripts/agent.py --system-hive /cases/example/SYSTEM --ntuser /cases/example/NTUSER.DAT --setupapi-log /cases/example/setupapi.dev.log --output-dir /cases/example/usb_analysis --case-id CASE-001. This example has not been executed.

Adapt the document's acquisition examples to the actual image layout: its mount command assumes a partition offset of 2048 sectors of 512 bytes. Preserve separate, identifiable filenames for each user's NTUSER.DAT; copying multiple same-named hives into one directory creates filename collisions.

Example

For an investigation of removable-media use, the SYSTEM hive supplies device inventory and selected drive mappings. Adding one user's NTUSER.DAT supplies volume records; adding setupapi.dev.log requests installation-log parsing. The intended outputs are usb_timeline.csv and a JSON summary printed to standard output.

The CSV fields are timestamp, source, device, serial, event and detail. The JSON contains case_id, total_devices, devices, drive_mappings and timeline_events. The device names, dates and suspicious findings shown in SKILL.md are illustrative output, not measured results. The helper does not calculate the repeated connection counts or suspicious activity judgments shown in that example.

Assessment & evidence

Limitations

The helper does not reconstruct a complete plug-and-unplug history. It neither parses Windows event logs nor correlates file activity with device records. SetupAPI matching returns installation entries without choosing an earliest entry per device, and those entries are discarded after their count is printed. The single-user input and volume-only timeline rows also limit user attribution.

Registry modification times are assigned connection and access meanings without validation. Drive-letter extraction covers only the specific encoded representation accepted by its heuristic. Timezone normalization and cross-artifact timestamp validation are absent.

Some USBSTOR and MountPoints2 lookup failures become empty lists, while a missing MountedDevices key is not handled. If the timeline is empty, the export function writes no CSV, but the main routine still prints an export message. Runtime effects and frequency of these cases are unknown.

Reasoning

The main usefulness judgment follows from the visible data flow: device inventory, drive mappings and user-volume records are extracted, but only two record types reach the timeline. This supports using the resource as an investigation starting point with readable implementation details.

The interpretation limits follow from the same code. A field named last_connected is populated directly from a registry modification timestamp, and a parsed installation list never reaches the report. Those implementation choices do not establish actual last connections, first connections or file transfers. No supplied case data or validation results close those gaps.

Alternatives

The document names USB Forensic Tracker and USBDeview for device-history inspection, RegRipper's usbstor plugin for registry extraction, and Registry Explorer for interactive analysis. It also names KAPE for artifact collection and Plaso/log2timeline for timeline construction.

These address different parts of an investigation. The supplied material contains no comparative results, current pricing or compatibility evidence, so it does not support ranking them against this helper. The API reference's regipy examples provide another way to inspect registry data, but are not a complete replacement investigation workflow.

Evidence

The source material comprises the complete supplied SKILL.md, scripts/agent.py, references/api-reference.md and matching Apache licence texts beside the skill and at repository root. The implementation supports the findings about arguments, parsing, output fields and missing correlations; documentation establishes the intended investigation scope.

The supplied scope contains no forensic case artifacts, expected-output fixtures, test suite, benchmarks or execution transcripts. Nothing was executed for this report. External references listed in api-reference.md are pointers; their contents and current availability were not assessed.

Access & freshness

Costs

The Apache licences grant no-charge copyright permissions and a qualifying patent licence under their terms. The helper contains no model calls or paid-service integration.

Total operating cost is unknown. The supplied files give no prices for assistant hosting, external forensic tools, evidence acquisition or storage, and no runtime or token-use measurements. Costs of any separately chosen tools or services must be established independently.

Rights

SKILL.md declares Apache-2.0, and both the folder-level and repository-root LICENSE files contain Apache License 2.0 with copyright 2026 mukul975. The licence permits use, modification and redistribution subject to its conditions.

Redistribution requires a copy of the licence, retention of applicable notices and prominent notices in modified files. Applicable NOTICE attribution must also be retained if such a file accompanies the work. The licence supplies no warranty and grants no general trademark permission. Rights and terms for separately obtained dependencies or forensic tools are not established here.

Freshness

The skill declares version 1.0. The supplied snapshot was captured on 17 November 2026 at revision 54a798831d2266a3ca61ce68a7acb80b81160d57. The corresponding source folder is [https://github.com/mukul975/Anthropic-Cybersecurity-Skills/tree/54a798831d2266a3ca61ce68a7acb80b81160d57/skills/analyzing-usb-device-connection-history].

The capture date does not establish the last substantive update. Release history, maintenance commitments, later changes and compatibility with current dependency releases are unknown.

Actions

Before relying on findings, validate the helper against known forensic artifacts and independently check the meaning of each timestamp. Preserve user-hive identity and correlate device identifiers, volume identifiers, installation records and event logs before attributing activity.

For developers extending the helper, the clearest improvements are to retain SetupAPI records, incorporate drive mappings into correlation, add event-log support, distinguish observed modification times from inferred events, and report missing artifacts and empty exports accurately. Dependency versions and expected-output fixtures would make behavior easier to verify.

Evidence for this report

LICENSEnotice · checked 2026-11-17