UDP and TCP Packet Crafting Techniques Using HPING3 - v2
UDP and TCP Packet Crafting Techniques Using HPING3 - v2
using HPING3
Scenario
Overview
In network scanning, your first procedure will be to scan the target network to determine all
possible open ports, live hosts, and services running. Knowledge of packet crafting techniques
may help you to scan the network beyond the firewall or IDS.
Lab Scenario
Packet crafting is a technique that allows you to probe firewall rule sets and find entry points into
a targeted system or network. This is done by manually generating packets to test network
devices and behavior, instead of using existing network traffic. This lab will help you understand
how to perform network scanning and packet crafting using hping3 commands.
2. Install Wireshark and Navigate to Start --> All Apps and click Wireshark to launch
the application.
Here, -c 3 means that we only want to send three packets to the target machine.
Here, --scan parameter defines the port range to scan and –S represents SYN flag.
9. To perform UDP packet crafting, type hping3 172.16.16.x1 --udp --rand-source --data
500 and press Enter.
10. Switch to the Windows 10 machine. Click any UDP packet to see the packet details. In
the packet details pane, expand the Data section to view the data size of the packet.
11. Click the Restart Packet Capturing icon from the menu bar and click Continue
Without Saving button in Unsaved packets… pop-up.
12. Switch to the Kali Linux machine and send a TCP SYN request to the target machine,
type hping3 -S 172.16.16.x1 -p 80 -c 5 and press Enter.
-S will perform TCP SYN request on the target machine, -p will pass the traffic
through which port is assigned, and -c is the count of the packets sent to the
Target machine.
13. Switch to the Windows 10 machine and observe the TCP packets captured via
Wireshark.
14. Switch to the Kali Linux machine and type hping3 172.16.16.x1 --flood and press
Enter.
15. Switch to the Windows 10 machine and observe the Wireshark window, which displays
the TCP packet flooding from the attacker machine.
16. Double-click the TCP packet stream to observe the TCP packet information. The TCP
Packet stream displays the complete information of TCP packet transmitted to the
attacker machine and received packets.
This lab will helped you understand how to perform network scanning and packet crafting using
hping3 commands.