Question: Scapy > > sudo apt - get install python - scapy > > sudo apt - get install imagemagick > > sudo apt - get
Scapy
sudo aptget install pythonscapy
sudo aptget install imagemagick
sudo aptget install graphviz
Go into Scapy
sudo scapy
The first thing we are going to do is run a Scapy ls function, which lists all available layers:
ls
What do you see?
Scapy can do pure packet dumps like tcpdump:
ifconfig
find interfaces
sniffifaceen prnlambda x: xshow
What do you see?
What is the value of the data you see? How could you use it
Send an ICMP packet:
hsrIPdstICMP
h
hshow
What do you see?
Now add your own payload
hsrIPdstICMPHello Google
hshow
Now, if you are bridged, you may be able to communicate with your friend. Get his or her IP then send packets with your own payload message. On the receiving end, they can set tcpdump to listen to the message
A command such as:
sudo tcpdump nnvvXSs i ethproto ICMP
Can you think of some use for this approach?
Sniffing:
sniff
Collect data for a while
Then control c
a
ansummary
What do you see?
Set your VM to bridged mode
You can also do some very slick network visualization of traceroutes if you install graphviz and imagemagic. This example is borrowed from the official Scapy documentation:
res,unans traceroute wwwmicrosoft.com","wwwcisco.com", wwwyahoo.com","wwwwanadoo.frwwwpacsec.com" dport maxttlretry
What do you see?
You can now create a fancy graph from those results:
res.graph
What do you see?
What does the graph tell you?
Try a few other websites
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
