ACK flag scanning is useful to verify whether the server is blocked with firewalls, IPS, or other network security controls. As in the FIN scan, we will send an TCP ACK packet. No response or an ICMP error indicates the presence of a stateful firewall, as the port is filtered, and if we get back an RST-ACK, then the stateful firewall is absent:
TCP ACK scanning
How to do it...
The steps to create a TCP ACK scanner with Scapy are as following:
- As usual, import the required modules and set the variables. Also, define the method to check the status of the host:
from scapy.all import * # define the host, port host = 'rejahrehim.com' ip = socket.gethostbyname(host) port = 80 # define the method to check the status...