May 2018
Beginner
230 pages
4h 49m
English
The ACK scanning method is used to determine whether the host is protected by some kind of filtering system.
In this scanning method, the attacker sends an ACK probe packet with a random sequence number where no response means that the port is filtered (a stateful inspection firewall is present in this case); if an RST response comes back, this means the port is closed.
Now, let's go through this code:
from scapy.all import * ip1 = IP(src="192.168.0.10", dst ="192.168.0.11") sy1 = TCP(sport =1024, dport=137, flags="A", seq=12345) packet = ip1/sy1 p =sr1(packet) p.show()
In the preceding code, the flag has been set to ACK, and the destination port is 137.
Now, check the output:
root@Mohit|Raj:/scapy# python ack.py WARNING: ...
Read now
Unlock full access