hping3 Cheatsheet
hping3 is a versatile and powerful command-line utility that is primarily used for crafting and sending custom packets over a network.
To install this tool, run the below command according to you Linux distro:
For Debian/Ubuntu:
1 |
|
For Fedora:
1 |
|
For Arch Linux:
1 |
|
This tool need root privilages, so run this tool as root or use sudo before the commands. Replace “target” with your target IP.
Basic Commands:
Send TCP packets:
1 |
|
Enable verbose mode:
1 |
|
Send raw IP packets:
1 |
|
Send ICMP packets:
1 |
|
Send UDP packets:
1 |
|
Enable listen mode:
1 |
|
Send specific number of packets:
1 |
|
Send packets with a specific TTL:
1 |
|
Perform traceroute:
1 |
|
Enable TCP timestamp:
1 |
|
Basic TCP/UDP Scanning:
TCP SYN scan:
1 |
|
TCP FIN scan:
1 |
|
TCP ACK scan:
1 |
|
TCP PUSH scan:
1 |
|
TCP URG scan:
1 |
|
TCP XMAS scan:
1 |
|
UDP scan:
1 |
|
Scan group of ports:
1 |
|
Advanced Scanning and Spoofing:
TCP SYN scan with spoofed source IP:
1 |
|
TCP SYN with specifying destination port:
1 |
|
TCP SYN scan with specific interface (Example: eth0):
1 |
|
Fragmentation and Data Manipulation:
Send fragmented packets:
1 |
|
FIN scan with packet fragmentation:
1 |
|
Send custom data in packets:
1 |
|
Send contents of a file as packet payload:
1 |
|
Traceroute:
Perform ICMP-based traceroute:
1 |
|
Perform UDP-based traceroute:
1 |
|
Flood/DoS Attacks:
Flood the target with packets:
1 |
|
Flood the target with UDP packets:
1 |
|
Other Options:
Print version information:
1 |
|
Display help and usage information:
1 |
|
Happy Hacking!