USB Sentinel - Advanced USB Security System icon

USB Sentinel - Advanced USB Security System

Hot or Not
USB Sentinel - Advanced USB Security System

Description

USB Sentinel — Advanced USB Security & Device Control System

USB Sentinel is a complete Windows-focused cybersecurity source-code project built with Python for monitoring, analyzing and controlling USB devices through a modern security-oriented desktop interface. The project combines USB device detection, security policies, threat analysis, quarantine workflows, administrator approval, role-based access control, monitoring, audit logging, PostgreSQL persistence, a FastAPI backend and an integrated AI assistant. It is designed for developers, cybersecurity students, researchers and organizations looking for a customizable foundation for USB device security and endpoint-control projects.

Key Features

USB Device Detection & Monitoring

  • Real-time USB device monitoring
  • Device insertion and removal detection
  • VID/PID identification
  • Serial and device information collection
  • Device fingerprinting
  • Windows PnP and USB telemetry
  • Device status tracking

USB Security Workflow

  • Zero-Trust inspired device handling
  • Pending device approval
  • Allow device for current session
  • Block device for current session
  • Permanent device blocking
  • Device quarantine workflow
  • Whitelist and blacklist management
  • Administrator approval controls
  • Global USB port-lock controls

###strong/strong###

  • USB threat scoring
  • Risk classification
  • Suspicious device detection ###li/li###
  • HID behavior analysis
  • Suspicious enumeration detection
  • Network-emulation indicators
  • Security findings and recommended actions

USB Storage Scanner

  • Suspicious file-type detection
  • Autorun detection
  • Executable and script-file checks
  • Hidden-file analysis
  • File entropy analysis
  • Risk-score generation
  • Optional Microsoft Defender integration

Authentication & Access Control

  • Secure administrator authentication
  • Password hashing
  • Role-Based Access Control (RBAC)
  • SUPER_ADMIN
  • SECURITY_ANALYST
  • OPERATOR
  • STANDARD_USER
  • Permission-based protected actions
  • Session management
  • Reauthentication controls
  • Login protection
  • OTP password recovery

Security Controls

  • Safe Mode
  • Panic Mode
  • Global USB Lock
  • Hardware security-token support
  • Integrity verification
  • Sensitive-action protection
  • Rate limiting
  • Session security
  • Recovery mechanisms

Security Dashboard

  • Real-time security overview
  • USB device status
  • Pending approval requests ###li/li###
  • System metrics
  • Security alerts
  • Recent events
  • Active sessions
  • Driver status and diagnostics

User Management

  • User administration
  • Role assignment
  • Permission management
  • Session visibility
  • Login history
  • Access information

Logging & Monitoring

  • Structured security logging
  • Audit logging
  • SIEM-oriented events
  • USB event history
  • Authentication history ###li/li###
  • System telemetry
  • Network monitoring
  • Security event history

PostgreSQL Database The project includes a structured PostgreSQL database layer covering users, authentication, RBAC, USB devices, device registry, access requests, policies, USB history, threat assessments, threat intelligence, security alerts, SIEM events, telemetry, system metrics, AI observability, settings and support requests. A repository and service architecture separates database operations from business logic and the user interface. FastAPI Backend USB Sentinel includes a FastAPI backend providing protected REST endpoints for authentication, security data, logs, USB events, threat information, system metrics, system status and AI functionality. Authentication uses signed JWT access tokens and permission-based endpoint protection. Real-Time WebSocket Security Events The backend includes a protected WebSocket security stream. Authorized clients can receive historical and live security events through an in-process event bus without continuously polling the server. The WebSocket connection validates JWT authentication and RBAC permissions before streaming security events. Sentinel AI Assistant An integrated cybersecurity assistant is available directly from the application. The AI architecture includes:

  • Google Gemini integration
  • Application-specific system instructions
  • Page-aware assistance
  • Retrieval-Augmented Generation (RAG)
  • Semantic documentation retrieval
  • Gemini embeddings
  • FAISS vector search
  • Conversation memory
  • Sensitive-data redaction
  • AI safety filtering
  • Structured responses
  • AI observability and diagnostics

When online AI functionality is unavailable, USB Sentinel can use its local application documentation through a keyword-based retrieval fallback. No separate offline generative LLM is included. Windows Integration USB Sentinel uses Windows-specific security and device-management capabilities including:

  • Windows PnP telemetry
  • PowerShell device information
  • WMI/CIM information
  • SetupAPI telemetry
  • Windows Registry integration
  • pnputil-based user-mode enforcement

