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

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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

1 Simple FIN Scan from scapyall import def FINScandstIP dstP... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Network Questions!