0% found this document useful (0 votes)
59 views10 pages

UDP and TCP Packet Crafting Techniques Using HPING3 - v2

Uploaded by

NNAEMEKA BOSAH
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views10 pages

UDP and TCP Packet Crafting Techniques Using HPING3 - v2

Uploaded by

NNAEMEKA BOSAH
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

UDP and TCP Packet Crafting Techniques

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.

Lab Duration: XX Minutes

1. Login to your Windows 10 virtual machine.

2. Install Wireshark and Navigate to Start --> All Apps and click Wireshark to launch
the application.

Open File - Security Warning pop-up appears click Run


User Account Control pop-up appears, click Yes
3. Wireshark main window appears as shown in the screenshot. Double-click the Ethernet
interface you want to start capturing packets.

4. Wireshark starts capturing the traffic on the Ethernet interface.

5. Now login to your Kali linux machine.


6. Enter your Username and Password and click Log In.
7. Open a command terminal and type hping3 -c 3 172.16.16.x1 and press Enter.

Here, -c 3 means that we only want to send three packets to the target machine.

Here, 172.16.16.x1 is the target machine which is your Windows 10 machine.


Check your individual IP address.

8. Type hping3 --scan 1-3000 -S 172.16.16.x1 and press Enter.

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.

Stop the packet capture after a while

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.

You might also like