UDP port
Port 67: DHCP
UDP port 67 is the DHCP server's port, and UDP port 68 the client's. A device with no address yet broadcasts from port 68 to port 67 and gets back its address, default gateway and DNS server.
- Four messages: Discover, Offer, Request, Ack.
- A broadcast stops at a router: a DHCP relay passes it on to a server on another network.
- Whoever answers on port 67 decides where a device sends its traffic, which is what a rogue DHCP server abuses.
Check port 67 on Linux
Put the server's name or address in place of HOST.
ss -ulnp 'sport = :67'- On the server: is a program listening on UDP port 67, and which? How to read ss.
tcpdump -ni any udp port 67- On either end: the datagrams to and from UDP port 67. With UDP this is the sure test, since nothing is acknowledged. How to read tcpdump.
nmap -sU -p 67 HOST- From outside: a UDP scan of port 67. No answer reads open|filtered: UDP does not say which. How to read nmap.
What runs on it
- DHCP
- How a device gets its address, gateway and DNS server when it joins a network.
- DHCP relay
- A router that passes DHCP broadcasts on to a server on another network, so one server can serve many.
- Rogue DHCP server
- An attacker's own DHCP server answering devices on the LAN, handing out a poisoned gateway and DNS.
Use port 67 on real machines
Open DHCP: how a machine gets its address