Hackathon Submission for "Insecurity"
Trident USB tackles the pervasive insecurity of unmanaged USB device usage in organizations. We transform USB ports from potential attack vectors and data leak points into centrally managed, policy-enforced, and monitored endpoints.
Traditional USB usage is a security nightmare:
- Malware Propagation: Infected drives can easily compromise entire networks.
- Data Exfiltration: Sensitive data can be copied to unauthorized USB sticks without a trace.
- Lack of Visibility: Who plugged in what, where, and when? Most organizations are blind.
- Inconsistent Policies: Manual enforcement of USB policies is error-prone and inefficient.
Trident USB provides a comprehensive platform to manage and secure USB device interactions across your entire organization.
We empower administrators with:
- Secure USB Access: Only authorized, cryptographically authenticated USB sticks gain access.
- Real-time Monitoring: All USB activities are logged and alerts are generated for suspicious events.
- Centralized Management: Define and enforce granular access policies from a user-friendly web dashboard.
- Intelligent Agent: Lightweight client agents on endpoints ensure policy adherence and report activity.
-
Intuitive Dashboard: Get an at-a-glance overview of your USB security posture, active sticks, critical alerts, and system health.

-
Granular Policy Hierarchy: Define global policies and create specific overrides for groups, individual agents (computers), or even specific USB sticks.

-
Flexible Group Management: Organize users or computers into groups and apply tailored USB access policies.

-
Comprehensive Agent (Computer) Management: Monitor and manage registered client agents, view their status, and see applied policies.

-
Secure Stick Management & Registration: Easily register new USB sticks, assign them unique cryptographic identifiers, and link them to policies or groups.

-
Detailed Event Logging: Capture every USB connection, authentication attempt, policy application, and potential security event for auditing and forensics.

-
Customizable Settings: Configure global system behaviors, such as default actions for unauthenticated sticks.

-
USB Stick Registration: Sticks are enrolled in the system, receiving a unique ID and an associated public key for authentication.
-
Agent Installation: A lightweight Python agent is deployed on client computers.
-
Automatic Recognition & Authentication: When a USB stick is inserted, the agent detects it, reads its configuration, and attempts to authenticate it against the central policy defined in Supabase.
-
Intelligent Action & Logging: Based on the authentication result and the effective policy (resolved via a Supabase Edge Function), the agent permits access, logs the event, or automatically ejects the stick. All events are logged both locally on the stick (if permitted) and centrally in Supabase.
- Secure USB Sticks: Contain a configuration file (
config.file) withstick_id,log_filename_on_stick, and apublic_key_filename. The public key file itself is used for authentication. - Client Agents (Python):
- Runs on Linux endpoints (easily adaptable for Windows/macOS with platform-specific USB libraries).
- Monitors USB connections (
usb-monitor,psutil). - Communicates with Supabase to fetch expected keys and effective policies.
- Performs stick authentication and enforces policies (e.g., eject).
- Sends detailed logs to Supabase.
- Central Dashboard (Web Application):
- Security Engine (Supabase Backend):
- Database (PostgreSQL): Stores information about agents, sticks, groups, policies, and event logs.
- Authentication: Supabase Auth for dashboard users.
- APIs (REST & Realtime): For agent communication and dashboard data.
- Edge Functions (Deno/TypeScript): Crucially,
fn_get_effective_policyresolves the complex policy hierarchy (Global -> Group -> Agent -> Stick) to determine the action for a specific agent-stick interaction. This keeps complex logic server-side.
-
Innovation:
- Proactive Insecurity Mitigation: Instead of reacting to breaches, Trident USB proactively prevents unauthorized USB access.
- Hierarchical Policy Engine via Edge Functions: The ability to define granular policies at multiple levels (global, group, agent, stick) and have them dynamically resolved server-side is a powerful and innovative approach to access control for physical devices.
- Agent-Stick Mutual Awareness: The system logs events both on the agent and (optionally) on the stick, creating a more complete audit trail.
-
Technical Difficulty:
- Robust Python Agent: Developing a reliable agent that correctly identifies mount points, handles various USB event scenarios, performs robust ejects on Linux, and communicates securely with a backend presents significant challenges.
- Supabase Backend Complexity: Designing the database schema for hierarchical policies, implementing the Edge Function for policy resolution (
fn_get_effective_policy), and setting up Row Level Security (RLS) for secure data access. - Real-time Logging & UI: Integrating real-time log updates and presenting complex data structures (like policy hierarchies) in an intuitive UI.
- Secure Authentication Flow: Implementing the stick authentication mechanism based on public key comparison.
-
Impact:
- Drastic Reduction in USB-borne Threats: Directly addresses a major vector for malware and data exfiltration, significantly reducing organizational risk related to "Insecurity".
- Enhanced Data Loss Prevention (DLP): Provides control and visibility over data movement via USB.
- Improved Compliance: Helps organizations meet regulatory requirements for data protection and access control.
- Operational Efficiency: Centralized management saves administrative overhead compared to manual USB control.
-
UI/UX:
- Clean & Intuitive Dashboard: The web interface (as seen in screenshots) is designed to be user-friendly, allowing administrators to easily navigate, manage entities, and understand the security status.
- Clear Visualizations: The dashboard provides visual summaries of security events and system health.
- Actionable Insights: Event logs and policy testing tools provide clear information for decision-making.
- Seamless User Experience: From agent setup to policy definition and monitoring, the workflow is designed to be straightforward.
-
Presentation:
- Comprehensive Solution: Trident USB is a well-rounded system addressing the problem from endpoint agent to central management dashboard.
- Clear Value Proposition: The benefits of enhanced security and control are clearly articulated.
- This README & Demo: We aim to clearly present the functionality, technical depth, and impact of our project.
- Supabase Setup:
- Deploy the database schema (tables for agents, sticks, groups, policies, logs).
- Deploy the
fn_get_effective_policyEdge Function. - Configure RLS and API keys.
- Python Agent (
SecureUSBclient):- Clone the repository.
- Install dependencies:
pip install -r requirements.txt(ensureusb-monitor,psutil,python-dotenv,requests). - Create a
.envfile withSUPABASE_URLandSUPABASE_SERVICE_KEY. - Run
python main.py. The agent will register itself ifagent_identity.jsonis not found.
- Web Dashboard:
- (If applicable) Clone the frontend repository.
- Install dependencies (e.g.,
npm install). - Configure Supabase client settings.
- Run the development server (e.g.,
npm run dev).
- Better encryption (challenge-response-protocol)
- Two-Directional Authentication
- USB-Sticks authenticate Clients before allowing read access
- Clients authenticate USB-Sticks before accepting them on the system
Thank you for considering Trident USB! We believe it's a powerful step towards mitigating USB-related insecurities.



