Module 3 · Networking for testers · Lesson 11 of 16
Addresses, subnets and ports
Read an address and a /24, know the private ranges, and learn the ports you will see in every scan.
In this lesson · about 20 minutes
- Work out how many hosts a /24 holds
- Spot a private address and a public one in a scope
- Say what an open port 21, 22, 23, 80, 445 or 3306 means to a tester
Every attack in this course travels over a network. This module gives you the working knowledge to read scan results, follow a conversation between two machines, and see for yourself why unencrypted protocols are a finding.
Addresses and subnets
An IPv4 address like 192.168.56.101 is four numbers from 0 to 255. The /24 in 192.168.56.0/24 says the first 24 bits, the first three numbers, name the network and the last number names the host. That gives 256 addresses, of which 254 are usable: .0 names the network and .255 is broadcast.
| Prefix | Addresses | Typical use |
|---|---|---|
| /32 | 1 | A single host in a scope document |
| /24 | 256 | An office or lab network |
| /16 | 65,536 | A large company site. Scanning all of it takes planning. |
Three ranges are private and never routed on the internet: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. If a scope lists a public address, it is on the internet, so double-check it really belongs to the client.
Ports and protocols
An address gets you to a machine; a port (0 to 65,535) gets you to one program on it. TCP sets up a connection first and guarantees delivery (web, SSH, email). UDP just sends, which is faster but unreliable (DNS lookups, SNMP, video). Learn these by heart; you will see them in every scan:
| Port | Service | What to think when it is open |
|---|---|---|
| 21/tcp | FTP | Plaintext logins. Anonymous access? |
| 22/tcp | SSH | Remote shell. Weak passwords? Old version? |
| 23/tcp | Telnet | Plaintext remote shell. Almost always a finding. |
| 25/tcp | SMTP | Mail. Can it be used to check which users exist? |
| 53/udp+tcp | DNS | Name lookups. Zone transfers allowed? |
| 80, 443/tcp | HTTP, HTTPS | A web app to test. |
| 139, 445/tcp | SMB | Windows file sharing. Open shares, old versions. |
| 3306/tcp | MySQL | A database reachable from the network is rarely intended. |
| 3389/tcp | RDP | Windows remote desktop. Exposed to the internet? |
Flashcards
Ports to know by heart
0 of 7 known
Say the answer out loud, flip the card, then be honest: cards you miss come back at the end.
Check your understanding0 of 3 correct
Quiz score: 0 of 3
For authorized, lab-based learning only. Tana Roasters and every person, address and password in this course are fictional. Every terminal is simulated. "Kali Linux" is a trademark of OffSec; this course is not affiliated with or endorsed by OffSec.