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.

TCP port scanIntroduction<strong>Scapy</strong>Network discovery <strong>and</strong> <strong>attacks</strong>One shotsScanningTTL tricksSend a TCP SYN on each portWait for a SYN-ACK or a RST or an ICMP errorSending packetsres,unans = sr( IP(dst="target")/TCP(flags="S", dport=(1,1024)) )Possible result interpretation: open portsres.nsummary( filter=lambda (s,r): \(r.haslayer(TCP) <strong>and</strong> \(r.getlayer(TCP).flags & 2)) )Philippe 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!