hping3

network tool for crafting TCP/IP packets

TLDR

TCP SYN ping
$ sudo hping3 -S -p [80] [target]
ICMP ping
$ sudo hping3 -1 [target]
UDP ping
$ sudo hping3 -2 -p [53] [target]
Traceroute mode
$ sudo hping3 --traceroute -p [80] -S [target]
Flood mode
$ sudo hping3 --flood -S -p [80] [target]
Set source port
$ sudo hping3 -S -p [80] -s [12345] [target]
Scan a range of ports
$ sudo hping3 -8 [1-1000] -S [target]

SYNOPSIS

hping3 [options] host

DESCRIPTION

hping3 is a network tool for crafting TCP/IP packets. It's used for firewall testing, port scanning, network testing, and security auditing. It provides more control than ping or traceroute.hping3 can send custom packets with specified flags, options, and payloads, making it valuable for penetration testing and troubleshooting. When no protocol mode is given, it defaults to TCP mode, sending headers to the target's port 0 with no flags set.

PARAMETERS

-S, --syn

Set SYN flag.
-A, --ack
Set ACK flag.
-F, --fin
Set FIN flag.
-p port
Destination port.
-s port
Source port.
-1, --icmp
ICMP mode.
-2, --udp
UDP mode.
-8, --scan range
Port scan mode, e.g. `-8 1-1000`.
-V, --verbose
Verbose output.
--flood
Flood mode (fast as possible).
--traceroute
Traceroute mode.
-i interval
Interval between packets.
-c count
Packet count.
-a address
Spoof source address.
--data size
Data size.

INSTALL

sudo apt install hping3
sudo dnf install hping3

CAVEATS

Requires root privileges. Flood mode can cause DoS. Spoofed packets may be illegal. For authorized testing only. Some features may trigger IDS.

HISTORY

hping was created by Salvatore Sanfilippo (antirez, also creator of Redis). hping3 is the latest version, adding scripting capabilities and improved functionality.

SEE ALSO

hping(8), nmap(1), ping(8), tcpdump(1), scapy(1)

RESOURCES

Source code