Skip to main content

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

  1. Clone the repository:

    git clone https://github.com/akintunero/dns_poisoning_detector.git
    cd dns_poisoning_detector
    
  2. Create a virtual environment (optional but recommended):

    python3 -m venv venv
    source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
    
  3. 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 seconds
  • suspicious_ip_threshold: Threshold for considering an IP address suspicious
  • report_filename: Custom filename for the generated PDF report

Development

To contribute to the project:

  1. Fork the repository
  2. Create a new branch
  3. 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:

  1. Permission Denied: Ensure the script is run with sudo privileges.
  2. No Packets Captured: Verify network interface settings and firewall rules.
  3. ImportError: Confirm all dependencies are correctly installed.
  4. Configuration Errors: Check config.yaml for 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.

Metadata

Release files for simple-dns-poisoning-detector 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simple-dns-poisoning-detector 1.0
File Size Uploaded Provenance Actions
simple_dns_poisoning_detector-1.0.tar.gz 5.6 kB Without provenance Details for simple_dns_poisoning_detector-1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for simple-dns-poisoning-detector 1.0
File Interpreter ABI Platform Actions
simple_dns_poisoning_detector-1.0-py3-none-any.whl Python 3 none any Details for simple_dns_poisoning_detector-1.0-py3-none-any.whl

Total release size: 12.5 kB

Release files / simple_dns_poisoning_detector-1.0.tar.gz

Download URL simple_dns_poisoning_detector-1.0.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f424133c233f0ab13f86a56f8d2a458136822dd05e992324792eb079521f1391
BLAKE2b-256 checksum
How to use checksums
3139f2b8b0c4e5667340bd9b98fa8cbac34a3c5faf948088d72fc65d796cf2c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.10

Release files / simple_dns_poisoning_detector-1.0-py3-none-any.whl

Download URL simple_dns_poisoning_detector-1.0-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
608184975eb04957e1d8b6d697ee184b8da18919a0f1e5a87cbd98e3ead73f0e
BLAKE2b-256 checksum
How to use checksums
f3a1e4b945693e913ccd5a3feddd6c50d79f70b862df4884205b470d2be66f1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.10

Security for simple-dns-poisoning-detector 1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page