How lab-boy-toy/usb-vm-defender- works
USB Defender detects USB arrivals on Windows, sends device details to its Python security process, and applies a whitelist and sandbox-scanning workflow before allowing or denying the device. The Python process manages the VirtualBox USB-Sandbox, read-only mounting and scanning, and returns a decision to the detector. Evidence is partial: the Python source excerpt omits implementation spans, so the documented workflow supports some subsystem links that are not directly visible as calls.
Main entry points: USBDefender-Python-FreshInstall-Debug-CURRENT.py Security coordinator · transmitter.cpp TCP request and reply · main.cpp Device event loop · usbproc.cpp USB identification
Components 15
Windows Detection
- Device event loop
usbDetectorLayer/usbDetectorLayer/main.cpp - USB identification
usbDetectorLayer/usbDetectorLayer/usbproc.cpp - Device details
usbDetectorLayer/usbDetectorLayer/usbproc.h
Decision Bridge
- TCP request and reply
usbDetectorLayer/usbDetectorLayer/transmitter.cpp - Security coordinator
USBDefender-Python-FreshInstall-Debug-CURRENT.py
Device Security
- Whitelist database
USBDefender-Python-FreshInstall-Debug-CURRENT.py - Device classification
USBDefender-Python-FreshInstall-Debug-CURRENT.py - Allow or deny
USBDefender-Python-FreshInstall-Debug-CURRENT.py
Sandbox Operations
- VM lifecycle
USBDefender-Python-FreshInstall-Debug-CURRENT.py - Virtual USB capture
USBDefender-Python-FreshInstall-Debug-CURRENT.py - Read-only scan
USBDefender-Python-FreshInstall-Debug-CURRENT.py
Other components
- USB device
- VirtualBox sandbox
- Ubuntu guest
- ClamAV scanner
Connections 19
- USB device → Device event loop: triggers arrival
usbDetectorLayer/usbDetectorLayer/main.cpp - Device event loop → USB identification: dispatches events
- USB identification → Device details: produces details
usbDetectorLayer/usbDetectorLayer/usbproc.cpp - Device details → TCP request and reply: formats for transfer
usbDetectorLayer/usbDetectorLayer/transmitter.cpp - TCP request and reply → Security coordinator: sends on 5050
usbDetectorLayer/usbDetectorLayer/transmitter.cpp - Security coordinator → TCP request and reply: returns decision on 5000
USBDefender-Python-FreshInstall-Debug-CURRENT.py - Security coordinator → Whitelist database: checks and records
USBDefender-Python-FreshInstall-Debug-CURRENT.py - Security coordinator → Device classification: classifies device
USBDefender-Python-FreshInstall-Debug-CURRENT.py - Device classification → Whitelist database: skips known devices
USBDefender-Python-FreshInstall-Debug-CURRENT.py - Security coordinator → VM lifecycle: starts and checks
USBDefender-Python-FreshInstall-Debug-CURRENT.py - Security coordinator → Virtual USB capture: configures capture
USBDefender-Python-FreshInstall-Debug-CURRENT.py - VM lifecycle → VirtualBox sandbox: controls VM
USBDefender-Python-FreshInstall-Debug-CURRENT.py - Virtual USB capture → VirtualBox sandbox: sets USB filters
USBDefender-Python-FreshInstall-Debug-CURRENT.py - Security coordinator → Read-only scan: runs scan workflow
USBDefender-Python-FreshInstall-Debug-CURRENT.py - Read-only scan → Ubuntu guest: mounts read-only
USBDefender-Python-FreshInstall-Debug-CURRENT.py - Read-only scan → ClamAV scanner: scans device
- Security coordinator → Allow or deny: decides outcome
USBDefender-Python-FreshInstall-Debug-CURRENT.py - Allow or deny → Whitelist database: stores clean device
USBDefender-Python-FreshInstall-Debug-CURRENT.py - Allow or deny → TCP request and reply: sends DENY
USBDefender-Python-FreshInstall-Debug-CURRENT.py