What Is Hping?
Hping is a free open source command line utility for network exploration, security scanning, packet crafting, and network testing. Its interface is inspired by the Unix ping command, but it can send TCP, UDP, ICMP and raw IP packets, not only ICMP echo requests. The original site listed Linux, FreeBSD, NetBSD, OpenBSD, Solaris, Mac OS X and Windows as supported systems. Hping is a packet assembler and analyzer that can be used to create, send, and receive custom TCP/IP packets and display the replies of the target. It is also useful for network administrators to audit firewalls and TCP/IP stacks, and for developers to debug network protocols.
Features of Hping
Hping can be used to send packets to a specific port and protocol, allowing for more precise network testing and troubleshooting.
Hping provides a wide range of features for testing, probing and security auditing. Here is a list of some of its features.
• Raw IP packet crafting: Allows the user to create custom IP packets with arbitrary fields.
• Traceroute mode: It can be used to trace the path of packets from source to destination under all the supported protocols, not only ICMP.
• ICMP mode: ICMP echo requests and other ICMP packet types can be sent, and the ICMP replies are displayed.
• UDP mode: Custom UDP packets can be sent and received.
• TCP mode: The user can control the source and destination ports, sequence number, and flags of TCP packets.
• Network scanning: Hping can be used for advanced port scanning of a target machine, including the idle (spoofed) scan method.
• Firewall testing: Hping can be used to test the effectiveness of firewalls.
• OS fingerprinting: It can help to identify the operating system of a remote host.
• Uptime guessing: Hping can estimate how long a remote host has been running from its TCP timestamps.
• Network statistics: Hping can display network statistics such as packet loss rate and round trip time.
• File transfer: Hping can send files between two hosts over a covert channel inside ordinary packets.
• Scripting: hping3 includes a Tcl scripting engine, so networking tests and small tools can be written as scripts.
• IP fragmentation: The user can control the IP fragmentation of packets.
• Network testing: Hping can be used to test networks with different protocols, TOS values and packet sizes.
• Path MTU discovery: Hping can be used for manual path MTU discovery.
• TCP/IP stack auditing: Hping can be used to check how TCP/IP stacks respond to unusual packets.
• Sending rate: The interval between packets can be adjusted, down to a flood mode for load tests.
• Education: Hping is also useful for students who are learning how TCP/IP works.
Conclusion
Hping is a powerful network tool that is used by network administrators, developers, and security professionals for a wide range of tasks and purposes. Its features make it a good choice for firewall testing, port scanning, packet crafting, and network testing. It is free software released under the GNU GPL version 2, but it is no longer developed: the last hping3 release dates from 2005, and the source code is kept in the author's GitHub repository. It is aimed at users who are comfortable with the command line and with TCP/IP basics.