This project is an Intrusion Detection System (IDS) designed to detect various network attacks including Port Scanning, ICMP Flooding, and DDoS attacks. The system integrates Suricata with custom detection modules and provides a web-based dashboard for monitoring and alerts.
- Port Scan Detection: Uses machine learning to identify port scanning activities
- ICMP Flood Detection: Detects ICMP flood attacks through traffic analysis
- Suricata Integration: Leverages Suricata's powerful detection capabilities
- Real-time Alerts: Email notifications for detected threats
- Web Dashboard: React-based frontend for monitoring system status and alerts
- Python 3.8+
- Node.js 14+
- npm or yarn
- Suricata (optional, for full functionality)
-
Clone the repository:
git clone https://github.com/yourusername/Network-Forensics.git cd Network-Forensics -
Install backend dependencies:
pip install -r backend/requirements.txt -
Install frontend dependencies:
cd frontend npm install cd .. -
Configure environment variables:
- Copy the
.env.examplefile to.env - Update the values in
.envto match your environment
- Copy the
The project has been integrated to run with minimal terminal usage. Simply use:
./start.sh
This script will:
- Start the backend Flask server
- Start the Suricata integration module
- Start the React frontend development server
- Log all output to the
logsdirectory
To stop all components:
./stop.sh
If you need to run components individually:
-
Backend Server:
python backend/server.py -
Suricata Integration:
python backend/suricata_integration.py -
Frontend:
cd frontend npm run dev
Network-Forensics/
├── .env # Environment configuration
├── test_eve.json # Test data for Suricata
├── start.sh # Script to start all components
├── stop.sh # Script to stop all components
├── backend/
│ ├── server.py # Main Flask server
│ ├── suricata_integration.py # Suricata integration
│ ├── suricata.yaml # Suricata configuration
│ ├── requirements.txt # Python dependencies
│ ├── ml_port_scan_detector/ # Port scan detection module
│ │ ├── ml_portscan_detector.py
│ │ ├── portscan_detector_model.pkl
│ │ └── scaler.pkl
│ └── icmp_detector/ # ICMP flood detection module
│ └── icmp_flood_detector_final.py
└── frontend/ # React frontend application
├── src/ # Source code
├── package.json # Node.js dependencies
└── ... # Other frontend configuration files
You can test port scanning detection using tools like nmap:
nmap -p 1-1000 [target_ip]
To test ICMP flood detection:
ping -f [target_ip]
- Check the log files in the
logsdirectory for error messages - Ensure all required ports are available (default: 3000 for frontend, 5000 for backend)
- Verify that the
.envfile contains correct configuration values
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.