Friday 17 April 2015
DNS Stress testing with hping3
1. Compile our program to generate the DNS payload
(sipher@utensil)(~/dnsstress)$ gcc gr2.c -o gr2
2. Generate DNS payload
(sipher@utensil)(~/dnsstress)$ ./gr2
(sipher@utensil)(~/dnsstress)$ hexdump -C dns.txt
00000000 24 1a 01 00 00 01 00 00 00 00 00 00 06 67 6f 6f |$............goo|
00000010 67 6c 65 03 63 6f 6d 00 00 01 00 01 |gle.com.....|
0000001c
3. Get the size of the request (Important for passing to hping3 -d paramater)
(sipher@utensil)(~/dnsstress)$ ls -lah |grep dns.txt
-rw-rw-r-- 1 striemer striemer 28 Apr 17 10:30 dns.txt
(sipher@utensil)(~/dnsstress)$
4. Fire!!
use --flood if you're brave. Use --rand-source to test state tables.
(sipher@utensil)(~/dnsstress)$ sudo hping3 localhost --udp -V -p 53 --file /home/sipher/dnsstress/dns.txt -d 28 --fast
Alternate way to deliver the packets...
NOTE: Won't be as fast since it's not using raw sockets and it's waiting for reply.
(sipher@utensil)(~/dnsstress)$ nc -u localhost 53 < dns.txt
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment