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
sudo apt-get install hping3

For Fedora:

1
sudo dnf install hping3

For Arch Linux:

1
sudo pacman -S hping3

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
hping3 target

Enable verbose mode:

1
hping3 -V target

Send raw IP packets:

1
hping3 -0 192.168.149.1

Send ICMP packets:

1
hping3 -1 target

Send UDP packets:

1
hping3 -2 target

Enable listen mode:

1
sudo hping3 -9 signature

Send specific number of packets:

1
hping3 -c [count] target

Send packets with a specific TTL:

1
hping3 -t [ttl_value] target

Perform traceroute:

1
hping3 target --traceroute

Enable TCP timestamp:

1
hping3 --tcp-timestamp target

Basic TCP/UDP Scanning:

TCP SYN scan:

1
hping3 -S target

TCP FIN scan:

1
hping3 -F target

TCP ACK scan:

1
hping3 -A target

TCP PUSH scan:

1
hping3 -P target

TCP URG scan:

1
hping3 -U target

TCP XMAS scan:

1
hping3 -X target

UDP scan:

1
hping3 -2 target

Scan group of ports:

1
hping3 -8 [port_range] target

Advanced Scanning and Spoofing:
TCP SYN scan with spoofed source IP:

1
hping3 -S -a [spoofed_ip] target

TCP SYN with specifying destination port:

1
hping3 -S -p [port_number] target

TCP SYN scan with specific interface (Example: eth0):

1
hping3 -S -I eth0 target

Fragmentation and Data Manipulation:

Send fragmented packets:

1
hping3 -f target

FIN scan with packet fragmentation:

1
hping3 -F -f target

Send custom data in packets:

1
hping3 -d [data] target

Send contents of a file as packet payload:

1
hping3 -E [file_name] target

Traceroute:

Perform ICMP-based traceroute:

1
hping3 -1 --traceroute target

Perform UDP-based traceroute:

1
hping3 -2 --traceroute target

Flood/DoS Attacks:

Flood the target with packets:

1
hping3 target --flood

Flood the target with UDP packets:

1
hping3 -2 target --flood

Other Options:

Print version information:

1
hping3 -v

Display help and usage information:

1
hping3 --help

Happy Hacking!

© 2024 Encrypt Edge's Blog powered by Hexo

⬆︎TOP