This is your Target.
Use this command to find your Target IP address:
Your Target IP address should be 172.16.1.203, as shown below.
Use this command to start scapy:
scapy opens, as shown below on this page.
This creates an object named i of type IP. To see the properties of that object, use the display() method with this command:
i = IP()
A list of values appears, starting with the version number (4) and ending with the source and destination IP addresses, as shown below on this page.
If the colors are difficult to see, adjust them by clicking Edit, "Profile Preferences", Colors. I used "Black on light yellow".
Use these commands to set the destination IP address and display the properties of the i object again.
Notice that scapy automatically fills in your machine's source IP address, as shown below on this page.
Use these commands to create an object named ic of type ICMP and display its properties:
There aren't many properties for this object--it's just an echo-request, as shown below on this page.
ic = ICMP()
Use this command to send the packet onto the network and listen to a single packet in response. Note that the third character is the numeral 1, not a lowercase L:
This command sends and receives one packet, of type IP at layer 3 and ICMP at layer 4. As you can see in the image below, the response is shown, with ICMP type echo-reply.
The Padding section shows the portion of the packet that carries higher-level data. In this case it contains only zeroes as padding, as shown below.
Use this command to send a packet that is IP at layer 3, ICMP at layer 4, and that contains data with your name in it (replace YOUR NAME with your own name):
You should see a reply with a Raw section containing your name, as shown below on this page.
Note that the second switch in the nc commmand is a lowercase L, not the numeral 1.
Leave that Terminal window open.
nc -ulp 4444
In the Terminal window, at the top, click File, "Open Terminal" to open a second Terminal window. In the second window, execute this command:
You should see UDP port 4444 open, as shown below on this page.
This creates an object named u of type UDP, and displays its properties, as shown below.
u = UDP()
Execute these commands to change the destination port to 4444 and display the properties again:
Your UDP packet's properties should look like the image below on this page:
u.dport = 4444
Execute this command to send the packet to the Target machine:
On the Windows target, you should see the message appear, as shown below on this page:
send(i/u/"YOUR NAME SENT VIA UDP\n")