SlideShare una empresa de Scribd logo
1 de 41
Applying Security Policies to Network Switches  Deniz Kaya Microsoft, Cisco, Ironport Trainer CCSI, CCNP, MCT, MCSE, ICSI, ICSP
Securing LAN Devices ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Why Worry About Layer 2 Security? Host B Host A Physical Links MAC Addresses IP Addresses Protocols and Ports Application Stream OSI was built to allow different layers to work without knowledge of each other. Application Presentation Session Transport Network Data Link Physical Application Presentation Session Transport Network Data Link Physical
Domino Effect ,[object Object],[object Object],[object Object],MAC Addresses Physical Links IP Addresses Protocols and Ports Application Stream Compromised Application Presentation Session Transport Network Data Link Physical Application Presentation Session Transport Network Data Link Physical Initial Compromise
Switches Are Targets ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Securing Network Access at Layer 2 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Protecting Administrative Access ,[object Object],[object Object],[object Object],[object Object]
Password Encryption ,[object Object],enable secret [level  level ] { password  | [ encryption-type ]  encrypted-password }  ,[object Object],Switch(config)# Switch(config)# enable   password  password
Password Guidelines ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Protecting the Management Port ,[object Object],[object Object],[object Object],[object Object],[object Object]
Turning Off Unused Network Services ,[object Object],[object Object],[object Object],[object Object],[object Object]
Shutting Down Interfaces ,[object Object],[object Object],Switch(config)#   interface range fastethernet 0/2-8   Switch(config-if-range)#   shutdown   ,[object Object],[object Object]
Summary ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Mitigating Layer 2 Attacks ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
VLAN Hopping by Switch Spoofing Trunk Port Rogue Trunk Port ,[object Object],[object Object],Note: There is no way to execute switch spoofing attacks unless the switch is misconfigured.
VLAN Hopping by  Double Tagging ,[object Object],[object Object],[object Object],[object Object],Attacker (VLAN 10) Victim (VLAN 20) Frame Note:   This attack works only if the trunk has the same native VLAN as the attacker. 802.1Q, 802.1Q 802.1Q, Frame 20 10 20 Trunk (Native VLAN = 10) Note: There is no way to execute these attacks unless the switch is  misconfigured.  The first switch strips off the first tag and sends it back out.
Mitigating VLAN Hopping Network Attacks ,[object Object],Example 1: If no trunking is required on an interface  ,[object Object],[object Object],Example 2: If trunking is required  Example 3: If trunking is required  ,[object Object],[object Object],[object Object],[object Object]
STP Attack ,[object Object],[object Object],X F F F F B F F F F = Forwarding Port B  = Blocking Port A Root B
STP Attack (Cont.) F The attacker sends spoofed BPDUs to change the STP topology. Access Switches F The attacker now becomes the root bridge. Access Switches Root F F F F Root B X Root F F F F B F X STP STP
Mitigating STP Attacks with  bpdu-guard  and  guard root  Commands ,[object Object],[object Object],IOS(config)#spanning-tree portfast bpduguard IOS(config-if)#spanning-tree guard root
Spoofing the DHCP Server ,[object Object],[object Object],[object Object],[object Object],Client Rogue DHCP Attacker Legitimate DHCP Server
DHCP Snooping ,[object Object],[object Object],[object Object],[object Object],[object Object],Client Rogue DHCP Attacker Legitimate DHCP Server
ARP Spoofing: Man-in-the-Middle Attacks ,[object Object],ARP Table in Host A IP 10.1.1.2 MAC A.A.A.A A B ,[object Object],ARP Table in Host B ,[object Object],[object Object],ARP Table in Host C C IP 10.1.1.3 MAC C.C.C.C 1.  IP 10.1.1.2  ? MAC for 10.1.1.1 2.  Legitimate ARP reply  10.1.1.1 = MAC B.B.B.B 3.  Subsequent gratuitous ARP replies overwrite legitimate replies ,[object Object],[object Object],Attacker IP 10.1.1.1 MAC B.B.B.B A B C A = host A B = host B C = host C
Mitigating Man-in-the-Middle Attacks with DAI ,[object Object],10.1.1.1 DHCP Server DHCP Discovery (BCAST) DHCP Offer (UCAST) DAI provides protection against attacks such as ARP poisoning using spoofing tools such as ettercap, dsniff, and arpspoof. Track Discovery Track DHCP Offer MAC or IP Track Subsequent ARPs for MAC or IP 10.1.1.2 DAI Function:
DAI in Action ,[object Object],10.1.1.1 10.1.1.2 GARP is sent to attempt to change the IP address to MAC bindings. Gateway is  10.1.1.1 Attacker is not gateway according to this binding table I am your gateway: 10.1.1.1 10.1.1.2
“Learns” by Flooding the Network MAC A MAC B MAC C Port 1 Port 2 Port 3 A->B MAC Port A 1 C 3 The CAM table is incomplete. MAC B is unknown, so the switch will flood the frame. MAC C  “sees”  traffic  to MAC B. A->B A->B
CAM Learns MAC B Is on Port 2 B->A B->A MAC A MAC B MAC C Port 1 MAC Port A 1 C 3 Port 2 Port 3 B 2 Host C drops the packet addressed to host B. CAM learns that MAC B is on Port 2. MAC A = host A MAC B = host B MAC C = host C
CAM Table Is Updated — Flooding Stops A->B A->B MAC A MAC B MAC C Port 1 MAC Port A   1 C   3 Port 2 Port 3 B   2 CAM has learned MAC B is on Port 2. CAM tables are limited in size. MAC A = host A MAC B = host B MAC C = host C MAC C does  not  “see”  traffic to MAC B  anymore.
Intruder Launches macof Utility Y->? MAC A MAC B Port 1 Port 2 Port 3 MAC C Bogus addresses are added to the CAM table. MAC Port A 1 B 2 C 3 MAC Port X 3 B 2 C 3 MAC Port X 3 Y 3 C 3 X->? Macof   starts sending unknown bogus MAC addresses. Intruder runs macof on MAC C. Y is on Port 3 and CAM is updated. X is on Port 3 and CAM is updated.
The CAM Table Overflows — Switch Crumbles Under the Pressure The CAM table is full, so Port 3 is closed. MAC A MAC B MAC C Port 1 Port 2 Port 3 A->B MAC Port X 3 Y 3 C 3 MAC B is unknown, so the switch floods the frame looking for MAC B. MAC A = host A MAC B = host B MAC C = host C A->B A->B
MAC Address Spoofing Attack A A A A B B (Attacker) B Switch Port Table B DEST MAC: A DEST MAC: A Switch Port Table 1 1 1 1 2 3 2 3 2 3 2 3 Host Host Host Host Spoofed Switch Port Table Updated Switch Port Table SRC: MAC (A) SRC: MAC (A) SRC = Source DEST = Destination  1 1 1 1 2 2 2 2 3 3 3 3 A  B  C A  B  C A  B  C A,B  C
Using Port Security to Mitigate Attacks ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Port Security Fundamentals ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Port Security Configuration ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Port Security Defaults Shutdown  (The port shuts down when the maximum number of secure MAC addresses is exceeded, and an SNMP trap notification is sent.) Violation mode 1 Maximum number of secure MAC addresses Disabled on a port Port security Default Setting Feature
Configuring Port Security on a Cisco Catalyst Switch ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Port Security Configuration Script ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Verify the Configuration ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Layer 2 Best Practices ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Summary ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
New Horizons' Partners

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Network security - Defense in Depth
Network security - Defense in DepthNetwork security - Defense in Depth
Network security - Defense in Depth
 
