Giter VIP home page Giter VIP logo

dnstrafficanalyzer's Introduction

GitHub GitHub Pipenv locked Python version

DNSTrafficAnalyzer

The DNSTrafficAnalyzer Tool is a Python script designed for capturing and analyzing DNS traffic. Its purpose is to identify suspicious domain lookups, potential DNS tunneling, and communication with malicious domains - which makes it an essential tool for threat hunting and threat intelligence

Features

  • Captures and analyzes DNS traffic from a PCAP file.
  • Detects suspicious domain lookups by analyzing the queried domain names.
  • Identifies potential DNS tunneling by examining the DNS query types.
  • Alerts on communication with known malicious domains based on DNS responses.
  • Detects DNSSEC validation failures.
  • Identifies DNS amplification attacks.
  • Detects fast flux domains.
  • Identifies DNS rebinding.
  • Logs detected suspicious activities using a configurable logging system.

Usage

  1. Install the required dependencies by running pip install -r requirements.txt.

  2. Prepare a PCAP file containing DNS traffic that you want to analyze.

  3. Run the script by executing the following command:

    python dns_traffic_analysis.py <pcap_file>
    

    Replace <pcap_file> with the path to your PCAP file.

  4. The script will process the DNS traffic in the PCAP file and perform analysis.

  5. Suspicious domain lookups, potential DNS tunneling, or communication with malicious domains will be reported through the configured logging system.

  6. Review the logs generated by the script to identify any identified suspicious activities.

Customization

The DNS Traffic Analysis Tool provides basic implementations for suspicious domain lookups, DNS tunneling detection, and malicious communication detection. You can customize these functionalities to match your specific requirements.

  • To customize suspicious domain lookups, modify the is_suspicious_domain method in the DNSTrafficAnalyzer class.

  • To customize DNS tunneling detection, modify the is_dns_tunneling method in the DNSTrafficAnalyzer class.

  • To customize malicious communication detection, modify the is_malicious_communication method in the DNSTrafficAnalyzer class.

Dependencies

  • Python 3.6 or higher
  • dpkt library

License

This project is licensed under the MIT License.

Disclaimer

The DNSTrafficAnalyzer Tool is provided as-is without any warranty. Use it at your own risk and responsibility. Always ensure compliance with applicable laws and obtain proper authorization before analyzing network traffic that is not your own.

References

  • dpkt library - Python library for parsing network protocols, used for reading PCAP files and analyzing DNS traffic.

dnstrafficanalyzer's People

Contributors

5fingers avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.