Port scanning

Probing a host's network ports to learn which are open, closed or filtered and which services answer: a discovery step in vulnerability assessment and penetration testing that needs authorisation.

Port scanning sends probes to a range of ports on one or more hosts and interprets the replies to learn which ports are open, which are closed and which are filtered by a firewall. Further probes can reveal the services listening, their versions and sometimes the operating system. NIST SP 800-115, the Technical Guide to Information Security Testing and Assessment, treats port and service identification as a target identification technique: mapping what is there before checking it for weaknesses.

Scanners use several techniques. A full TCP connect scan completes the three-way handshake; a SYN or half-open scan sends the first packet and reads the reply without finishing the connection; UDP scanning is slower and less certain, because a port that stays silent may be open or filtered. The results feed a vulnerability assessment, and a port list compared against well-known ports is a starting point rather than proof of what is running. Scanning without permission can breach policy or law, and an intrusion detection system may flag it as reconnaissance.

Exam relevance: a scenario describing someone mapping open services is likely to be describing reconnaissance by port scanning, whether by an authorised tester or an attacker. Candidates are expected to place it early in testing, before any exploitation, and to remember that authorised scope comes first.