Chapter 5: Securing the Data Plane on Cisco Catalyst Switches
MAC Address Notification
The MAC Address Notification feature sends SNMP traps to the network management station (NMS) whenever a new MAC address is added to or an old address is deleted from the forwarding tables.
36 trang |
Chia sẻ: vutrong32 | Lượt xem: 1000 | Lượt tải: 0
Bạn đang xem trước 20 trang tài liệu Chapter 5: Securing the Data Plane on Cisco Catalyst Switches, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
Securing the Data Plane on Cisco Catalyst SwitchesContentsTopics covered in this chapter include the following:• An introduction to fundamental switching concepts, starting with the building blocks of VLANs and trunking• An introduction to other building blocks of switching technology, including Spanning Tree Protocol for high availability• A revisit and further explanation of security threats that exploit vulnerabilities in the switching infrastructure• A description of how to plan and develop a strategy for protecting the data plane• A description of the Spanning Tree Protocol Toolkit found on Cisco IOS routers that prevents STP operations from having an impact on the security posture• A review of port security and how to configure it, to illustrate security controls that are aimed at mitigating MAC spoofing and other threatsOverview Overview of VLANs and TrunkingTrunking and 802.1Q802.1Q TaggingDTP (Dynamic Trunking Protocol)Native VLANsConfiguring VLANs and TrunksConfiguring Inter-VLAN RoutingSpanning Tree OverviewSTP 802.1D, RSTP, PVRST+ Mitigating Layer 2 AttacksDomino Effect If Layer 2 is CompromisedLayer 2 independence enables interoperability and interconnectivity. However, from a security perspective, Layer 2 independence creates a challenge because a compromise at one layer is not always known by the other layers. If the initial attack comes in at Layer 2, the rest of the network can be compromised in an instant. Network security is only as strong as the weakest link, and that link might be the data link layerLayer 2 Best PracticesThe following list suggests Layer 2 security best practices. All of these suggestions are dependent upon your security policy.• Manage switches in as secure a manner as possible (SSH, OOB, permit lists, and so on).• Whenever practical, declare the VLAN ID used on trunk ports with the switchport trunk allowed vlan command• Do not use VLAN 1 for anything.• Set all user ports to nontrunking (unless you are using Cisco VoIP).• Use port security where possible for access ports.• Selectively use SNMP and treat community strings like root passwords.• Enable STP attack mitigation (BPDU guard, root guard).• Use Cisco Discovery Protocol only where necessary (with phones it is useful).• Disable all unused ports and put them in an unused VLAN.Layer 2 Protection ToolkitComponents of Layer 2 Protection ToolkitMitigating VLAN AttacksVLAN HoppingVLAN Hopping by Rogue TrunkVLAN Hopping by Double TaggingMitigating VLAN Hopping by Rogue TrunkBy default most switches support Dynamic Trunk Protocol (DTP) which automatically try to negotiate trunk links.An attacker could configure a host to spoof a switch and advertise itself as being capable of using either ISL or 802.1q. If successful, the attacking system then becomes a member of all VLANs.VLAN Hopping by Rogue TrunkA VLAN hopping attack can be launched in one of two ways:• Spoofing DTP messages from the attacking host to cause the switch to enter trunking mode: From here, the attacker can send traffic tagged with the target VLAN, and the switch then delivers the packets to the destination.• Introducing a rogue switch and turning trunking on: The attacker can then access all the VLANs on the victim switch from the rogue switch.Involves tagging transmitted frames with two 802.1q headers in order to forward the frames to the wrong VLAN. The first switch strips the first tag off the frame and forwards the frame. The second switch then forwards the packet to the destination based on the VLAN identifier in the second 802.1q header.VLAN Hopping Attack - Double-TaggingMitigation techniques include ensuring that the native VLAN of the trunk ports is different from the native VLAN of the user ports. STP AttackThe attacking host broadcasts STP configuration and topology change BPDUs to force spanning-tree recalculations. The BPDUs sent by the attacking host announce a lower bridge priority in an attempt to be elected as the root bridge. If successful, the attacking host becomes the root bridge and sees a variety of frames that otherwise are not accessible.It should only be used on access ports! If PortFast is enabled on a port connecting to another switch, there is a risk of creating a spanning-tree loop.PortFastServerWorkstationEnable PortFast on a Layer 2 access port and force it to enter the forwarding state immediately.Disable PortFast on a Layer 2 access port. PortFast is disabled by default.Globally enable the PortFast feature on all nontrunking ports. Determine if PortFast has been configured on a port. Configure PortFastspanning-tree portfast Switch(config-if)#no spanning-tree portfast Switch(config-if)#spanning-tree portfast default Switch(config-if)#show running-config interface type slot/portSwitch#To enable BPDU guard on all PortFast enabled ports, use the global configuration command.BPDU Guardspanning-tree portfast bpduguard default Switch(config)#FFFFFBRoot BridgeBPDU Guard EnabledAttackerSTP BPDUTo enable BPDU filtering on all PortFast enabled ports, use the global configuration command:To enable BPDU filtering on an interface, without having to enable PortFast, use the interface configuration command:BPDU Filteringspanning-tree portfast bpdufilter default Switch(config)#spanning-tree bpdufilter enable Switch(config-if)#Root guard is best deployed toward ports that connect to switches that should not be the root bridge using the interface configuration command:Root Guardspanning-tree guard root Switch(config-if)#Root BridgePriority = 0MAC Address = 0000.0c45.1a5dFFFFFBFSTP BPDUPriority = 0MAC Address = 0000.0c45.1234Root Guard EnabledAttackerMitigating MAC Spoofing and MAC Table Overflow AttacksMAC Address Table Overflow AttackAttacker uses macof to generate multiple packets with spoofed source MAC address.Over a short period of time, the MAC address table fills and no longer accepts new entries. As long as the attack continues, the MAC address table remains full.Switch starts to broadcast (flood) packets all packets that it receives out every port, making it behave like a hub.The attacker can now sniff packets destined for the servers.VLAN 10An attacker wishes to sniff packets destined to Servers A and B. To do so, he launches a MAC flood attack.MAC Address SpoofingMAC Address SpoofingMAC Address SpoofingMAC Address SpoofingMitigation techniques include configuring port security.Using Port SecurityTo prevent MAC spoofing and MAC table overflows, enable port security.Port Security can be used to statically specify MAC addresses for a port or to permit the switch to dynamically learn a limited number of MAC addresses. By limiting the number of permitted MAC addresses on a port to one, port security can be used to control unauthorized expansion of the network. Set the interface to access mode.Enable port security on the interface.Enable Port Securityswitchport mode access Switch(config-if)#switchport port-security Switch(config-if)#Set the maximum number of secure MAC addresses for the interface. (optional)The range is 1 to 132. The default is 1.Enter a static secure MAC address for the interface. (optional)Enable sticky learning on the interface. (optional)Configure Parametersswitchport port-security maximum value Switch(config-if)#switchport port-security mac-address sticky Switch(config-if)#switchport port-security mac-address mac-address Switch(config-if)#Set the violation mode. (optional)The default is shutdown.shutdown is recommended rather than protect (dropping frames). The restrict option might fail under the load of an attack.Establish the Violation Rulesswitchport port-security violation {protect | restrict | shutdown}Switch(config-if)#The errdisable recovery feature also allows you to monitor spanning tree violationsErrdisable RecoveryPort security aging can be used to set the aging time for static and dynamic secure addresses on a port. Two types of aging are supported per port:absolute - The secure addresses on the port are deleted after the specified aging time.inactivity - The secure addresses on the port are deleted only if they are inactive for the specified aging time.Port Agingswitchport port-security aging {static | time minutes | type {absolute | inactivity}} Switch(config-if)#Sample Port Security ConfigurationS2(config-if)# switchport mode access S2(config-if)# switchport port-security S2(config-if)# switchport port-security maximum 2 S2(config-if)# switchport port-security violation shutdown S2(config-if)# switchport port-security mac-address sticky S2(config-if)# switchport port-security aging time 120S3show port-security CommandSW2# show port-securitySecure Port MaxSecureAddr CurrentAddr SecurityViolation Security Action (Count) (Count) (Count)----------- ------------- ----------- ------------------ --------------- Fa0/12 2 0 0 Shutdown---------------------------------------------------------------------------Total Addresses in System (excluding one mac per port) : 0Max Addresses limit in System (excluding one mac per port) : 1024SW2# show port-security interface f0/12Port Security : EnabledPort status : Secure-downViolation mode : ShutdownMaximum MAC Addresses : 2Total MAC Addresses : 1Configured MAC Addresses : 0Aging time : 120 minsAging type : AbsoluteSecureStatic address aging : DisabledSecurity Violation Count : 0 SW2# show port-security addressSecure Mac Address Table-------------------------------------------------------------------Vlan Mac Address Type Ports Remaining Age (mins)---- ----------- ---- ----- ------------- 1 0000.ffff.aaaa SecureConfigured Fa0/12 --------------------------------------------------------------------Total Addresses in System (excluding one mac per port) : 0Max Addresses limit in System (excluding one mac per port) : 1024Using SNMP to Monitor Access to Switch PortThe MAC Address Notification feature sends SNMP traps to the network management station (NMS) whenever a new MAC address is added to or an old address is deleted from the forwarding tables. MAC Address Notificationmac address-table notification Switch(config)#DHCP attacks :DHCP starvationDHCP rougeHere are two ways to mitigate DHCP spoofing and starvation attacks:Port securityDHCP snoopingMitigating DHCP attacksDynamic ARP Inspection (DAI) determines the validity of an ARP packet based on the MAC address-to-IP address bindings stored in a DHCP snooping database.Mitigating ARP SpoofingDynamic ARP Inspection : IP Source Guard
Các file đính kèm theo tài liệu này:
- chapter_5_securing_the_data_plane_on_cisco_catalyst_switches_5653.pptx