Ppt of routing protocols
Ppt of routing protocolsPpt of routing protocols
Ppt of routing protocols
 
Open shortest path first (ospf)
Open shortest path first (ospf)Open shortest path first (ospf)
Open shortest path first (ospf)
 
WLAN Attacks and Protection
WLAN Attacks and ProtectionWLAN Attacks and Protection
WLAN Attacks and Protection
 
Ipsec
IpsecIpsec
Ipsec
 
Dynamic routing protocols (CCNA)
Dynamic routing protocols (CCNA)Dynamic routing protocols (CCNA)
Dynamic routing protocols (CCNA)
 
Wireless Cracking using Kali
Wireless Cracking using KaliWireless Cracking using Kali
Wireless Cracking using Kali
 
Wireless Hacking
Wireless HackingWireless Hacking
Wireless Hacking
 
Subnetting Presentation
Subnetting PresentationSubnetting Presentation
Subnetting Presentation
 
Ipv4 and Ipv6
Ipv4 and Ipv6Ipv4 and Ipv6
Ipv4 and Ipv6
 
Session Hijacking ppt
Session Hijacking pptSession Hijacking ppt
Session Hijacking ppt
 
Internet control message protocol
Internet control message protocolInternet control message protocol
Internet control message protocol
 
Comparison between ipv4 and ipv6
Comparison between ipv4 and ipv6Comparison between ipv4 and ipv6
Comparison between ipv4 and ipv6
 
