Reconnaissance and exfiltration
Port scanning
Probing an address's ports to learn which services it exposes, and whether a firewall sits in the way.
A scanner sends a probe to each port and sorts the replies into open (accepted), closed (a reset:
reachable, nothing listening) and filtered (no answer: something dropped it). A ping sweep (nmap -sn) first
finds which hosts are up. TCP scans are quick and definite; UDP has no handshake, so a silent port reads as
open|filtered. The three states are why a scan quietly reveals a firewall: silence means a drop.