how to install hping3 in linux

Hacking Truth

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  encapsu‐ lated under supported protocols. Using hping3 you are able to perform at least the following stuff. how to install hping3 in linux

  • - 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 firewal rules.
  • - Traceroute-like under different protocols.
  • - Firewalk-like usage.
  • - Remote OS fingerprinting.
  • - TCP/IP stack auditing.
  • - A lot of others.

It's  also a good didactic tool to learn TCP/IP.

How To Install ?

Type apt-get install hping3 and press enter

For Help command

hping3 -h


-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 COUN‐TREACHED_TIMEOUT seconds target host replies. You are able to tune COUNTREACHED_TIMEOUT editing hping2.h

-i --interval
Wait the specified number of seconds or micro seconds between sending each packet.  --interval X set wait to X sec‐
onds,  --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.


hping3 -S -p 80

A nice feature is the “++”, which will increase the destination port in the packets by one. You can also press ‘ctrl+z’, instead of using ++, to increase the port number during the scan.


hping3 -S -p ++79

A spoofed scan of the server by the attacker

hping3 -a -S -p ++20

SYN flood attack

hping3 -a -S -p 80 –flood

UDP flood attack

hping3 –udp -S -p 80 –flood

ICMP flood attack

hping3 –icmp  -S -p 80 –flood

Random Source Attack

hping3 –rand-source  -S

Change TTL of packet

hping3 –ttl {value} -S {destination ip}

Limit Packet count

hping3 –count {no. of packet} -S {destination ip}

Scan Mode:

hping3 –scan 1-100 -S {target Ip}

Set Packet Flag

Set FIN flag

hping3 –fin -S {target ip}

Set SYN Flag
hping3 –syn -S {target ip}

Set RST flag
hping3 {target ip} –rst -S

Set PUSH flag
hping3 –push -S {target ip}

Set ACK flag
hping3 –ack -S {target ip}

Set URG flag
hping3 –urg -S {target ip}

hping3 –traceroute -S {target ip}

Verbose Mode:

hping3 -V -S {target ip}


This was written for educational purpose and pentest only.
The author will not be responsible for any damage ..!
The author of this tool is not responsible for any misuse of the information.
You will not misuse the information to gain unauthorized access.
This information shall only be used to expand knowledge and not for causing  malicious or damaging attacks. Performing any hacks without written permission is illegal ..!

All video’s and tutorials are for informational and educational purposes only. We believe that ethical hacking, information security and cyber security should be familiar subjects to anyone using digital information and computers. We believe that it is impossible to defend yourself from hackers without knowing how hacking is done. The tutorials and videos provided on is only for those who are interested to learn about Ethical Hacking, Security, Penetration Testing and malware analysis. Hacking tutorials is against misuse of the information and we strongly suggest against it. Please regard the word hacking as ethical hacking or penetration testing every time this word is used.

All tutorials and videos have been made using our own routers, servers, websites and other resources, they do not contain any illegal activity. We do not promote, encourage, support or excite any illegal activity or hacking without written permission in general. We want to raise security awareness and inform our readers on how to prevent themselves from being a victim of hackers. If you plan to use the information for illegal purposes, please leave this website now. We cannot be held responsible for any misuse of the given information.

- Hacking Truth by Kumar Atul Jaiswal

Video Tutorial :-  SooN


I hope you liked this post, then you should not forget to share this post at all.
Thank you so much :-)

Post a Comment

* Please Don't Spam Here. All the Comments are Reviewed by Admin.
Post a Comment (0)
Our website uses cookies to enhance your experience. Learn More
Accept !