DHCP hands every new device its address, gateway, DNS servers and routes without authenticating either side, so whoever answers first on the local segment can decide where a client's traffic goes. A rogue or spoofed DHCP server is a quiet adversary-in-the-middle position, a starvation attack can take a subnet offline, and the lease log is one of the best and most neglected sources of asset and incident data. This guide covers DHCP and DHCPv6 attacks, switch and hypervisor controls (DHCP snooping, DHCPv6-Shield, Dynamic ARP Inspection, IP Source Guard, DHCP Guard), server hardening for Windows Server DHCP and ISC Kea, logging and detection. It is written for network engineers, infrastructure owners and SOC analysts.
Key takeaways
- DHCP trusts the first answer. Clients broadcast a Discover on UDP 67 and accept an Offer from any server, including the default gateway, DNS servers and classless static routes it supplies.
- DHCP snooping is the core control. Mark every access port untrusted, trust only uplinks and real server ports, and the switch drops server messages from anywhere else while building a binding table.
- The binding table powers other defences. Dynamic ARP Inspection and IP Source Guard use the snooping bindings to stop ARP poisoning and source address spoofing. The wider set of switch-level threats is covered in our Layer 2 Attacks Guide.
- IPv6 needs its own guard. DHCPv6-Shield (RFC 7610, BCP 199) and RA-Guard do for IPv6 what snooping does for IPv4; leaving them off reopens the same attack.
- Lease logs are evidence. They map IP to MAC to hostname over time, which incident responders need and which CIS Controls use to keep the asset inventory current.
How DHCP is attacked
DHCPv4 (RFC 2131) uses UDP 67 for servers and UDP 68 for clients in a Discover, Offer, Request, Acknowledge exchange. DHCPv6 uses UDP 546 and 547. Neither is authenticated in normal deployments: RFC 3118 defined DHCP authentication but it was never widely implemented.
| Attack | How it works | Impact | ATT&CK |
|---|---|---|---|
| Rogue DHCP server | Attacker device, misconfigured home router or malicious VM answers Discovers faster than the real server | Clients receive attacker gateway or DNS, giving interception and redirection | T1557.003 DHCP Spoofing |
| Starvation | Flood of Discovers with random client MAC addresses exhausts the scope | Legitimate clients get no address; often a prelude to a rogue server | T1499 Endpoint Denial of Service |
| Malicious options | Rogue server pushes option 121 classless static routes, WPAD, PXE boot or DNS search options | Traffic steered around VPNs or to attacker hosts | T1557.003 |
| ARP poisoning after address learning | Attacker claims the gateway IP on the segment | Interception of local traffic | T1557.002 ARP Cache Poisoning |
| Rogue DHCPv6 or Router Advertisements | Attacker advertises itself as DHCPv6 server or IPv6 router on a network that only thinks it runs IPv4 | IPv6 DNS and default route through the attacker | T1557 |
| Exploiting DHCP software | Malformed packets to servers, relays or client parsers | Code execution on network devices or hosts | Exploitation, vendor specific |
| Reconnaissance | Reading leases, options or relay data to map the network | Discovery of subnets, servers and naming | T1016 System Network Configuration Discovery |
Two real cases show the stakes. TunnelVision (CVE-2024-3661, published May 2024, CVSS 3.1 7.6 from CISA as CNA) uses option 121 to add routes that make VPN traffic leave by the physical interface, so an attacker on the same LAN can read or alter traffic the VPN was meant to protect. See the VPN Security Guide. And CISA's Known Exploited Vulnerabilities Catalog lists CVE-2017-12240, a remote code execution flaw in the DHCP relay subsystem of Cisco IOS and IOS XE that gives an unauthenticated attacker full control of an affected device; the relay on your routers is attack surface too.
Switch-level controls: snooping and its companions
DHCP snooping classifies ports as trusted or untrusted. Server messages (Offer, Ack, Nak) arriving on an untrusted port are dropped, and client exchanges are recorded in a binding table of MAC address, IP address, lease, VLAN and interface. On Cisco IOS XE, all interfaces are untrusted by default once snooping is on.
| Control | What it stops | Depends on | Example configuration (Cisco IOS XE) |
|---|---|---|---|
| DHCP snooping | Rogue DHCPv4 servers on access ports | Correct trusted ports | ip dhcp snooping; ip dhcp snooping vlan 10; ip dhcp snooping trust on uplinks |
| Snooping rate limit | Starvation floods from one port | Snooping | ip dhcp snooping limit rate 10 on untrusted ports |
| Option 82 insertion | Lets the server see the switch and port that a request came from | Server or relay that understands option 82 | ip dhcp snooping information option |
| Dynamic ARP Inspection | ARP replies that do not match a binding | Snooping binding table | ip arp inspection vlan 10 |
| IP Source Guard | Traffic from source IPs not leased to that port | Snooping binding table | ip verify source on access ports |
| Port security | Many MAC addresses on one access port | None | MAC limit per port |
| DHCPv6-Shield and RA-Guard | Rogue DHCPv6 servers and router advertisements | Trusted port configuration | Vendor IPv6 first-hop security policies |
- Verification:
show ip dhcp snoopinglists enabled VLANs and trusted interfaces,show ip dhcp snooping bindingshows the table, andshow ip dhcp snooping statisticsshows drops. - Persist the binding table: store bindings to flash or a remote file so a switch reload does not leave Dynamic ARP Inspection and IP Source Guard dropping legitimate hosts until they renew.
- Static hosts: servers and printers with static addresses have no binding; add static bindings or ARP ACLs before enforcing Dynamic ARP Inspection.
- SAVI-DHCP (RFC 7513): the IETF standard form of the same idea. Client-facing ports are Validating and DHCP-Snooping; links to routers and other SAVI devices are Trust; the binding anchor must be non-spoofable and exclusive, such as a switch port or Wi-Fi security association. It covers stateful DHCPv4 and DHCPv6 but not SLAAC, for which RFC 6620 is suggested.
IPv6: DHCPv6-Shield
RFC 7610 (August 2015, BCP 199) tells layer 2 devices to drop DHCPv6 server messages unless they arrive on ports explicitly configured for a legitimate server or relay, log a security alert and keep a per-port drop counter. Because attackers can hide DHCPv6 inside extension headers, devices should parse the full IPv6 header chain, drop first fragments that do not carry the complete chain, and drop unrecognised Next Header values by default. It should be enabled on every layer 2 switch in the domain. It does not cover rogue Router Advertisements, so pair it with RA-Guard. See the IPv6 Security Guide.
Virtual and wireless networks
- Hyper-V: DHCP Guard on a virtual network adapter drops DHCP server messages from a VM that is not authorised to act as a server, and Router Guard does the same for router advertisements (
Set-VMNetworkAdapter -DhcpGuard On -RouterGuard On). Enable both on every VM that is not a DHCP server or router. - Other hypervisors and clouds: most virtual switches and cloud VPCs provide the DHCP service themselves and drop guest DHCP server traffic; confirm this for your platform rather than assume it.
- Wi-Fi: enable the controller's DHCP and ARP protection features and client isolation on guest SSIDs, so one guest cannot answer another's Discover.
Hardening DHCP servers
Windows Server DHCP
- Authorise in Active Directory: only servers authorised in AD will lease addresses; check with
Get-DhcpServerInDC. This stops misconfigured domain-joined Windows servers, not a laptop or appliance on the wire, so it complements snooping rather than replacing it. - Audit logging: keep audit logging on; files are written to %windir%\System32\Dhcp as comma-separated lines of ID, date, time, description, IP address, host name and MAC address. Forward them, because local files rotate.
- Dynamic DNS safety: use a dedicated low-privilege account for DNS registration credentials, keep the DnsUpdateProxy group empty unless legacy clients need it, and enable name protection so DHCP cannot overwrite records it did not create.
- Failover: two servers sharing a scope keep leasing during maintenance or attack, which reduces the window in which a rogue server is the only one answering.
- Delegated administration: use the DHCP Administrators and DHCP Users groups instead of Domain Admins for daily work. See the Top 10 Active Directory Security Risks.
ISC Kea and Linux servers
- Control channel: HTTP and HTTPS control channels are off by default and listen on loopback; if you enable them, use TLS with client certificates (
cert-requireddefaults to true) and firewall them. Kea 3.0 and later flag HTTP API channels without authentication as a security policy violation. - Least privilege: run Kea as a non-root user with Linux capabilities; Kea logs a warning when run as root.
- Protect files: configuration files hold database passwords in clear text, and lease files reveal the network map; restrict both. Kea 2.7.9 and later refuse to start if lease files sit outside the permitted data directory.
- Reduce attack surface: run only the daemons you need (skip kea-dhcp-ddns if DNS updates are not required), load only needed hook libraries, and consider UDP sockets instead of raw sockets where all traffic arrives through relays, since raw sockets can bypass host firewall rules.
Relays and options
- Patch relays: treat DHCP relay code on routers and layer 3 switches as internet-adjacent attack surface; CVE-2017-12240 is in the KEV catalog.
- Minimise options: only send options clients need. Review WPAD (option 252), PXE boot options and classless static routes (option 121) for each scope.
- Client side: on managed VPN clients, prefer configurations that ignore or override DHCP-pushed routes when the tunnel is up, which is the vendor-level mitigation pattern for TunnelVision.
Where identity fits
DHCP proves nothing about who a device is: MAC addresses are trivially spoofed, and Windows DHCP MAC filtering is an access convenience, not a security control. Use 802.1X or NAC to authenticate the device before it gets a production VLAN, then let DHCP hand out the address. Device certificates and managed device identity are what make the binding table trustworthy. See the Network Access Control (NAC) Guide and the Device and IoT Identity Guide. The service account the DHCP server uses for DNS updates is itself a non-human identity: give it only the DNS rights it needs and rotate its password.
Choosing controls by environment
| Environment | Minimum controls | Add when mature |
|---|---|---|
| Small office, single switch stack | Snooping on all user VLANs, trusted uplink only, server audit logging | Dynamic ARP Inspection on user VLANs |
| Enterprise campus | Snooping, rate limits, Dynamic ARP Inspection, IP Source Guard, persisted bindings, RA-Guard and DHCPv6-Shield, failover servers | Option 82 based policy, 802.1X with dynamic VLANs |
| Data centre | Mostly static or reserved addressing; DHCP only on provisioning VLANs with PXE options restricted | Separate provisioning network, strict ACLs to provisioning servers |
| Virtualised and cloud | DHCP Guard and Router Guard on every non-server VM; rely on provider DHCP in VPCs | Audit of DHCP option sets in cloud accounts through infrastructure as code review |
| Guest and IoT networks | Client isolation, snooping, short leases, separate scope and VLAN | Device profiling from DHCP fingerprints feeding NAC |
Implementation roadmap
- Map the estate: list every DHCP server, relay (ip helper-address), scope and option set, and every place DHCP is served by something else (firewalls, wireless controllers, hypervisors, printers, home routers).
- Find rogues first: use snooping statistics, Windows rogue detection events and passive capture to identify unexpected servers before enforcement, or you will cut off whatever is relying on them.
- Enable snooping in monitor fashion: turn on snooping per VLAN with uplinks trusted on a pilot access switch, check the binding table fills, then extend by building.
- Add rate limits: start at a modest packets-per-second value on access ports and watch for err-disabled ports during busy periods such as Monday mornings.
- Enforce Dynamic ARP Inspection and IP Source Guard: after bindings are persisted and static hosts handled, on one VLAN at a time.
- IPv6 first-hop security: enable RA-Guard and DHCPv6-Shield even where IPv6 is "not used".
- Rollback: keep a per-VLAN back-out (disable snooping on the VLAN, or mark a port trusted) documented in the change, and remove it only once the binding table is stable.
Logging, detection and metrics
| Source | Event | Why it matters |
|---|---|---|
| Windows DHCP audit log | 10 new lease, 11 renew, 12 release | IP to MAC to hostname history for investigations and inventory |
| Windows DHCP audit log | 13 address in use, 14 pool exhausted, 15 lease denied | Conflicts, starvation, misconfiguration |
| Windows DHCP audit log | 54 and 56 authorisation failure, 62 another DHCP server found | Unauthorised or rogue servers |
| Windows DHCP audit log | 31 DNS dynamic update failed | Broken or abused DNS registration |
| Switch syslog | Snooping drops on untrusted ports, rate limit violations, DAI drops | Rogue servers, starvation, ARP poisoning attempts |
| Kea logs and forensic logging hook | Lease assignments and client identifiers | Same evidence on Linux estates |
Send these to the SIEM and keep enough retention to answer "who had 10.1.2.3 last month". CIS Controls v8.1 Safeguard 1.4 uses DHCP logging to keep the enterprise asset inventory current. See the SIEM Guide and the Asset Inventory and CMDB Security Guide.
Metrics:
- Percentage of access VLANs with DHCP snooping enforced (target 100 percent).
- Percentage of access VLANs with Dynamic ARP Inspection and IPv6 first-hop security enabled.
- Rogue DHCP server detections per month and mean time to locate the port.
- Scope utilisation peaks above 90 percent, an early sign of starvation or poor sizing.
- Percentage of DHCP servers forwarding audit logs to the SIEM with at least 12 months retention.
Framework mapping
| Framework | Reference | Relevance |
|---|---|---|
| NIST SP 800-53 Rev. 5 | SC-7 Boundary Protection; AC-4 Information Flow Enforcement | Trusted port boundaries for server messages |
| NIST SP 800-53 Rev. 5 | IA-3 Device Identification and Authentication | Authenticate devices before addressing |
| NIST SP 800-53 Rev. 5 | CM-8 System Component Inventory; AU-12 Audit Record Generation; SI-4 System Monitoring | Lease logs as inventory and monitoring data |
| NIST CSF 2.0 | PR.IR-01; ID.AM-01; DE.CM-01 | Protect networks; maintain hardware inventory; monitor networks |
| CIS Controls v8.1 | Safeguard 1.4 Use DHCP Logging to Update Enterprise Asset Inventory | Directly names DHCP logging |
| ISO/IEC 27001:2022 Annex A | A.8.20 Networks security; A.8.22 Segregation of networks; A.8.15 Logging | Network controls and log evidence |
| MITRE ATT&CK v20 and D3FEND | T1557.003, T1557.002, T1499; D3-NTA Network Traffic Analysis | Attack techniques and detection |
Common failure patterns
- Snooping on, wrong ports trusted: a whole access switch is trusted to make the help desk calls stop, so rogue servers on it pass straight through.
- AD authorisation mistaken for protection: teams assume authorised Windows DHCP stops rogues, but a non-Windows device ignores AD entirely.
- IPv6 forgotten: IPv4 is locked down while every Windows client still listens for DHCPv6 and router advertisements, giving an attacker an easy DNS takeover.
- Bindings lost on reload: Dynamic ARP Inspection is enforced without a persisted binding database, a switch reboots, and users are cut off until someone disables the control permanently.
- Logs kept locally only: Windows audit files rotate by weekday, so investigators cannot trace an IP address more than a week back.
- Unpatched relays and options left open: router DHCP relays miss updates, and old scopes still push WPAD or PXE options that nobody uses but an attacker could imitate.
Practitioner checklist
- Inventory every DHCP server, relay, scope and option set, including those on firewalls, controllers and hypervisors.
- Enable DHCP snooping on every access VLAN with only uplinks and real servers trusted.
- Apply per-port rate limits and persist the binding database.
- Enforce Dynamic ARP Inspection and IP Source Guard once bindings are reliable.
- Enable RA-Guard and DHCPv6-Shield everywhere, including networks that "do not use IPv6".
- Turn on DHCP Guard and Router Guard for every VM that is not a DHCP server or router.
- Authorise Windows DHCP servers in AD, enable name protection and keep DnsUpdateProxy empty.
- Run Kea as non-root with authenticated TLS control channels and protected lease and config files.
- Remove unneeded options (WPAD, PXE, option 121) and patch DHCP relays on network devices.
- Forward DHCP and snooping logs to the SIEM with at least 12 months retention and feed the asset inventory.
Standards and references
- IETF: RFC 7610 DHCPv6-Shield: Protecting against Rogue DHCPv6 Servers
- IETF: RFC 7513 Source Address Validation Solution for DHCP (SAVI-DHCP)
- MITRE ATT&CK: DHCP Spoofing
- NIST NVD: CVE-2024-3661
- CISA: Known Exploited Vulnerabilities Catalog
- Cisco: Operate and Troubleshoot DHCP Snooping
- ISC: Kea Administrator Reference Manual, Security
- Microsoft Learn: Analyze DHCP Server Log Files
Related NHI Mgmt Group resources: Network Security Guide · Network Access Control (NAC) Guide · IPv6 Security Guide · DNS Security Guide · NTP Security Guide