Chapter 37 - DHCP Snooping and ARP Inspection Flashcards
What is DHCP Snooping?
- A security measure used to recognise DHCP messages that fall outside of the normal use of DHCP and could be part of an attack and discard them.
- Also builds a table that details legitimate DHCP flows that other switch features can use to determine if DHCP traffic is legitimate or not.
- Usually implemented on switches and operates at Layer 2. Unlike DHCP which operates at Layer 3.
- Only filters DHCP messages, all other messages are unaffected.
What is DAI?
- Dynamic ARP Inspection
- Examines incoming ARP messages on untrusted ports to filter those it believes to be part of an attack. Messages received on Trusted ports are not inspected.
- Compares incoming ARP messages on Untrusted ports against the DHCP Snooping binding table and any configured ARP ACLs. If they don’t match, the message is discarded
- Only filters ARP messages. Other
messages are unaffected
What are the rules used by DHCP Snooping on Trusted and Untrusted ports?
- DHCP messages received on an untrusted port normally sent by a server (Offer and ACK) will always be discarded
- DHCP messages received on an untrusted port normally sent by a client (Discover, Request, Decline, Release) may be filtered if they seem to be part of an attack:
- For Discover and Request messages check for source MAC address consistency between the Ethernet
frame and the DHCP message chaddr
- For Release and Decline messages check the incoming interface and source IP address versus the DHCP
Snooping binding table - DHCP messages received on a trusted port will be forwarded as trusted ports do not filter any DHCP messages
- Where messages aren’t filtered and result in a DHCP lease, build a new entry in the DHCP Snooping binding table.
What is a Spurious DHCP server (DHCP Poisoning)?
- A form of attack where an attacker makes itsself a DHCP server so that it can hand out bad DHCP offers.
- For example, it could set itsself as the default gateway so any legitimate traffic being sent to the internet will be sent to it. Known as a Man in the Middle attack.
What is chaddr?
- Client Hardware Address
- Includes the sender’s MAC address
- Used when filtering Discover messages since the source MAC of the frame should match the chaddr of the DHCP message it encapsulates. If it didn’t do this then an attacker could spoof the MAC address in the chaddr and lease all IPs in a pool from a single device.
What is the DHCP Snooping binding table?
- A table of all DHCP flows that are allowed to complete upto getting a lease.
- Stores information such as the MAC address, IP address, VLAN, and interface of a lease which it uses to check for malicious traffic.
- An example of this is if an attacker wanted to Release a legitimate user’s IP address, they would need to share all of the same details in the DHCP Snooping binding table of that device (e.g. same interface).
What commands do you use to enable DHCP snooping?
- ‘ip dhcp snooping’ - Enables DHCP snooping
‘ip dhcp snooping <vlan>' - Tells the switch which VLAN to use DHCP snooping on</vlan>
What command do you use to change an interface from untrusted to trusted in DHCP Snooping?
‘ip dhcp snooping trust’ from interface config mode
What command can you use to find trusted DHCP snooping interfaces?
‘show ip dhcp snooping’
What does the ‘ip dhcp snooping information option’ do?
- Allows DHCP relay agents to insert new fields into DHCP requests
- Enables DHCP Option 82 (DHCP relay agent information option)
- Provides additional information about which DHCP relay agent received the client’s message
- If the router does not act as a dhcp relay agent then this can stop DHCP from working as normal since Cisco switches drop DHCP messages with Option 82 that are received on an untrusted port so it is best to disable this in this scenario.
- Enabled by default when DHCP snooping is enabled
What commands can you use to cause a switch interface to automatically recover from being put into an err-disable state when caused by DHCP rate limiting?
‘errdisable recovery cause dhcp-rate-limit’
‘errdisable recovery interval <time>'</time>
What command can you use to enable DHCP rate limiting?
‘ip dhcp snooping limit rate <number>' in interface config mode</number>
True or False. interfaces are Untrusted by default when DHCP Snooping is enabled.
True.
True or False. DHCP rate limiting can be enabled on only Trusted interfaces.
False. Can be enabled on both Trusted and Untrusted interfaces.
What is DHCP rate limiting?
- An optional feature of DHCP snooping
- Stops attackers from flooding the switch with DHCP messages and overloading the CPU so that they can bypass DHCP Snooping to enact other attacks.
- It tracks the number of DHCP messages so that if they exceed the limit over a one second period the interface is put into an err-disable state.
- Can be useful in avoiding DHCP Exhaustion attacks.