Skip to content

About

Real-Time Network Intrusion Detection System (NIDS) built with Suricata 8.0.8 and Python on Kali Linux — CodeAlpha Task 4

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Network Intrusion Detection System (NIDS) — CodeAlpha Task 4

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.


Project Architecture

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

Custom Detection Rules (rules/local.rules)

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.

Automated Response Mechanism (scripts/ids_responder.py)

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 /admin access probes.
  • LOW Severity (NOTIFY): Logs ICMP reconnaissance pings.

Setup & Reproduction Steps

  1. Validate Suricata Configuration:
    sudo suricata -T -c /etc/suricata/suricata.yaml -v
  2. Start Suricata in Live IDS Mode:
    sudo suricata -c /etc/suricata/suricata.yaml -i eth0 -i lo
  3. Start the Real-Time Alert Responder:
    sudo python3 scripts/ids_responder.py
  4. 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

About

Real-Time Network Intrusion Detection System (NIDS) built with Suricata 8.0.8 and Python on Kali Linux — CodeAlpha Task 4

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages