A real-time, Python-based Intrusion Detection System for monitoring network traffic
Detects suspicious activities like Port Scanning and DoS-like attacks with alerts.
Simple IDS is a lightweight, Python-based Intrusion Detection System designed to monitor live network traffic and identify suspicious behavior.
It analyzes incoming packets in real time and triggers alerts when potential security threats such as port scanning or DoS attacks are detected. Alerts are logged locally, saved in CSV format, and optionally sent via email notifications.
✅ Live packet inspection using Scapy
✅ Detects Port Scanning attempts
✅ Detects DoS-like high traffic patterns
✅ Real-time terminal alerts
✅ Email notifications for detected attacks
✅ CSV-based alert logging (alerts.csv)
✅ Kali Linux compatible
✅ Lightweight & easy to extend
git clone https://github.com/mantrapatil03/simple-ids.git
cd simple-idspip3 install -r requirements.txt
sudo python3 ids.py
⚠️ Root privileges are required for packet sniffing.
| Attack Type | Description |
|---|---|
| Port Scan | Multiple destination ports accessed rapidly |
| DoS-like Attack | High packet rate from a single IP |
[ALERT] Possible Port Scan detected from 192.168.1.10Time,Attack Type,Source IP
Sun Jan 7 21:30:12 2026,Possible Port Scan,192.168.1.10- Subject: 🚨 IDS Alert
- Body: Attack type and source IP
Edit the following section in ids.py:
EMAIL_SENDER = "your_email@gmail.com"
EMAIL_PASSWORD = "your_app_password"
EMAIL_RECEIVER = "your_email@gmail.com"
⚠️ Use a Gmail App Password, not your real password.
| Platform | Required Privilege |
|---|---|
| Kali Linux | Run with sudo |
| Linux | Root privileges |
→ Run using sudo
→ Lower detection thresholds inside ids.py
→ Check internet connection and app password
| File | Description |
|---|---|
ids.py |
Packet sniffing, detection logic, alert handling |
- Add new detection rules (e.g., brute-force login detection)
- Integrate firewall rules for IPS functionality
- Add ML-based anomaly detection
Contributions are welcome!
Steps:
- 1️⃣ Fork the repository
- 2️⃣ Create a new branch
- 3️⃣ Add features or improve detection
- 4️⃣ Submit a pull request
Mantra Patil
Made with ❤️ & Python by Mantra Patil
🌟 If you found this project helpful, please give it a star! 🌟
Your support motivates further open-source work and new features.