Gns3
Gns3Gns3
Gns3
 
WEP/WPA attacks
WEP/WPA attacksWEP/WPA attacks
WEP/WPA attacks
 
Cisco Switch Security
Cisco Switch SecurityCisco Switch Security
Cisco Switch Security
 
MULTICAST BY SAIKIRAN PANJALA
MULTICAST BY SAIKIRAN PANJALAMULTICAST BY SAIKIRAN PANJALA
MULTICAST BY SAIKIRAN PANJALA
 
Man in the middle
Man in the middleMan in the middle
Man in the middle
 
Dhcp ppt
Dhcp pptDhcp ppt
Dhcp ppt
 
Acl
AclAcl
Acl
 

Destacado

Intrusion Discovery on Windows
Intrusion Discovery on WindowsIntrusion Discovery on Windows
Intrusion Discovery on Windowsdkaya
 
Hacking Cisco Networks and Countermeasures
Hacking Cisco Networks and CountermeasuresHacking Cisco Networks and Countermeasures
Hacking Cisco Networks and Countermeasuresdkaya
 
Sniffing SSL Traffic
Sniffing SSL TrafficSniffing SSL Traffic
Sniffing SSL Trafficdkaya
 
Network security
Network securityNetwork security
Network securityfangjiafu
 
Microsoft Offical Course 20410C_10
Microsoft Offical Course 20410C_10Microsoft Offical Course 20410C_10
Microsoft Offical Course 20410C_10gameaxt
 
Network tunneling techniques
Network tunneling techniquesNetwork tunneling techniques
Network tunneling techniquesinbroker
 
Mitigating worm attacks
Mitigating worm attacksMitigating worm attacks
Mitigating worm attacksdkaya
 
Switching Tech And Data Link
Switching Tech And Data LinkSwitching Tech And Data Link
Switching Tech And Data Linkanishgoel
 
Computer Architecture
Computer ArchitectureComputer Architecture
Computer ArchitectureLouise Magno
 
Finding Evil In DNS Traffic
Finding  Evil In DNS TrafficFinding  Evil In DNS Traffic
Finding Evil In DNS Trafficreal_slacker007
 
Introduction to network switches
Introduction to network switchesIntroduction to network switches
Introduction to network switchesNetProtocol Xpert
 
Security Onion Conference - 2016
Security Onion Conference - 2016Security Onion Conference - 2016
Security Onion Conference - 2016DefensiveDepth
 
Network Management Devices
Network Management DevicesNetwork Management Devices
Network Management DevicesRahul P
 
Hacking Layer 2 - Enthernet Switcher Hacking Countermeasures.
Hacking Layer 2 - Enthernet Switcher Hacking Countermeasures.Hacking Layer 2 - Enthernet Switcher Hacking Countermeasures.
Hacking Layer 2 - Enthernet Switcher Hacking Countermeasures.Sumutiu Marius
 
Mastering checkpoint-1-basic-installation
Mastering checkpoint-1-basic-installationMastering checkpoint-1-basic-installation
Mastering checkpoint-1-basic-installationnetworkershome
 
Network switches, functions & role in networks
Network switches, functions & role in networksNetwork switches, functions & role in networks
Network switches, functions & role in networksIT Tech
 
Microsoft Days 09 Windows 2008 Security
Microsoft Days 09 Windows 2008 SecurityMicrosoft Days 09 Windows 2008 Security
Microsoft Days 09 Windows 2008 Securitydkaya
 
Network communication devices
Network communication devicesNetwork communication devices
Network communication devices774474
 

Destacado (20)

Intrusion Discovery on Windows
Intrusion Discovery on WindowsIntrusion Discovery on Windows
Intrusion Discovery on Windows
 
Hacking Cisco Networks and Countermeasures
Hacking Cisco Networks and CountermeasuresHacking Cisco Networks and Countermeasures
Hacking Cisco Networks and Countermeasures
 
Sniffing SSL Traffic
Sniffing SSL TrafficSniffing SSL Traffic
Sniffing SSL Traffic
 
Network security
Network securityNetwork security
Network security
 
Mcsa certification 410
Mcsa certification 410Mcsa certification 410
Mcsa certification 410
 
Microsoft Offical Course 20410C_10
Microsoft Offical Course 20410C_10Microsoft Offical Course 20410C_10
Microsoft Offical Course 20410C_10
 
Network tunneling techniques
Network tunneling techniquesNetwork tunneling techniques
Network tunneling techniques
 
Mitigating worm attacks
Mitigating worm attacksMitigating worm attacks
Mitigating worm attacks
 
Switching Tech And Data Link
Switching Tech And Data LinkSwitching Tech And Data Link
Switching Tech And Data Link
 
Computer Architecture
Computer ArchitectureComputer Architecture
Computer Architecture
 
Finding Evil In DNS Traffic
Finding  Evil In DNS TrafficFinding  Evil In DNS Traffic
Finding Evil In DNS Traffic
 
Introduction to network switches
Introduction to network switchesIntroduction to network switches
Introduction to network switches
 
Security Onion Conference - 2016
Security Onion Conference - 2016Security Onion Conference - 2016
Security Onion Conference - 2016
 
Network Diagram
Network DiagramNetwork Diagram
Network Diagram
 
Network Management Devices
Network Management DevicesNetwork Management Devices
Network Management Devices
 
Hacking Layer 2 - Enthernet Switcher Hacking Countermeasures.
Hacking Layer 2 - Enthernet Switcher Hacking Countermeasures.Hacking Layer 2 - Enthernet Switcher Hacking Countermeasures.
Hacking Layer 2 - Enthernet Switcher Hacking Countermeasures.
 
Mastering checkpoint-1-basic-installation
Mastering checkpoint-1-basic-installationMastering checkpoint-1-basic-installation
Mastering checkpoint-1-basic-installation
 
Network switches, functions & role in networks
Network switches, functions & role in networksNetwork switches, functions & role in networks
Network switches, functions & role in networks
 
Microsoft Days 09 Windows 2008 Security
Microsoft Days 09 Windows 2008 SecurityMicrosoft Days 09 Windows 2008 Security
Microsoft Days 09 Windows 2008 Security
 
Network communication devices
Network communication devicesNetwork communication devices
Network communication devices
 

Similar a Mitigating Layer2 Attacks

Network Security - Layer 2
Network Security - Layer 2Network Security - Layer 2
Network Security - Layer 2samis
 
