hping3
hping3 crafts and sends custom TCP, UDP and ICMP packets, useful for testing firewall rules and understanding network behaviour.
Legal & ethical use. Use this tool only on systems, networks and data that you own or have explicit written permission to test. Unauthorised access or scanning can break computer-misuse laws (for example Pakistan's Prevention of Electronic Crimes Act, 2016, and equivalents elsewhere). Practise in your own lab or in authorised environments such as CTFs.
What it is used for
- Check how a firewall reacts to specific TCP flags in a lab
- Learn how handshakes and flags work by sending them manually
Key features
- Custom TCP/UDP/ICMP packets
- Traceroute-style mode
- Flag, port and interval control
Installation
Install from your distribution (for example `sudo apt install hping3`).
Beginner usage guide
Send a single SYN to a lab server and watch whether it answers with SYN/ACK or RST to see if the port is open or filtered.
Example commands
Run these only against your own lab or authorised targets. Placeholder addresses such as 192.0.2.x are documentation ranges.
Send three TCP SYN packets to port 80
hping3 -S -p 80 -c 3 192.0.2.10-S sets the SYN flag, -p the destination port and -c the packet count. Use only against your own lab host.
References
Source verification
Last reviewed: 2026-10-27
Links checked over HTTP: 2026-10-27 07:51 UTC — official: 200, docs: 200
Command flags checked against the real binary hping3 (hping3 version 3.0.0-alpha-2 ($Id: release.h,v 1.4 2004/04/0...) on 2026-10-27.
