How to use hping3

hping3 is a network tool able to send custom TCP/IP packets and to display target replies like ping program does with ICMP replies. hping3 handle fragmentation, arbitrary packets body and size and can be  used  in  order  to transfer files encapsulated under supported protocols. Using hping3 you are able to perform at least the following stuff:

  • Test firewall rules
  • Advanced port scanning
  • Test net performance using different protocols,
  • packet size, TOS (type of service) and fragmentation.
  • Path MTU discovery
  • Transferring files between even really fascist firewall rules.
  • Traceroute-like under different protocols.
  • Firewalk-like usage.
  • Remote OS fingerprinting.
  • TCP/IP stack auditing.
  • A lot of others.

Basic Commands - 

hping3 --traceroute -V -1



       -h --help

              Show an help screen on standard output, so you can pipe to less.


       -v --version

              Show version information and API used to access to data link layer, linux sock packet or libpcap.


       -c --count count

              Stop after sending (and receiving) count response packets. After last packet was send hping3 wait COUNTREACHED_TIMEOUT seconds target host replies. You are able to tune COUNTREACHED_TIMEOUT editing hping3.h


       -i --interval

              Wait the specified number of seconds or micro seconds between sending each packet.  --interval X set wait to X seconds, --interval uX set wait to X micro seconds.  The default  is  to  wait  one  second  between  each

              packet.  Using  hping3  to  transfer files tune this option is really important in order to increase transfer rate. Even using hping3 to perform idle/spoofing scanning you should tune this option, see HPING3-HOWTO for

              more information.


       --fast Alias for -i u10000. Hping will send 10 packets for second.



              Alias for -i u1. Faster then --fast ;) (but not as fast as your computer can send packets due to the signal-driven design).



              Sent packets as fast as possible, without taking care to show incoming replies.  This is ways faster than to specify the -i u0 option.


       -n --numeric

              Numeric output only, No attempt will be made to lookup symbolic names for host addresses.


       -q --quiet

              Quiet output. Nothing is displayed except the summary lines at startup time and when finished.


       -I --interface interface name

              By default on linux and BSD systems hping3 uses default routing interface.  In other systems or when there is no default route hping3 uses the first non-loopback interface.  However you are able to force hping3 to use

              the interface you need using this option. Note: you don't need to specify the whole name, for example -I et will match eth0 ethernet0 myet1 et cetera. If no interfaces match hping3 will try to use lo.


       -V --verbose

              Enable verbose output. TCP replies will be shown as follows:


              len=46 ip= flags=RA DF seq=0 ttl=255 id=0 win=0 rtt=0.4 ms tos=0 iplen=40 seq=0 ack=1380893504 sum=2010 urp=0


       -D --debug

              Enable  debug  mode,  it's  useful  when you experience some problem with hping3. When debug mode is enabled you will get more information about interface detection, data link layer access, interface settings, options

              parsing, fragmentation, HCMP protocol and other stuff.


       -z --bind

              Bind CTRL+Z to time to live (TTL) so you will able to increment/decrement ttl of outgoing packets pressing CTRL+Z once or twice.


       -Z --unbind

              Unbind CTRL+Z so you will able to stop hping3.


       --beep Beep for every matching received packet (but not for ICMP errors).


How to install - 

[root@localhost ~]# yum install hping3

Yum command has been deprecated, redirecting to '/usr/bin/dnf install hping3'.

See 'man dnf' and 'man yum2dnf' for more information.

To transfer transaction metadata from yum to DNF, run:

'dnf install python-dnf-plugins-extras-migrate && dnf-2 migrate'

Warning: failed loading '/etc/yum.repos.d/google-chrome.repo', skipping.

Last metadata expiration check: 1:06:40 ago on Tue Dec 13 17:18:50 2016.

Dependencies resolved.


 Package                                               Arch                                                Version                                                               Repository                                             Size



 hping3                                                i686                                                0.0.20051105-26.fc24                                                  fedora                                                106 k


Transaction Summary


Install  1 Package


Total download size: 106 k

Installed size: 217 k

Is this ok [y/N]: y

Downloading Packages:

hping3-0.0.20051105-26.fc24.i686.rpm                                                                                                                                                                         230 kB/s | 106 kB     00:00


Total                                                                                                                                                                                                         51 kB/s | 106 kB     00:02

Running transaction check

Transaction check succeeded.

Running transaction test

Transaction test succeeded.

Running transaction

  Installing  : hping3-0.0.20051105-26.fc24.i686                                                                                                                                                                                         1/1

  Verifying   : hping3-0.0.20051105-26.fc24.i686                                                                                                                                                                                         1/1



  hping3.i686 0.0.20051105-26.fc24



Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.