Some device-control operations require Administrator privileges. Experimental KMDF Driver Integration The source code also contains an experimental Windows KMDF driver integration layer, including a driver bridge, IOCTL-oriented communication architecture, health monitoring and fallback mechanisms. The kernel driver functionality is experimental and disabled by default. It is provided for development and research purposes and should not be considered production-ready without additional Windows driver validation, signing and controlled deployment testing.

User Interface

USB Sentinel includes a custom cybersecurity-inspired desktop interface with:

  • Splash and initialization screens
  • Authentication screens
  • Security dashboard
  • Device management
  • Scan history
  • Security controls
  • User management
  • Logs
  • Settings
  • Technical support
  • Sentinel AI chat
  • USB approval screens
  • Security warnings
  • Panic Mode and recovery interfaces

The interface supports both dark and light appearance modes.

Multilingual Interface

The project includes interface string packs for:

  • English
  • French
  • Arabic
  • Tamazight

Technologies

  • Python
  • Tkinter
  • FastAPI
  • Uvicorn
  • PostgreSQL
  • psycopg2
  • Pydantic
  • JWT
  • bcrypt
  • Google Gemini
  • LangChain
  • FAISS
  • Google Generative AI Embeddings
  • Requests
  • psutil
  • Cryptography
  • PowerShell
  • Windows PnP
  • WMI/CIM
  • SetupAPI
  • pnputil
  • Windows Registry
  • WebSocket
  • SMTP / OTP ###li/li###
  • AsyncIO

Architecture

The project follows a modular architecture separating:

  • Desktop UI
  • Core security services
  • Business services
  • Repository/data-access layer
  • USB telemetry
  • USB security runtime
  • Policy engine ###li/li###
  • Scanner
  • Quarantine
  • Monitoring
  • Event bus
  • Backend API
  • AI services
  • PostgreSQL database
  • Experimental driver integration

This structure makes the source code easier to understand, maintain, extend and customize.

Included Documentation

The source package includes detailed technical documentation covering:

  • Project overview
  • Installation
  • Requirements
  • Configuration
  • Environment variables
  • Application architecture
  • Authentication
  • RBAC
  • USB telemetry
  • USB security workflow ###li/li###
  • Storage scanning
  • Policy system
  • PostgreSQL database
  • Repository architecture
  • FastAPI backend
  • REST API
  • WebSocket event streaming
  • Sentinel AI
  • Gemini integration
  • RAG
  • Local AI fallback
  • Logging and monitoring
  • Security controls
  • Experimental driver architecture
  • Customization
  • Troubleshooting
  • Developer reference

Customizable Source Code

The project is designed to be customized. Developers can modify the interface, branding, security policies, roles, permissions, scanner heuristics, threat rules, database structure, AI knowledge base and other application components according to their requirements.

Important Requirements

  • Windows operating system
  • Compatible Python environment
  • PostgreSQL
  • Administrator privileges for certain USB enforcement operations
  • Internet connection and Gemini API configuration for online AI functionality

The Gemini integration is optional for the core USB security application. A local documentation retrieval fallback is available when online AI services are unavailable.

Important Notice

USB Sentinel is intended for legitimate defensive cybersecurity, administration, education, research and authorized security use. Some low-level Windows security functionality, particularly the included KMDF driver integration, is experimental and disabled by default. Actual hardware behavior may vary depending on Windows configuration, device drivers, permissions and connected USB hardware. The source code is provided for customization and further development.

