10.08.2015 Views

Packet generation and network based attacks with Scapy - SecDev.org

Packet generation and network based attacks with Scapy - SecDev.org

Packet generation and network based attacks with Scapy - SecDev.org

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Introduction<strong>Scapy</strong>Network discovery <strong>and</strong> <strong>attacks</strong>One shotsScanningTTL tricksSliced Network ScanA way to give a depth to a simple flat <strong>network</strong> port scan1 Use nmap to scan the whole target <strong>network</strong>2 Spot interesting ports : open <strong>and</strong> closed ports, <strong>and</strong> somewitness filtered ports3 With a traceroute, find the TTL t one hop before the<strong>network</strong>’s first router4 Scan the <strong>network</strong> on these ports for TTL tans,unans=sr( IP(dst="<strong>network</strong>/24", ttl=t)/TCP(dport=[21,25,53,80,443,2]), retry=-2 )5 Display the scanned slice :ans.make_table(lambda (s,r): (s.dport, s.dst,r.sprintf("%IP.id% {TCP:%TCP.flags%}\{ICMP:%IP.src% %ir,ICMP.type%}")))6 Increment t <strong>and</strong> go to 4Philippe BIONDI<strong>Packet</strong> <strong>generation</strong> <strong>and</strong> <strong>network</strong> <strong>based</strong> <strong>attacks</strong> <strong>with</strong> <strong>Scapy</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!