Write some simple Scapy/Python code to launch the scan or icmp attack. Revise them for implementing NULL
Fantastic news! We've Found the answer you've been seeking!
Question:
Write some simple Scapy/Python code to launch the scan or icmp attack.
Revise them for implementing NULL scan, large ICMP payload attack, or detection evasion etc.
(1) Sample Code for FIN_Scan (you can make simple revision to turn it into other scan functions):
def FIN_Scan(dstIP, dstPort):
src_port = RandShort()
Fin_Scan_Rsp = sr1(IP(dst=dstIP)/TCP(sport=src_port,dport=dstPort, flags="F"), verbose=0,timeout=3)
if "NoneType" in str(type(Fin_Scan_Rsp)) :
print("Port "+str(dstPort)+" on host "+dstIP+" is open, or maybe FIN Scan is filtered!")
(2) The icmp packets can be constructed as
Packet = ip/icmp/data
Related Book For
Accounting for Decision Making and Control
ISBN: 978-0078025747
8th edition
Authors: Jerold Zimmerman
Posted Date: