Networking Basics
Port Numbers
Nmap Flags
Reading the Output
What Would You Do Next
100

Which protocol uses a three-way handshake, TCP or UDP?

TCP

100

What port does SSH use by default?

22

100

Which flag scans all 65,535 ports?

-p-

100

22/tcp open ssh: What port is open, and what does Nmap think is running on it?

Port 22, SSH

100

You just connected to a new network. What's your first step?

Host discovery: find what's alive, with arp-scan or nmap -sn.

200

What are the three steps of the TCP handshake, in order?

SYN, SYN-ACK, ACK

200

What service usually runs on port 445?

SMB

200

Which flag detects service versions?

-sV

200

23/tcp closed telnet: What did the target send back to Nmap's SYN?

A RST. The host is up, but nothing is listening on that port.

200

You found port 80 open. Name a tool from today that shows what's running on it.

curl -I (nc or nmap -sV also count)

300

How many usable host addresses are in 192.168.56.0/24?

254 (.1 through .254)

300

What service runs on port 53, and does it use TCP, UDP, or both?

DNS. It uses both, mostly UDP, with TCP for large responses and zone transfers.

300

What's the difference between -sS and -sT?

-sS sends a SYN, reads the reply, then sends a RST, and needs sudo. -sT completes the full handshake, doesn't need sudo, and is more likely to be logged.

300

161/udp open|filtered snmp: Why can't Nmap decide between open and filtered?

It got no reply. Either something is listening and stayed silent, or a firewall dropped the packet.

300

You connected to port 25 with nc and got a mail server banner. How do you check if the user "admin" exists?

Type VRFY admin

400

Why are UDP scans so much slower than TCP scans?

UDP usually doesn't reply. Nmap can't tell open from filtered, so it has to wait for timeouts and retry.

400

Nmap finds port 2222 open, and -sV says it's SSH. How is that possible if SSH is port 22?

A service can run on any port. 22 is just the default, and an admin can move it.

400

What does -A turn on?

-sV, -sC, -O and traceroute

400

21/tcp open ftp vsftpd 2.3.4, and under it: ftp-anon: Anonymous FTP login allowed. Which two flags produced this, and what would you try next?

-sV gave the version and -sC gave the anonymous login check. Next: log in as anonymous, and look up vsftpd 2.3.4 for known vulnerabilities.

400

Nmap says the host is down, but you know it's running a web server. Why, and what do you do?

It's probably blocking Nmap's ping probes, so Nmap thinks it's down. Use -Pn to skip the check and scan anyway.

500

Why can't you use arp-scan to find hosts on a different network across a router?

ARP only works on your local network. Its requests are broadcasts, and routers don't forward broadcasts.

500

Nmap shows port 21 open as "ftp", but when you connect with nc you get an SSH banner. What's going on, and which one is telling the truth?

SSH is running on port 21. The plain scan's SERVICE column is only a guess from the port number. The banner (or -sV) is the truth.

500

Why might -T5 find fewer open ports than -T4 on the same host?

Its timeouts are so short that slow replies get missed or packets get dropped, so open ports get marked as closed or filtered.

500

All 1000 scanned ports are filtered. Is the host down? What does this tell you, and what would you try?

Probably not down. A firewall is likely dropping everything. Try -p- for other ports, try -sU, and look for other ways in.

500

You have permission to scan a huge network with thousands of addresses. A full -p- -A scan on everything would take days. How do you plan it?

Find live hosts first with -sn. Run a quick top-ports scan on those, then -p- on the interesting hosts. Run -sV and -sC only on open ports, and save everything with -oA.

M
e
n
u