-
Notifications
You must be signed in to change notification settings - Fork 54
Web UI Guide
The OSRipper Web UI provides a modern, browser-based interface for managing C2 operations, generating payloads, and interacting with compromised systems.
The Web UI includes:
- Dashboard - Overview of all active sessions
- Session Management - Detailed session views and command execution
- Payload Generator - Generate DoH and HTTPS payloads via web interface
- Command History - Track all executed commands and responses
# Basic server
python -m osripper.c2.server example.com
# Custom port
python -m osripper.c2.server example.com --port 8080
# With HTTPS
python -m osripper.c2.server example.com --https
# Debug mode
python -m osripper.c2.server example.com --debugOnce the server is running:
-
HTTP:
http://localhost:5000 -
HTTPS:
https://localhost:5000(if enabled) -
Remote Access:
http://your-domain:5000
The dashboard provides an overview of all active C2 sessions.
- Session List - View all active sessions in a table
- Session Count - Badge showing number of active sessions
- Quick Actions - View session details or delete sessions
- Generate Payload - Quick access to payload generator
Each session displays:
- Session ID - Unique identifier (truncated for display)
- Hostname - Target system hostname
- Username - Current user on target system
- Platform - Operating system information
- Last Seen - Last contact timestamp
- Status - Active/Inactive status
- View - Click "View" button to open session details
- Delete - Click "Delete" button to terminate session
- Generate Payload - Navigate to payload generator
Click on any session to view detailed information and execute commands.
Displays:
- Full Session ID - Complete session identifier
- Hostname - Target system hostname
- Username - Current user
- Platform - OS version and details
- Last Seen - Last contact time
- Status - Current session status
Interactive terminal for executing commands on the target system.
- Enter command in the input field
- Click "Send" or press Enter
- Command is queued for the agent
- Response appears when agent checks in
- Sending - Command being queued
- Waiting - Waiting for agent response
- Complete - Response received
- Error - Error occurred
Responses are formatted with:
- CWD - Current working directory
- Return Code - Command exit code (green for 0, red for non-zero)
- STDOUT - Standard output
- STDERR - Standard error output
View all executed commands and their responses:
- Commands are stored in database
- Responses include full output
- History persists across sessions
Generate DoH and HTTPS C2 payloads directly from the web interface.
- Click "Generate Payload" button in navigation
- Or navigate to
/generateendpoint
Configuration:
-
C2 Domain Name - Domain for DoH communication (e.g.,
example.com) - Output Filename - Name for generated payload
- Stealth Delay - Add random startup delay
- Testing Mode - Skip VM detection checks
- Obfuscation - Enable code obfuscation
- Enhanced Obfuscation - Advanced evasion techniques
- Compile to Binary - Create standalone executable
Steps:
- Select "DNS-over-HTTPS C2" from dropdown
- Enter domain name
- Configure options
- Click "Generate Payload"
- Download generated file
Configuration:
-
C2 Base URL - Full HTTPS URL (e.g.,
https://example.com) - Certificate Fingerprint - SHA256 fingerprint (auto-filled if server has HTTPS)
- Output Filename - Name for generated payload
- Stealth Delay - Add random startup delay
- Testing Mode - Skip VM detection checks
- Obfuscation - Enable code obfuscation
- Enhanced Obfuscation - Advanced evasion techniques
- Compile to Binary - Create standalone executable
Steps:
- Select "HTTPS C2 (Certificate Pinning)" from dropdown
- Enter base URL
- Certificate fingerprint auto-fills (if server has HTTPS)
- Configure options
- Click "Generate Payload"
- Download generated file
For HTTPS payloads, the certificate fingerprint is automatically retrieved if:
- Server is running with HTTPS enabled
- Certificate is accessible
Manual Fingerprint:
# Get fingerprint from running server
curl http://localhost:5000/api/cert-fingerprint
# Or from URL
curl -X POST http://localhost:5000/api/cert-fingerprint-from-url \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}'Common Options:
- Output Filename - Custom name for payload
- Stealth Delay - Random 5-15 second delay at startup
- Testing Mode - Skip VM detection (for testing in VMs)
Obfuscation:
- Obfuscate Payload - Enable multi-layer obfuscation
- Enhanced Obfuscation - Anti-debug, VM detection, advanced evasion (requires obfuscation)
Compilation:
- Compile to Binary - Create standalone executable
- Icon File Path - Custom icon for compiled binary (.ico file)
After generation:
-
Python Payload -
.pyfile (or_or.pyif obfuscated) -
Binary Payload -
.binfile (if compiled)
Files are located in:
-
tmp/directory for Python files -
tmp/results/orresults/for obfuscated/compiled files
The Web UI uses REST API endpoints for functionality.
# Get all sessions
GET /api/sessions
# Get session details
GET /api/session/<session_id>
# Delete session
DELETE /api/session/<session_id>
# Send command
POST /api/session/<session_id>/command
Body: {"command": "ls -la"}
# Get command history
GET /api/session/<session_id>/history?limit=100# Generate payload
POST /api/generate-payload
Body: {
"payload_type": "doh",
"domain": "example.com",
"obfuscate": true,
"compile": true,
...
}# Get certificate fingerprint
GET /api/cert-fingerprint
# Get fingerprint from URL
POST /api/cert-fingerprint-from-url
Body: {"url": "https://example.com"}# Download generated file
GET /api/download/<filename>- Use HTTPS - Enable HTTPS for production deployments
- Certificate Pinning - Use certificate pinning for HTTPS payloads
- Access Control - Implement firewall rules to restrict access
- Authentication - Consider adding authentication (future feature)
- Session Limits - Monitor number of active sessions
- Database Size - Periodically clean old session data
- Response Times - Use appropriate polling intervals
- Regular Backups - Backup session database regularly
- Logging - Monitor server logs for issues
- Testing - Test payloads in controlled environments first
- Check if server is running
- Verify port is not in use
- Check firewall settings
- Review server logs for errors
- Verify payload is connecting to correct domain
- Check DNS resolution
- Review agent logs
- Verify database is accessible
- Check if session is active (last seen timestamp)
- Verify agent is polling for commands
- Review command queue in database
- Check agent logs for errors
- Verify all required fields are filled
- Check server logs for errors
- Ensure write permissions in tmp/ directory
- Verify dependencies are installed
- DNS Configuration: Point domain to server IP
- Port Forwarding: Forward port 5000 (or custom port)
- SSL Certificate: Use Let's Encrypt or custom certificate
- Firewall Rules: Allow incoming connections
# View database
sqlite3 c2_sessions.db
# Backup database
cp c2_sessions.db c2_sessions_backup.db
# Clean old sessions (manual)
sqlite3 c2_sessions.db "DELETE FROM sessions WHERE last_seen < datetime('now', '-30 days');"Edit server configuration:
- Port:
--portflag - Database:
--dbflag - HTTPS:
--httpsflag - Certificate:
--certand--keyflags
For more information, see the C2 Server Guide and Troubleshooting pages.