Giter VIP home page Giter VIP logo

twistythreat's Introduction

TwistyThreat

TwistyThreat is a Go-based application that integrates with dnstwist and VirusTotal to analyze domain names for potential security threats. The application reads a list of domains, performs DNS permutation analysis using dnstwist, checks the status of each domain using VirusTotal, categorizes the results, and sends a condensed report of suspicious domains to an HTTP endpoint.

Features

  • Domain permutation analysis using dnstwist
  • Integration with VirusTotal for threat intelligence
  • Categorizes domains as registered, unregistered, or suspicious
  • Sends condensed suspicious domain reports to a specified HTTP endpoint
  • Dockerized for easy deployment

Prerequisites

  • Docker
  • Docker Compose

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/your-repo.git
    cd your-repo
  2. Create a .env file in the root directory with your environment variables:

    VIRUSTOTAL_API_KEY=your_api_key_here
  3. Create a domains.txt file with the list of domains to analyze, one per line:

    example1.com
    example2.org
    example3.net

Docker Setup

  1. Dockerfile:

    The Dockerfile sets up the environment for both dnstwist and your Go application.

    # Use an official Python runtime as a parent image
    FROM python:3.12-alpine
    
    # Install Go and other dependencies
    RUN apk add --no-cache go git build-base
    
    # Install dnstwist
    RUN pip install dnstwist
    
    # Set the working directory inside the container
    WORKDIR /app
    
    # Clone the GitHub repository
    RUN git clone https://github.com/jwhitt3r/twistythreat.git .
    
    # Set up the Go environment and install dependencies
    RUN go mod download
    
    # Build the Go application
    RUN go build -o twistythreat cmd/twistythreat/main.go
    
    # Run the application
    CMD ["./twistythreat"]
  2. Docker Compose:

    Create a docker-compose.yml file to define the services and configurations.

    services:
      twistythreat:
        build: .
        env_file:
          - .env
        volumes:
          - ./output:/app/output
        command: ["./twistythreat"]

Usage

  1. Build and run the application using Docker Compose:

    docker-compose up --build
  2. The application will:

    • Read the domains from domains.txt
    • Perform analysis using dnstwist
    • Check each domain's status with VirusTotal
    • Categorize the results into registered, unregistered, and suspicious
    • Save the results to respective files (registered.txt, unregistered.txt, suspicious.txt)
    • Send the condensed suspicious report to the specified HTTP endpoint

Environment Configuration

  • .env File:

    Create a .env file in the root directory of your project with the following content:

    VIRUSTOTAL_API_KEY=your_api_key_here
    HTTP_ENDPOINT=your_domain_here
  • domains.txt File:

    Create a domains.txt file in the root directory of your project with the list of domains to analyze, one per line:

    example1.com
    example2.org
    example3.net

Example Output

All outputs listed below will be saved into the output directory:

  • registered.txt: Contains domains that are currently registered.
  • unregistered.txt: Contains domains that are not registered.
  • suspicious.txt: Contains domains flagged as suspicious by VirusTotal.
  • condensed_suspicious.txt: Contains a condensed report of suspicious domains, including the domain name, VirusTotal link, and determination.

Sending Condensed Report to HTTP Endpoint

The application sends the condensed_suspicious.txt file to a specified HTTP endpoint. Modify the HTTP_ENDPOINT variable in .env to your desired endpoint:

License

This project is licensed under the GNU General Public License v3.0 License. See the LICENSE file for details.

Acknowledgements

dnstwist: This project uses dnstwist, a tool for domain name permutation analysis to detect potential threats. dnstwist is licensed under the Apache License 2.0.

Contact

For any questions or issues, please open an issue on GitHub or contact me at Mastodon: @[email protected]

twistythreat's People

Contributors

jwhitt3r 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.