Real-Time Intrusion Detection System using Signature-Based Detection, DNS Threat Intelligence, and Machine Learning-Based Attack Classification.
This project implements a Real-Time Intrusion Detection System (IDS) that combines Signature-Based Detection, DNS Threat Intelligence, and Machine Learning-Based Attack Classification to identify and categorize suspicious network activities.
The system continuously monitors live network traffic, detects suspicious behavior using predefined signatures and threat intelligence indicators, and classifies detected events into attack categories using a Machine Learning model trained on the UNSW-NB15 dataset.
The IDS was tested in a VMware virtual environment using Kali Linux and Ubuntu machines to simulate attacks and validate detection capabilities.
Detects common attack patterns including:
- Port Scanning
- SSH Brute Force
- RDP Scanning
- SYN Flood Attacks
- ICMP Flood Attacks
Detects communication with known malicious domains.
Example:
malware.wicar.org
The IDS compares DNS queries against a maintained list of known malicious domains and generates alerts when matches are detected.
The Machine Learning model classifies suspicious activities into attack categories from the UNSW-NB15 dataset, including:
- Analysis
- Backdoor
- DoS
- Exploits
- Fuzzers
- Generic
- Normal
- Reconnaissance
- Shellcode
- Worms
This project uses the UNSW-NB15 dataset developed by the Australian Centre for Cyber Security (ACCS).
Dataset Link:
https://research.unsw.edu.au/projects/unsw-nb15-dataset
The dataset contains modern network traffic and attack scenarios used for training and evaluating intrusion detection systems.
The IDS uses a Machine Learning classifier trained on the UNSW-NB15 dataset to categorize detected events into attack families.
The trained model file (intrusion_model.pkl) is not included in this repository due to GitHub file size limitations.
To regenerate the model:
python src/train_model.pyGenerated files:
models/
├── intrusion_model.pkl
├── feature_columns.pkl
├── label_encoders.pkl
└── attack_encoder.pkl
git clone https://github.com/sushmasri-msr/real-time-ids-with-attack-classification.git
cd real-time-ids-with-attack-classificationpython -m venv venvWindows:
venv\Scripts\activateLinux:
source venv/bin/activatepip install -r requirements.txtpython src/main.pySelect the desired network interface when prompted.
python src/dashboard.pyOpen:
http://127.0.0.1:5000
From Kali Linux:
sudo nmap -sS -T5 -p 22,23,445,3306,3389 TARGET_IPsudo nmap -sS TARGET_IPnslookup malware.wicar.orgThe Machine Learning model was trained on the UNSW-NB15 dataset, which contains traffic collected in a controlled laboratory environment.
During deployment, the IDS analyzes live network traffic that may differ significantly from the original training data. Consequently, confidence scores may be lower when observed traffic patterns do not closely resemble the dataset used during training.
Lower confidence scores do not necessarily indicate incorrect classification; rather, they reflect differences between real-world traffic and the training dataset.
- Signature-based detection can only identify known attack patterns.
- Machine Learning classification accuracy depends on the quality and diversity of training data.
- The malicious domain database used for DNS Threat Intelligence requires regular updates to remain effective against emerging threats.
- New and previously unseen attack techniques may bypass detection mechanisms.
- Real-world traffic may differ from the laboratory dataset used for training.
- Integration with Suricata rules
- Threat Intelligence API integration
- Automated malicious IP blocking
- SIEM integration (Splunk / ELK)
- Advanced flow-based feature extraction
- XGBoost and LightGBM attack classification
- Automated malicious domain feed updates
- Threat hunting dashboard enhancements
Sushma Sri Miryala

