Installing and using hping

hping is a free packet generator and analyzer, well suited for testing the security of network devices.

Ubuntu/Debian installation command:

sudo apt-get install hping3

The built-in help for launching can be viewed by typing:

hping -h

Launch, for example, send 5 packets through the eth0 interface to port 80 to host

sudo hping3 -I eth0 -p 80 -s 4545 -c 5 -V -S

-V (display detailed information)
-S (SYN)
-p (destination port)
-s (source port)
-s (number of packets)
-I (interface from which packets will be sent)

I will also describe several possible parameters:
-i (interval before sending the next packet)
–fast (10 packets per second, similar to -i u10000)
–faster (100 packets per second, similar to -i u1000)
–flood (maximum packets per second, no response displayed)
-D (debug mode)
–beep (signal upon successful response)
–rand-dest (random receiver)
–rand-source (random source)
-t (–ttl)

Possible modes:
-0 (–rawip)
-1 (–icmp)
-2 (–udp)
-8 (–scan, e.g. –scan 1-500,1500-1600)
-9 (–listen)

You can stop the execution of a command by pressing Ctrl+Z or Ctrl+C.

Leave a comment

Leave a Reply