Certopolis

CompTIA Network+ (V9)

ARP spoofing and rogue DHCP attacks for Network+

ARP spoofing works because ARP is stateless and unauthenticated, so a host accepts a forged reply that maps the gateway's IP address to the attacker's MAC address. A rogue DHCP server hands out false settings, such as an attacker's gateway or DNS server, or a gateway that does not exist. DHCP snooping, dynamic ARP inspection and static ARP entries are the main defences.

ARP spoofing

MITRE ATT&CK T1557.002 states that ARP is stateless and does not require authentication, so devices may wrongly add or update the MAC address for an IP address in their ARP cache.

An attacker can also send a gratuitous ARP reply that announces ownership of an IP address to every device on the segment.

Example: a workstation's ARP entry for its gateway now holds the attacker's MAC address. Its traffic to the gateway goes to the attacker, who can read it and forward it on. That is an on-path (adversary-in-the-middle) position.

T1557.002 lists signs to watch for: several IP addresses mapped to one MAC address, and repeated gratuitous ARP traffic. Its mitigations are static ARP entries, which may not be practical on large networks, and DHCP snooping with dynamic ARP inspection on switches.

Rogue DHCP servers

ATT&CK T1557.003 describes an attacker acting as a malicious DHCP server, so hosts receive bad settings, for example an adversary-owned DNS server or gateway.

RFC 3118 names the threat to a DHCP client as a rogue server giving incorrect configuration, either to set up a man-in-the-middle attack or for denial of service.

Which one depends on what the lease says. A lease naming the attacker's laptop as gateway puts the attacker on the path. A lease naming a gateway that does not exist cuts clients off from other subnets, which is denial of service.

T1557.003 also notes that DHCP spoofing can be used to exhaust the address pool by sending many DISCOVER messages.

DHCP snooping

RFC 7513 describes switch ports with a DHCP-Trust attribute. Server-to-client DHCP messages are forwarded only from ports where it is set, and by default it is not set.

So the port facing the real DHCP server is trusted, and offers arriving on user ports are dropped. ATT&CK T1557.003 recommends DHCP snooping because it prevents DHCP spoofing and starvation attacks.

Where the exam catches people

  • Believing a host only accepts ARP replies it asked for: ARP is stateless, so unsolicited replies can update the cache.
  • Believing a rogue DHCP server is always an on-path attack: a lease with a nonexistent gateway is a denial of service.
  • Believing DHCP snooping trusts every port by default: ports are untrusted unless configured, and offers from them are dropped.
  • Believing ARP spoofing changes the victim's DNS answers: it changes the IP-to-MAC mapping; rogue DHCP is what can hand out a bad DNS server.

Written from CompTIA's documentation

Try 3 questions on this

Pick an answer to see why each option is right or wrong.

  1. A workstation's ARP cache entry for its gateway now maps to an attacker's hardware address, and the attacker reads the traffic before forwarding it. Which of the following explains why the entry was installed?

    Right. In the game that’s Renown for your Network Security building.

    Not that one: B is right. In the game your Network Security building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    Therefore, devices may wrongly add or update the MAC address of the IP address in their ARP cache.' Because a host accepts a reply it never asked for and cannot check who sent it, an attacker's reply mapping the gateway's IP to the attacker's MAC is installed, and the host's traffic to the gateway goes to the attacker, who can read it and forward it on.

    Written from attack.mitre.org/techniques/T1557/002/

  2. A switch forwards IP address lease offers only from the port facing the company's addressing service and drops any such offers arriving on user ports. Which of the following threats does this block?

    Right. In the game that’s Renown for your Network Security building.

    Not that one: B is right. In the game your Network Security building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    Lease offers from any other port, such as a user's port with an unauthorized DHCP server on it, are dropped, so clients only ever receive the legitimate server's configuration.

    Written from www.rfc-editor.org/rfc/rfc7513.html

  3. An insider's rogue DHCP server hands out leases naming a nonexistent default gateway, and clients that accept them can no longer reach anything beyond their own subnet. Which of the following attack types is this?

    Right. In the game that’s Renown for your Network Security building.

    Not that one: C is right. In the game your Network Security building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    A gateway that does not exist cuts clients off from every other network without putting the attacker in the path, so the effect is a denial of service.

    Written from www.rfc-editor.org/rfc/rfc3118.html