Created: 2022-07-03
Tags: #literature
Abstract:
TCP SYN Scan (-st)
is DEFAULT without SUDO permission.
Performs three-way handshake with each target port in turn.
reply RST flag -> port CLOSED
reply SYN/ACK flag -> port OPEN
no reply at all. -> port behind FIREWALL
Detailed explanation below
to a specified port in the target server.
The target server

Basically, it will act as if doing a three-way handshake
Many firewalls are configured to drop incoming packets.
-> TCP SYN Scan sends TCP SYN request,
-> Receives nothing back.
This indicates that the port is being protected by a firewall
Thus the port is considered to be filtered.
Can be difficult/impossible to get an accurate reading of target.
In IPtables for Linux, if we run this command:
iptables -I INPUT -p tcp --dport <port> -j REJECT --reject-with tcp-reset
When the command is executed above ^
Any requests of ports behind the ==firewall will respond RST TCP packet==.
^ In other words, the command allows the firewall
"... If the connection does not exist (CLOSED)
-> then a reset is sent in response to any incoming segment except another reset.
In particular, SYN addressed to a non-existent connection are rejected by this means."