CCNA Security 07-Securing the local area network
CCNA Security 07-Securing the local area networkCCNA Security 07-Securing the local area network
CCNA Security 07-Securing the local area networkAhmed Habib
 
Security Concerns in LANs.pptx
Security Concerns in LANs.pptxSecurity Concerns in LANs.pptx
Security Concerns in LANs.pptxjoko
 
Examen final ccna2
Examen final ccna2Examen final ccna2
Examen final ccna2Juli Yaret
 
Understanding and Preventing Layer 2 Attacks
Understanding and Preventing Layer 2 AttacksUnderstanding and Preventing Layer 2 Attacks
Understanding and Preventing Layer 2 AttacksTien Dung
 
Nexus 1000v part ii
Nexus 1000v part iiNexus 1000v part ii
Nexus 1000v part iiKrunal Shah
 
SAS (Secure Active Switch)
SAS (Secure Active Switch)SAS (Secure Active Switch)
SAS (Secure Active Switch)Security Date
 
Introduction to layer 2 attacks & mitigation
Introduction to layer 2 attacks & mitigationIntroduction to layer 2 attacks & mitigation
Introduction to layer 2 attacks & mitigationRishabh Dangwal
 
VoiceBootcamp Ccnp collaboration lab guide v1.0 sample
VoiceBootcamp Ccnp collaboration lab guide v1.0 sampleVoiceBootcamp Ccnp collaboration lab guide v1.0 sample
VoiceBootcamp Ccnp collaboration lab guide v1.0 sampleFaisal Khan
 
Pentesting layer 2 protocols
Pentesting layer 2 protocolsPentesting layer 2 protocols
Pentesting layer 2 protocolsAbdessamad TEMMAR
 
Training Day Slides
Training Day SlidesTraining Day Slides
Training Day Slidesadam_merritt
 

Similar a Mitigating Layer2 Attacks (20)

Ch6
Ch6Ch6
Ch6
 
Network Security - Layer 2
Network Security - Layer 2Network Security - Layer 2
Network Security - Layer 2
 
L2 Attacks.pdf
L2 Attacks.pdfL2 Attacks.pdf
L2 Attacks.pdf
 
CCNA Security 07-Securing the local area network
CCNA Security 07-Securing the local area networkCCNA Security 07-Securing the local area network
CCNA Security 07-Securing the local area network
 
Security Concerns in LANs.pptx
Security Concerns in LANs.pptxSecurity Concerns in LANs.pptx
Security Concerns in LANs.pptx
 
Hacking Cisco
Hacking CiscoHacking Cisco
Hacking Cisco
 
Hacking L2 Switches
Hacking L2 SwitchesHacking L2 Switches
Hacking L2 Switches
 
Cap2 configuring switch
Cap2   configuring switchCap2   configuring switch
Cap2 configuring switch
 
Examen final ccna2
Examen final ccna2Examen final ccna2
Examen final ccna2
 
Understanding and Preventing Layer 2 Attacks
Understanding and Preventing Layer 2 AttacksUnderstanding and Preventing Layer 2 Attacks
Understanding and Preventing Layer 2 Attacks
 
Firewall
FirewallFirewall
Firewall
 
Nexus 1000v part ii
Nexus 1000v part iiNexus 1000v part ii
Nexus 1000v part ii
 
Firewalls
FirewallsFirewalls
Firewalls
 
SAS (Secure Active Switch)
SAS (Secure Active Switch)SAS (Secure Active Switch)
SAS (Secure Active Switch)
 
Network security
Network securityNetwork security
Network security
 
Introduction to layer 2 attacks & mitigation
Introduction to layer 2 attacks & mitigationIntroduction to layer 2 attacks & mitigation
Introduction to layer 2 attacks & mitigation
 
