A real-time Network Intrusion Detection System (NIDS) built with Suricata 8.0.8 and a custom Python Alert Responder on Kali Linux. It monitors live network traffic (eth0 and lo), detects reconnaissance and intrusion patterns using custom Suricata signatures, and executes automated, non-blocking SOC severity notifications and incident logging.
CodeAlpha_NetworkIntrusionDetectionSystem/
├── config/
│ └── suricata.yaml # Configured Suricata engine settings (HOME_NET & rule paths)
├── rules/
│ └── local.rules # Custom Suricata detection signatures (SID 1000001–1000004)
├── scripts/
│ └── ids_responder.py # Real-time log parser & severity-based alert responder
├── logs/
│ ├── fast.log # Suricata real-time alert log output
│ └── incident_responses.log # Structured incident escalation & notification records
└── README.md
| SID | Rule Name | Protocol / Target | Detection Logic |
|---|---|---|---|
1000001 |
CUSTOM IDS: ICMP Ping Detected |
ICMP -> $HOME_NET |
Detects ICMP Echo Requests (itype:8) used in host discovery. |
1000002 |
CUSTOM IDS: Port Scan Detected (TCP SYN) |
TCP -> Ports 21,22,23,80,443,3389 |
Triggers when 5+ SYN packets arrive from a single source within 10s. |
1000003 |
CUSTOM IDS: Possible SSH Brute Force |
TCP -> Port 22 |
Triggers on 5+ rapid SSH SYN connection attempts within 30s. |
1000004 |
CUSTOM IDS: HTTP Admin Panel Access |
HTTP -> $HOME_NET |
Flags cleartext HTTP requests targeting /admin URIs. |
ids_responder.py tails /var/log/suricata/fast.log in real time and classifies alerts without disrupting legitimate network traffic:
- HIGH Severity (
ESCALATE): Flags TCP Port Scans and SSH Brute-Force attempts for immediate SOC review. - MEDIUM Severity (
AUDIT): Records unauthorized HTTP/adminaccess probes. - LOW Severity (
NOTIFY): Logs ICMP reconnaissance pings.
- Validate Suricata Configuration:
sudo suricata -T -c /etc/suricata/suricata.yaml -v
- Start Suricata in Live IDS Mode:
sudo suricata -c /etc/suricata/suricata.yaml -i eth0 -i lo
- Start the Real-Time Alert Responder:
sudo python3 scripts/ids_responder.py
- Simulate Attack Traffic for Verification:
ping -c 3 10.0.2.15 sudo nmap -sS -p 21,22,23,80,443,3389 10.0.2.15