Features

  • Real-time USB device detection and monitoring
  • USB insertion and removal tracking
  • VID/PID, serial number and device fingerprint identification
  • Zero-Trust inspired USB approval workflow
  • Allow once, block once and permanent block actions
  • Device quarantine and restricted-access workflow
  • USB whitelist and blacklist management
  • Configurable USB security policies
  • USB storage scanning and suspicious-file detection
  • Risk scoring and threat-level classification ###li/li###
  • HID and suspicious-enumeration behavior analysis
  • Network-emulation device indicators
  • Optional Microsoft Defender-assisted scanning
  • Secure administrator authentication
  • OTP-based password recovery
  • Role-Based Access Control (RBAC)
  • SUPER_ADMIN, SECURITY_ANALYST, OPERATOR and STANDARD_USER roles
  • Permission-based protected actions
  • Session management and reauthentication controls
  • Login protection and rate limiting
  • Safe Mode and Panic Mode protection
  • Global USB lock controls
  • Optional hardware security-token support
  • Application integrity verification
  • Security dashboard with real-time operational information
  • USB scan history and device history
  • User and access management
  • Structured audit logging
  • SIEM-oriented security events
  • System and network monitoring
  • PostgreSQL database architecture
  • Repository and service-layer architecture
  • FastAPI REST backend
  • JWT authentication
  • Protected WebSocket security-event streaming
  • Integrated Sentinel AI assistant
  • Google Gemini integration
  • Retrieval-Augmented Generation (RAG)
  • Gemini embeddings and FAISS semantic search
  • Page-aware AI assistance
  • AI conversation memory
  • Sensitive-data redaction and AI safety filtering
  • Local documentation keyword fallback when Gemini is unavailable
  • Dark and light interface modes
  • English, French, Arabic and Tamazight interface strings
  • Windows PnP, PowerShell, WMI/CIM and SetupAPI integration
  • User-mode USB enforcement through Windows tools
  • Experimental KMDF driver integration and driver bridge
  • Detailed Markdown technical documentation
  • Modular and customizable source code

Requirements

  • Windows 10 or Windows 11 64-bit
  • Python 3.12 or a compatible Python 3 environment
  • PostgreSQL database server
  • Python package manager (pip)
  • Administrator privileges for USB enable/disable and other protected Windows device-control operations
  • PowerShell available on the Windows system
  • Windows Plug and Play / PnP services enabled
  • Internet connection only when online Gemini AI functionality is required
  • Google Gemini API key for online AI generation and semantic embedding features
  • SMTP account/configuration if OTP email recovery is used
  • Compatible Python packages listed in the project documentation
  • Visual Studio and Windows Driver Kit are required only for developers who want to build or experiment with the included KMDF driver
  • Driver signing/test-signing and an isolated Windows VM are strongly recommended for KMDF driver experimentation
  • Basic knowledge of Python, PostgreSQL and Windows administration is recommended for customization

Instructions

  1. Download and extract the USB Sentinel source-code package to a local folder.
  2. Read the included documentation starting with docs/00_INDEX.md.
  3. Make sure Python and PostgreSQL are installed on the Windows computer.
  4. Create a Python virtual environment: python -m venv .venv
  5. Activate the virtual environment and install the required Python dependencies.
  6. Create a PostgreSQL database and configure the required database credentials.
  7. Execute the SQL files included in the db directory in numerical order to initialize the database schema, indexes, reference data and USB security workflow tables.
  8. Copy the provided environment example file to .env.
  9. Configure the required environment variables, including database connection information.
  10. If online Sentinel AI functionality is required, add a valid Gemini API key to the environment configuration.
  11. If OTP email recovery is required, configure the SMTP settings.
  12. Keep the experimental KMDF driver disabled unless you are intentionally testing the driver in a controlled Windows development environment.
  13. Start the desktop application from the project root using:

python app.py

  1. Run the application with Administrator privileges when real Windows USB enable/disable operations are required.
  2. If the FastAPI backend and Sentinel AI are required, start the included backend service according to the backend instructions in the documentation.
  3. Create or authenticate with an administrator account.
  4. Connect a test USB device and verify that it appears in the device monitoring or pending-approval workflow.
  5. Use the dashboard to scan, review, allow or block devices according to your test environment.
  6. Review Scan History, Logs, Security Controls and User Management to confirm that database persistence and security events are working.
  7. Test Safe Mode, Panic Mode and other security controls only in a controlled environment.
  8. For customization, consult the included documentation covering architecture, database, USB telemetry, policies, threat scanning, AI/RAG, WebSocket, RBAC and UI customization.

Important: Some USB enforcement operations depend on Windows permissions, hardware, drivers and operating-system configuration. The KMDF driver integration included with the project is experimental and disabled by default.

Authorcharafsbai
CategoryScripts & Code / Python
Price$205
Extended License$615
Likes1
First ReleaseAug 15, 2026
Last UpdateAug 15, 2026
Files included.py, .sql

External listing. code.market does not sell this product and does not process payment for it. Pricing, payment, delivery, licensing, refunds, and support are handled by the third-party merchant on its own website. We may earn an affiliate commission from a referral. Details.

Products of the Week.

Submit