Bitzu

312-50 ยท Scanning networks

Network scanning and the TCP three-way handshake

Purpose of scanning, TCP flags and the three-way handshake, ICMP types, and what scanning produces.

Key points

  • Scanning probes targets to learn which hosts are alive, which ports are open, which services run and which OS they use.
  • TCP connections start with SYN, the server answers SYN/ACK if the port is open (RST if closed), and the client finishes with ACK.
  • Most scan types are variations on how far they take this exchange.

Source: https://linux.die.net/man/1/nmap

Practice questions

Single choice

Which flags does a server set in the second step of the TCP three-way handshake when the port is open?

  1. SYN and ACK
  2. ACK only
  3. FIN and ACK
  4. RST and ACK
Show answer

Answer: A. SYN and ACK

An open port answers a SYN with SYN/ACK. A bare ACK is the client's last step and RST/ACK signals a closed port.

Select all that apply

Which items are typical outputs of a network scan?

  1. A list of live hosts
  2. Open, closed and filtered port states
  3. Names of services listening on ports
  4. Plaintext user passwords
  5. The application's source code
Show answer

Answer: A. A list of live hosts, B. Open, closed and filtered port states, C. Names of services listening on ports

Scans reveal live hosts, port states and service names. Passwords and source code are not obtained by probing ports.

True or false

A host that does not answer ICMP echo requests must be offline.

Show answer

Answer: False

False. Firewalls often drop ICMP while the host and its TCP services are fine, which is why scanners also try TCP and ARP probes.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More 312-50 topics in this module