A comprehensive web application for simulating ethical hacking scenarios with separate Red Team (attack) and Blue Team (defense) interfaces.
This platform provides an educational environment for learning cybersecurity concepts through interactive simulation of both offensive (Red Team) and defensive (Blue Team) security operations.
-
Attack Arsenal Section
- 4 different attack types (SQL Injection, Brute Force, Port Scanner, DDoS)
- Quick launch buttons
- Attack status indicators
- Success/failure statistics
-
Attack Configuration Panel
- Target selection (IP, domain, service)
- Attack parameters (intensity, duration, payloads)
- Advanced options (custom scripts, wordlists)
- Scheduling attacks
-
Attack Execution View
- Real-time terminal output
- Progress bars
- Live packet/request counters
- Abort/pause controls
-
Results & Reporting
- Vulnerability summary
- Exploited weaknesses
- Captured data (passwords, sessions, files)
- Export reports (PDF, JSON)
- Replay attack feature
-
Attack History
- Timeline of all attacks
- Filter by type, target, date
- Success rate analytics
- Comparison between attacks
-
Security Overview (Main Dashboard)
- Security score/health meter
- Active threats counter
- System status indicators
- Quick stats (attacks blocked, alerts generated)
-
Real-Time Monitoring
- Live alert feed (scrolling list)
- Network traffic visualization
- Active connections map
- Suspicious activity indicators
-
Intrusion Detection System (IDS) Panel
- Detection rules manager
- Enable/disable specific detectors
- Sensitivity configuration
- Whitelist/blacklist IPs
- Custom rule creation
-
Log Analysis Center
- Searchable log viewer
- Filter by: severity, source IP, event type, time range
- Pattern recognition highlights
- Correlation engine (related events)
- Export logs
-
Alert Management
- Alert queue (unacknowledged alerts)
- Severity classification (Critical โ Low)
- Alert details (source, target, payload, timestamp)
- Acknowledge/dismiss/escalate actions
- Notes and incident tracking
-
Firewall Control Panel
- Blocked IPs list
- Active rules
- Add/remove rules
- Traffic statistics by rule
- Auto-blocking based on IDS
-
Forensics & Investigation
- Attack timeline reconstruction
- Packet capture viewer (PCAP analysis)
- Attack pattern analysis
- Attacker profiling
- Mitigation recommendations
-
Reports & Audit Logs
- Security posture reports
- Compliance dashboards
- Incident reports
- Automated audit trail
- Export for compliance
- Python 3.8 or higher
- pip (Python package manager)
-
Clone or navigate to the project directory:
cd c:\Users\hp\Desktop\Projets\Python
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python app.py
-
Access the application:
- Open your web browser and navigate to:
http://localhost:5000 - You'll see the main page with options to enter Red Team or Blue Team interfaces
- Open your web browser and navigate to:
Python/
โโโ app.py # Main Flask application
โโโ requirements.txt # Python dependencies
โโโ README.md # This file
โโโ attacks/ # Attack modules
โ โโโ __init__.py
โ โโโ sql_injection.py # SQL Injection attack
โ โโโ brute_force.py # Brute Force attack
โ โโโ port_scanner.py # Port Scanner attack
โ โโโ ddos.py # DDoS attack
โโโ defense/ # Defense modules
โ โโโ __init__.py
โ โโโ ids.py # Intrusion Detection System
โ โโโ firewall.py # Firewall module
โ โโโ log_analyzer.py # Log analysis module
โโโ templates/ # HTML templates
โ โโโ index.html # Main landing page
โ โโโ red_team.html # Red Team interface
โ โโโ blue_team.html # Blue Team interface
โโโ static/ # Static files
โโโ css/
โ โโโ style.css # Stylesheet
โโโ js/
โโโ red_team.js # Red Team JavaScript
โโโ blue_team.js # Blue Team JavaScript
-
Select an Attack:
- Browse available attacks in the Attack Arsenal section
- Click on an attack card to select it
-
Configure Attack:
- Enter target (IP address or domain)
- Configure attack parameters (intensity, duration, etc.)
- Customize payloads or wordlists if needed
-
Launch Attack:
- Click "Launch Attack" button
- Monitor real-time progress in the Execution View
- View results in the Results & Reporting section
-
Review History:
- Check Attack History for past attacks
- Filter by attack type or date
- Export reports as JSON
-
Monitor Security:
- Check Security Overview dashboard for system health
- Monitor real-time alerts in the Alert Feed
- Watch network traffic visualization
-
Manage IDS:
- Configure detection rules
- Adjust sensitivity settings
- Enable/disable specific detectors
-
Analyze Logs:
- Search and filter system logs
- Identify patterns and correlations
- Export log data
-
Handle Alerts:
- Review alert queue
- Acknowledge or escalate alerts
- Block suspicious IPs automatically
-
Configure Firewall:
- Add/remove firewall rules
- Block malicious IP addresses
- Monitor blocked traffic
- Simulates SQL injection attacks
- Tests multiple payloads
- Detects vulnerabilities
- Extracts database information
- Attempts password cracking
- Uses wordlist-based attacks
- Tracks failed attempts
- Detects account lockouts
- Scans target ports
- Identifies open services
- Detects filtered ports
- Maps network services
- Simulates denial of service attacks
- Configurable intensity levels
- Multiple attack types (HTTP flood, TCP SYN, UDP)
- Monitors target response times
- Pattern-based detection
- Custom rule creation
- Real-time alert generation
- Severity classification
- IP blocking
- Rule-based filtering
- Protocol and port control
- Traffic statistics
- Log parsing and analysis
- Event correlation
- Pattern recognition
- Search and filtering
GET /api/red/attacks- Get available attacksPOST /api/red/launch- Launch an attackGET /api/red/status/<attack_id>- Get attack statusGET /api/red/history- Get attack historyPOST /api/red/abort/<attack_id>- Abort an attack
GET /api/blue/dashboard- Get dashboard dataGET /api/blue/alerts- Get security alertsPOST /api/blue/alerts/<alert_id>/acknowledge- Acknowledge alertGET /api/blue/logs- Get system logsGET /api/blue/ids/rules- Get IDS rulesPOST /api/blue/ids/rules- Add IDS ruleDELETE /api/blue/ids/rules/<rule_id>- Delete IDS ruleGET /api/blue/firewall/rules- Get firewall rulesPOST /api/blue/firewall/rules- Add firewall rulePOST /api/blue/firewall/block- Block IP address
attack_update- Real-time attack progressattack_complete- Attack completion notificationattack_detected- Blue Team detection notificationattack_error- Attack error notification
security_alert- New security alertlog_update- New log entry
-
Educational Purpose Only: This platform is designed for learning and should only be used in authorized environments with proper permissions.
-
No Real Attacks: All attacks are simulated and do not cause actual harm to systems.
-
Controlled Environment: Use only in isolated lab environments or with explicit authorization.
This project demonstrates:
- Web application security vulnerabilities
- Attack simulation and penetration testing
- Intrusion detection and prevention
- Security operations center (SOC) workflows
- Real-time monitoring and alerting
- Log analysis and forensics
- Firewall configuration and management
โ Red Team Side:
- Python code/notebook for attack simulation (15 points)
- Web application with GUI for attack management (2 bonus points)
- 4 different attack modules
โ Blue Team Side:
- Web application with GUI for SOC operations (2-3 bonus points)
- IDS system for attack analysis
- Log analysis capabilities
- Security alert generation
- Additional attack types
- Machine learning-based detection
- Advanced forensics tools
- Multi-user support
- Database persistence
- Report generation (PDF)
- PCAP file analysis
- Network topology visualization
Built with:
- Backend: Flask, Flask-SocketIO
- Frontend: HTML5, CSS3, JavaScript
- Real-time: WebSocket (Socket.IO)
- Charts: Chart.js
This project is for educational purposes only.
This is an academic project. For improvements or suggestions, please contact the project maintainer.
Note: Always ensure you have proper authorization before using any security testing tools, even in educational contexts.