analyzing-usb-device-connection-history

analyzing-usb-device-connection-history is a skill for Claude Code, Codex from Youngmaidainon/Agent-Level-Up. It costs 74 tokens per session (3,377 once invoked), scanned A, a copy of analyzing-usb-device-connection-history, MIT.

A procedure for reconstructing when and how USB devices were connected to Windows computers from registry files, system logs, and setup records.

In plain words
What is it for?
Use it in incident response, insider-threat investigations, compliance checks, and timelines involving USB device connections and file copying.
Why use it?
It helps establish whether removable storage was used and connect device activity with possible data access or theft.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it in incident response, insider-threat investigations, compliance checks, and timelines involving USB device connections and file copying.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/youngmaidainon/agent-level-up/analyzing-usb-device-connection-history
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Youngmaidainon/Agent-Level-Up --skill analyzing-usb-device-connection-history
Clone the repo
git clone --depth 1 https://github.com/Youngmaidainon/Agent-Level-Up

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for analyzing-usb-device-connection-history

README.md
[![agentmods](https://agentmods.dev/badge/skills/youngmaidainon/agent-level-up/analyzing-usb-device-connection-history/github.svg)](https://agentmods.dev/skills/youngmaidainon/agent-level-up/analyzing-usb-device-connection-history)
Your own site
<a href="https://agentmods.dev/skills/youngmaidainon/agent-level-up/analyzing-usb-device-connection-history"><img src="https://agentmods.dev/badge/skills/youngmaidainon/agent-level-up/analyzing-usb-device-connection-history/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for analyzing-usb-device-connection-history

Your own site · 80×15
<a href="https://agentmods.dev/skills/youngmaidainon/agent-level-up/analyzing-usb-device-connection-history"><img src="https://agentmods.dev/badge/skills/youngmaidainon/agent-level-up/analyzing-usb-device-connection-history.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,377 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 81% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00074 $0.03377
Opus 5 $0.00037 $0.01688
Sonnet 5 $0.00015 $0.00675
Haiku 4.5 $0.00007 $0.00338

Measured 8d ago against content hash 0b6df7a267f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

analyzing-usb-device-connection-history scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/agent.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

81% identical to analyzing-usb-device-connection-history — 23 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

cyber-security/ctf/analyzing-usb-device-connection-history/SKILL.md · 372 lines

How it starts

The opening of the file, as written. The whole thing — 372 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Analyzing USB Device Connection History

When to Use

  • When investigating potential data exfiltration via removable storage devices
  • During insider threat investigations to track USB device usage
  • For compliance audits verifying removable media policy enforcement
  • When correlating USB connections with file access and copy events
  • For establishing a timeline of device connections during an incident

Prerequisites

  • Forensic image or extracted registry hives and event logs
  • Access to SYSTEM, SOFTWARE, and NTUSER.DAT registry hives
  • SetupAPI logs (setupapi.dev.log)
  • Windows Event Logs (System, Security, DriverFrameworks-UserMode)
  • USBDeview, USB Forensic Tracker, or RegRipper
  • Understanding of USB device identification (VID, PID, serial number)

Workflow

Step 1: Extract USB-Related Artifacts

# Mount forensic image and copy relevant artifacts
mount -o ro,loop,offset=$((2048*512)) /cases/case-2024-001/images/evidence.dd /mnt/evidence

mkdir -p /cases/case-2024-001/usb/

# Registry hives
cp /mnt/evidence/Windows/System32/config/SYSTEM /cases/case-2024-001/usb/
cp /mnt/evidence/Windows/System32/config/SOFTWARE /cases/case-2024-001/usb/
cp /mnt/evidence/Users/*/NTUSER.DAT /cases/case-2024-001/usb/

# SetupAPI logs (first connection timestamps)
cp /mnt/evidence/Windows/INF/setupapi.dev.log /cases/case-2024-001/usb/

# Event logs
cp /mnt/evidence/Windows/System32/winevt/Logs/System.evtx /cases/case-2024-001/usb/
cp "/mnt/evidence/Windows/System32/winevt/Logs/Microsoft-Windows-DriverFrameworks-UserMode%4Operational.evtx" \
   /cases/case-2024-001/usb/ 2>/dev/null
cp "/mnt/evidence/Windows/System32/winevt/Logs/Microsoft-Windows-Partition%4Diagnostic.evtx" \
   /cases/case-2024-001/usb/ 2>/dev/null

Step 2: Parse USBSTOR Registry Key

# Extract USBSTOR entries from SYSTEM hive
python3 << 'PYEOF'
from Registry import Registry
import json

reg = Registry.Registry("/cases/case-2024-001/usb/SYSTEM")

# Find current ControlSet
select = reg.open("Select")
current = select.value("Current").value()
controlset = f"ControlSet{current:03d}"

# Parse USBSTOR
usbstor_path = f"{controlset}\\Enum\\USBSTOR"
usbstor = reg.open(usbstor_path)

devices = []
print("=== USBSTOR DEVICES ===\n")

for device_class in usbstor.subkeys():
    # Format: Disk&Ven_VENDOR&Prod_PRODUCT&Rev_REVISION
    class_name = device_class.name()
    parts = class_name.split('&')
    vendor = parts[1].replace('Ven_', '') if len(parts) > 1 else 'Unknown'
    product = parts[2].replace('Prod_', '') if len(parts) > 2 else 'Unknown'
    revision = parts[3].replace('Rev_', '') if len(parts) > 3 else 'Unknown'

    for instance in device_class.subkeys():
        serial = instance.name()
        last_write = instance.timestamp()

        device_info = {
            'vendor': vendor,
            'product': product,
            'revision': revision,
            'serial': serial,
            'last_connected': str(last_write),
        }

        # Get friendly name if available
        try:
            friendly = instance.value("FriendlyName").value()
            device_info['friendly_name'] = friendly
        except:
            pass

        # Get device parameters
        try:
            params = instance.subkey("Device Parameters")
            try:
                device_info['class_guid'] = params.value("ClassGUID").value()
            except:
                pass
        except:
            pass

        devices.append(device_info)
        print(f"Device: {vendor} {product}")
        print(f"  Serial: {serial}")
        print(f"  Last Connected: {last_write}")
        print(f"  Friendly Name: {device_info.get('friendly_name', 'N/A')}")
        print()

# Save results
with open('/cases/case-2024-001/analysis/usb_devices.json', 'w') as f:
    json.dump(devices, f, indent=2)

print(f"\nTotal USB storage devices found: {len(devices)}")
PYEOF

Read the full file on GitHub · 372 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 372 lines · 74 tokens per session scan A 0b6df7a267f7

Subscribe to this mod's changes

analyzing-usb-device-connection-history is a skill published in the GitHub repository Youngmaidainon/Agent-Level-Up (3 stars, last pushed 17d ago), licensed MIT. It adds 74 tokens to every session and 3,377 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 81% identical to analyzing-usb-device-connection-history, differing in 23 lines, and is treated as a copy.