Using Scapy
Basics
iptables –A OUTPUT –p tcp –tcp-flags RST RST –j DROP# send and receive [packet], define the return as ans and unans with “_”, print the summary
sr([packet]);
ans, unans = _
ans.summary()
# send a TCP snipe to end the connection, must hit the correct seq from the most recent ack in order to be accepted
send(IP(dst=”192.168.1.200”)/TCP(sport=45089, dport=999, flags=”RA”, seq=3689929657))
i = sniff(filter=”host 192.168.1.100 and icmp”, count=2)
i.summary()Last updated