CCNA2 - Chapter 11 Flashcards
(24 cards)
– easiest for hackers to deploy
Layer 2 attacks
prevents MAC address table overflow attacks
- PS limits the no. of valid MAC addresses allowed
on a port. (admin manually configure MAC, dynamically learned)
- 1 only permitted MAC addresses, PS controls unauthorized access
to the network
Enabling port security
command to enable port security
S1(config-if)# sw port-security
o If the port is set to dynamic auto (trunking on), the command above will be rejected
4 types of port security
- aging
- mac-address
- maximum
- violation
limit & learn MAC add
- default = 1
- max = depends on sw and IOS
3 ways learn MAC ADDRESS
-
Manually configured
S1(config-ig)# sw port-security mac-address [ma] - Dynamically learned: current source MAC connected to the port is auto secured (not added in run config). Rebooted – port re-learn device’s MAC A
-
Dynamically learned – sticky: Admin enable switch to 2 and stick them to run config
S1(config-if)# sw port-security mac-address sticky
* Save
Sh port-security int
and sh port-security add
– verify congurations
2 types of aging
-
Absolute secure addresses on the port are
deleted after the specified aging time
-
Inactivity The secure addresses on the port are
deleted if they are inactive for a specified time
.
S1(config-if)# sw port-security aging {static | time time | type {absolute | inactivity}}
Port security violation modes
-
Shutdown (D) –
error-disabled state immediately
, off LED, send syslog message -
Restrict –
port drops packets with unknown source addresses
(counter to increment andgenerates a syslog message
) -
Protect – least secure (
no syslog message
is sent)
ports in error-disabled state
Sh int – identifies the port status as err-disabled
Sh port-security int – secure-shutdown
Verify port security
Sh port-security – display port-security settings for all switches
Sh port-security interface – view
Sh run | begin int f0/19 – verify that MAC address are ‘sticking’ to the configuration
Sh port-security address – display all secure MAC addresses
is launched in one of three ways:
- Spoofing DTP messages from the attacking host (sw -> trunking mode)
o Attacker send traffic tagged w/ target vlan
- Introducing a rogue switch & enable trunk
o Attacker can access ALL vlans on the victim switch
- Double-tagging (d-encapsulated) attack
o Takes advantage of the way hardware on most switches operate
VLAN hopping attack
Steps to Mitigate VLAN Hopping Attacks
- Disable DTP (auto trunking) negotiation on non-trunking ports (sw mode)
- Disable unused ports & put them in unused vlan
- Manually enable trunk link on trunking port (sw mode trunk)
- Disable DTP negotiations on trunking port (sw nonegotiate)
- Set native vlan to a vlan other tan VLAN 1 (sw trunk native vlan vlan_no)
– attack tools such as Gobble
r to create a Denial of Service (DoS) for connecting clients
- Can be effectively mitigated using port security
. Gobbler = unique source MACaddress for each DHCP request sent
- Gobbler – configured to use the actuate int MAC add as the source ethernet add
DHCP starvation attack
– requires more protection
- Can be mitigated using DHCP snooping on trusted ports
DHCP spoofing attacks
– filters DHCP messages
and rate-limits DHCP traffic on untrusted ports
* Trusted sources
o Dev. Under admin control (sw, r, servers)
o Trusted int (trunk links, server p)
* Untrusted Source
o Dev outside the network & all access ports
DHCP snooping
– includes the source MAC add of device on an untrusted port & IP add assigned
- MAC & IP add are bound together
- Aka _________________________________
DHCP table
DHCP snooping binding table
Steps to Implement DHCP Snooping
- Enable DHCP snooping (
S1(config)# ip dhcp snooping
) - On trusted ports (
S1(config-if)# ip dhcp snooping trust
) - On untrusted int (
S1(config-if)# ip dhcp limit rate packets-per-second
) - Enable DHCP snooping by VLAN (
S1(config)# ip dhcp snooping vlan
)
S1# sh ip dhcp snooping – verify DHCP snooping settings
S1# s hip dhcp snooping binding – view the clients that have receive DHCP infos
– requires DHCP snooping
and helps prevent ARP attacks
by
- Not relaying invalid ARP replies to other ports
- Verify each intercepted packet for a valid IP-to-MAC binding
- Drop & log ARP replies coming from invalid
- Error-disable the int if the configured DAI no of ARP packets is exceeded
Dynamic ARP Inspection (DAI)
DAI Implementation Guidelines
- Enable DHCP snooping globally
- Enable DHCP snooping on selected VLANs
- Enable DAI on selected VLANs
- Configure trusted int for DHCP snooping & ARP inspection
o Trusted (uplink ports that connected to other switches)
o Untrusted ( all access ports)
Destination, source & IP add
Destination MAC – checks the DM add in the Ethernet header against the target MAC add in ARP body
Source MAC – checks the SM add in the Ethernet header against the sender MAC address in the ARP body.
IP address - Checks the ARP body for invalid and unexpected IP addresses including addresses 0.0.0.0, 255.255.255.255, and all IP multicast addresses.
PortFast and BPDU Guard
Portfast
- Immediately brings a port to the forwarding state from a blocking state, bypassing the listening and learning states
- Apply to all end-user access ports
BPDU Guard
- immediately error disables a port that receives a BPDU
- Like PortFast, BPDU guard should only be configured on interfaces attached to end devices
Configure PortFast
- Only enable portfast on access ports
- Portfast on inter switch link = spanning-tree loop
On int – S1(config-if)# spanning-tree portfast
Globally - S1(config)# spanning-tree portfast default
Verify PortFast
Verify PortFAst is enabled GLOBALLY
- Sh run | begin span
- Sh spanning-tree summary
Verify PortFAst is enabled in an INTERFACE
- Sh run int type/number
- Sh run int type/number detail
Configure BPDU Guard
- If a BPDU is received on a BPDU Guard enabled access port, the port is put into error-disabled state
- This means the port is shut down and must be manually re-enabled or automatically recovered through the errdisable recovery cause secure_violation global command
On interface – S1(config-if)# spanning-tree bpduguard enable
Globally – S1(config)# spanning-tree bpduguard default