VoiceBootcamp Ccnp collaboration lab guide v1.0 sample
VoiceBootcamp Ccnp collaboration lab guide v1.0 sampleVoiceBootcamp Ccnp collaboration lab guide v1.0 sample
VoiceBootcamp Ccnp collaboration lab guide v1.0 sample
 
Pentesting layer 2 protocols
Pentesting layer 2 protocolsPentesting layer 2 protocols
Pentesting layer 2 protocols
 
Switching
SwitchingSwitching
Switching
 
Training Day Slides
Training Day SlidesTraining Day Slides
Training Day Slides
 

Mitigating Layer2 Attacks

  • 1. Applying Security Policies to Network Switches Deniz Kaya Microsoft, Cisco, Ironport Trainer CCSI, CCNP, MCT, MCSE, ICSI, ICSP
  • 2.
  • 3. Why Worry About Layer 2 Security? Host B Host A Physical Links MAC Addresses IP Addresses Protocols and Ports Application Stream OSI was built to allow different layers to work without knowledge of each other. Application Presentation Session Transport Network Data Link Physical Application Presentation Session Transport Network Data Link Physical
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19. STP Attack (Cont.) F The attacker sends spoofed BPDUs to change the STP topology. Access Switches F The attacker now becomes the root bridge. Access Switches Root F F F F Root B X Root F F F F B F X STP STP
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26. “Learns” by Flooding the Network MAC A MAC B MAC C Port 1 Port 2 Port 3 A->B MAC Port A 1 C 3 The CAM table is incomplete. MAC B is unknown, so the switch will flood the frame. MAC C “sees” traffic to MAC B. A->B A->B
  • 27. CAM Learns MAC B Is on Port 2 B->A B->A MAC A MAC B MAC C Port 1 MAC Port A 1 C 3 Port 2 Port 3 B 2 Host C drops the packet addressed to host B. CAM learns that MAC B is on Port 2. MAC A = host A MAC B = host B MAC C = host C
  • 28. CAM Table Is Updated — Flooding Stops A->B A->B MAC A MAC B MAC C Port 1 MAC Port A 1 C 3 Port 2 Port 3 B 2 CAM has learned MAC B is on Port 2. CAM tables are limited in size. MAC A = host A MAC B = host B MAC C = host C MAC C does not “see” traffic to MAC B anymore.
  • 29. Intruder Launches macof Utility Y->? MAC A MAC B Port 1 Port 2 Port 3 MAC C Bogus addresses are added to the CAM table. MAC Port A 1 B 2 C 3 MAC Port X 3 B 2 C 3 MAC Port X 3 Y 3 C 3 X->? Macof starts sending unknown bogus MAC addresses. Intruder runs macof on MAC C. Y is on Port 3 and CAM is updated. X is on Port 3 and CAM is updated.
  • 30. The CAM Table Overflows — Switch Crumbles Under the Pressure The CAM table is full, so Port 3 is closed. MAC A MAC B MAC C Port 1 Port 2 Port 3 A->B MAC Port X 3 Y 3 C 3 MAC B is unknown, so the switch floods the frame looking for MAC B. MAC A = host A MAC B = host B MAC C = host C A->B A->B
  • 31. MAC Address Spoofing Attack A A A A B B (Attacker) B Switch Port Table B DEST MAC: A DEST MAC: A Switch Port Table 1 1 1 1 2 3 2 3 2 3 2 3 Host Host Host Host Spoofed Switch Port Table Updated Switch Port Table SRC: MAC (A) SRC: MAC (A) SRC = Source DEST = Destination 1 1 1 1 2 2 2 2 3 3 3 3 A B C A B C A B C A,B C
  • 32.
  • 33.
  • 34.
  • 35. Port Security Defaults Shutdown (The port shuts down when the maximum number of secure MAC addresses is exceeded, and an SNMP trap notification is sent.) Violation mode 1 Maximum number of secure MAC addresses Disabled on a port Port security Default Setting Feature
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.