A tool to detect DNS poisoning attacks.
Project description
DNS Poisoning Detector
Overview
The DNS Poisoning Detector is a Python-based tool designed to monitor DNS traffic, detect potential DNS poisoning attacks, and generate detailed PDF reports of its findings. This tool is particularly useful for network administrators and security professionals who want to enhance their network's security posture against DNS-based attacks.
Features
- Real-time DNS traffic monitoring
- Detection of suspicious DNS responses
- Customizable detection parameters
- Detailed PDF report generation
- Easy-to-use command-line interface
Installation
-
Clone the repository:
git clone https://github.com/akintunero/dns_poisoning_detector.git cd dns_poisoning_detector -
Create a virtual environment (optional but recommended):
python3 -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate` -
Install the required dependencies:
pip install -r requirements.txt
Usage
To run the DNS Poisoning Detector:
sudo python3 main.py
Note: Sudo privileges are required for packet sniffing.
The tool will monitor DNS traffic for a specified duration (default is 60 seconds) and generate a PDF report in the reports/ directory if any suspicious activities are detected.
Configuration
You can customize the tool's behavior by modifying the config/config.yaml file. Available options include:
monitoring_duration: Duration of DNS traffic monitoring in secondssuspicious_ip_threshold: Threshold for considering an IP address suspiciousreport_filename: Custom filename for the generated PDF report
Development
To contribute to the project:
- Fork the repository
- Create a new branch
- Create a new Pull Request
Dependencies
- Python 3.7+
- Scapy: For packet sniffing and analysis
- ReportLab: For PDF report generation
- PyYAML: For configuration file parsing
License
This project is licensed under the MIT License - see the LICENSE file for details.
Disclaimer
This tool is for educational and professional use only. Always obtain proper authorization before monitoring network traffic on systems you do not own or have explicit permission to test.
Extending the Tool
The modular structure allows for easy extensions:
detector.py: Implement new detection algorithms or enhance existing ones.report_generator.py: Customize report formats or add new visualization types.utils.py: Add utility functions for data processing or analysis.
Troubleshooting
Common issues and solutions:
- Permission Denied: Ensure the script is run with sudo privileges.
- No Packets Captured: Verify network interface settings and firewall rules.
- ImportError: Confirm all dependencies are correctly installed.
- Configuration Errors: Check
config.yamlfor syntax errors or invalid values.
For detailed error information, refer to the log file specified in the configuration.
Future Enhancements
- Implement real-time alerting system for immediate threat notification.
- Develop a web-based interface for easier configuration and result visualization.
- Add support for exporting results in various formats (CSV, JSON, etc.).
- Integrate machine learning algorithms for more accurate threat detection.
For feature requests or bug reports, please open an issue on the GitHub repository.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simple_dns_poisoning_detector-1.0.tar.gz.
File metadata
- Download URL: simple_dns_poisoning_detector-1.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f424133c233f0ab13f86a56f8d2a458136822dd05e992324792eb079521f1391
|
|
| MD5 |
f5702066180d64c67b36de2972045d62
|
|
| BLAKE2b-256 |
3139f2b8b0c4e5667340bd9b98fa8cbac34a3c5faf948088d72fc65d796cf2c9
|
File details
Details for the file simple_dns_poisoning_detector-1.0-py3-none-any.whl.
File metadata
- Download URL: simple_dns_poisoning_detector-1.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
608184975eb04957e1d8b6d697ee184b8da18919a0f1e5a87cbd98e3ead73f0e
|
|
| MD5 |
9f134d0eeb78d43eb2e64ad47eb80ea3
|
|
| BLAKE2b-256 |
f3a1e4b945693e913ccd5a3feddd6c50d79f70b862df4884205b470d2be66f1d
|