42
1 1 Exploiting First Hop Protocols to Own the Network Bsides Vienna 2016 Paul Coggin @PaulCoggin

Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

1 1

Exploiting First Hop Protocols to Own the Network

Bsides Vienna 2016

Paul Coggin @PaulCoggin

Page 2: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

2 2

OSI and TCP/IP Model

OSI Model

7

6

5

4

3

2

1

Application

Presentation

Session

Transport

Network

Data Link

Physical

TCP/IP Model

Network Interface

Application

Transport

Internet

Frame Header

Ow

n th

e N

etw

ork

Page 3: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

3 3

Cisco Discovery Protocol (CDP)

Cisco Discovery Protocol (CDP) -  Great tool for mapping out a network during an audit -  Be sure to disable on connections to external networks such as WAN, MetroE -  VoIP phones use CDP (how to secure info leakage on VoIP net??)

Page 4: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

4 4

Cisco Discovery Protocol (CDP) – Great for Recon!

Page 5: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

5 5

Multicast Source 1

Multicast Overview

Multicast Source 2

Multicast uses UDP One-way traffic stream “Fire and Forget” -  Video -  Many other apps Multicast Routing PIM - Reverse Path Forwarding(RPF)

Receiver Receiver Receiver

IGMP Report to Join Multicast Group

Member 1

IGMP Report to Join Multicast Group

Member 1

IGMP Report to Join Multicast Group

Member 2

- Routers send periodic queries - Host per VLAN per group reports -  Host may send

leave messages -  IPv4 – IGMP -  IPv6 - MLD

Multicast PIM routing

Page 6: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

6 6

Multicast - IGMP

Page 7: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

7 7

Multicast Routing - PIM

Page 8: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

8 8

Multicast Source 1

Attacking Multicast

Multicast Source 2

Receiver Receiver Receiver

Multicast PIM routing

Craft Router PIM Packets -  SCAPY -  Colasoft Packet Builder -  Possible to use GNS3

or Quagga etc to add PIM router

Local VLAN Segement -  Hello packets -  Join/Prune packets -  Assert Unicast PIM Packets -  Register -  Register-Stop -  C-RP-Advertisement

Craft IGMP/MLD - SCAPY - Collasoft Packet Builder - IGMP Leaves - IGMP Queries - Spoof IGMP Source

Page 9: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

9 9

Multicast Source 1

Securing Multicast

Multicast Source 2

Receiver Receiver Receiver

Multicast PIM routing

- Control Plane Policing(CoPP) - Modular Quality of Service - PIM Neighbor Filter (ACL may be defeated by spoofing. L2 spoof protection needed.) -  RP Announce Filter -  Multicast Boundary Filter -  L3 Switch Aggregation

Multicast Storm Control on switches L2 port security

Secure Multicast Control Protocol Trust Relationships

Page 10: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

10 10

Protocol Hacking Tools GNS3 SCAPY Colasoft Packet Builder Many others… (Remember to enable IP forwarding)

First Hop Redundancy Protocols

Global Load Balancing Protocol (GLBP) Hot Standby Router Protocol (HSRP) Virtual Redundant Router Protocol (VRRP)

Active router 192.168.1.1

Backup router 192.168.1.2

Virtual router 192.168.1.3

192.168.1.50

Multicast protocol Priority elects role MD5, clear, no authentication

V

VRogue Insider

Page 11: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

11 11

VRRP – No Authentication

VRRP – No Authentication

Page 12: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

12 12

VRRP – Clear Text Authentication

VRRP – Clear Text Authentication

Page 13: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

13 13

HSRP MITM – Packet Analysis

HSRP Password Clear Text

Page 14: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

14 14

FHRP – Crafted HSRP Packets

Routers

Rogue Insider

Crafted HSRP coup packet with higher priority

Page 15: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

15 15

IPv6 Neighbor Discover Protocol

Filter on IPv6 or Ethernet Type 0x86DD to Identify IPv6 Packets

IPv6 uses multicast \ No more broadcast

Page 16: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

16 16

IPv6 SLACC MITM

IPv6 Neighbor Discovery Protocol (NDP) (Think ARP for IPv6) IPv6 MITM Tools -  Chiron, -  Evil FOCA -  THC Parasite6 -  SCAPY -  Colasoft Packet Builder

Windows

Linux Mac

Default - Hosts Send ICMPv6 Router Solicitation

Rogue Insider Sending RA’s

Man-in-the-Middle

Mitigations -  RAguard -  802.1x -  Private VLANs -  IPv6 port security -  Source\Destination Guard -  SeND (encrypt NDP)

Page 17: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

17 17

IPv6 Network Discovery Spoofing - MITM

Windows

Linux

Mac

Mitigations -  Source\Destination Guard -  802.1x -  Private VLANs -  IPv6 port security -  NDP Spoofing -  DHCP Snooping -  Source\Destination Guard -  SeND (encrypt NDP)

Rogue Insider

Network Discovery Spoofing - MITM (ARP Spoofing equivalent for IPv6)

IPv6 Neighbor Discovery Protocol (NDP) (Think ARP for IPv6) IPv6 MITM Tools -  Chiron -  Evil FOCA -  THC Parasite6 -  SCAPY -  Colasoft Packet Builder

Page 18: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

18 18

OSPF – No Authentication

Page 19: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

19 19

OSPF – Clear Text Authentication

Page 20: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

20 20

Hack the Network via OSPF

Area 1

Area Border Router (ABR)

ABR

Area 2

Area 0

Autononynmous System Border Router (ASBR)

DR BDR

OSPF Exploit Tools -  Quagga -  NRL Core(Network Simulator) -  Nemesis -  Loki -  GSN3\Dynamips - Buy a router on eBay -  Hack a router and reconfigure -  Code one with Scapy -  IP Sorcery( IP Magic) -  Cain & Able to crack OSPF MD5 -  MS RRAS -  NetDude -  Collasoft -  Phenoelit IRPAS

OSPF Attack Vectors -  Take over as DR - Inject routes to mask source of attack - DoS -  Inject routes for MITM - Add new routes to hacked router - Change interface bandwidth or use IP OSPF Cost for Traffic Engineering on hacked router

OSPFtypicallyisimplementedwithoutanythoughttosecurity.LSA’saremul<castonthespokeLANforanyusertosniffwithoutMD5.

External Network BGP, EIGRP, ISIS

Page 21: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

21 21

10.1.2.0 255.255.255.0

EIGRP – No Authentication

Page 22: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

22 22

10.1.1.0 255.255.255.0

10.1.2.0 255.255.255.0

192.168.1.0 255.255.255.0

Hack the Network via EIGRP

SimilartoOSPF,EIGRPtypicallyisimplementedwithoutanythoughttosecurity.Network

administratorsshoulduseauthen<ca<onandconfigureinterfacestobepassiveinEIGRP.

EIGRP Attack Vectors -  Inject routes to mask source of attack -  DoS -  Inject routes for MITM -  Add new routes to hacked router -  Change interface bandwidth for Traffic Engineering on hacked router EIGRP Exploit Tools -  GSN3\Dynamips - Buy a router on eBay -  Hack a router and reconfigure -  Phenoelit IRPAS

Page 23: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

23 23

DMZ Layer 2 Security

Secure DMZ Trusts - PVLAN - VACL - Separate Virtual or Physical Int w/ ACL’s - Develop a network traffic matrix to define required network traffic flows WWW

DNS

SMTP

SharePoint

DMZ -  Typically single VLAN -  Open trusts Inside VLAN -  DMZ to Internal AD integ. -  Pivot from DMZ to Internal network

Internal Network

Database Email DNS

*NIX w/NIS(AD Integ.)

Active Directory

Internet

Page 24: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

24 24

Layer 2 – Secure Visualization and Instrumentation

TAP/Sniffer

NOC \ SOC

Out-of-bound Network

Whitelist the Layer 2 Network Trust Relationships

Whitelist Trusted Information Flows in Monitoring

Secure Control, Management, Data Planes

In-band Monitoring EPC SPAN RSPAN ERSPAN Netflow

Page 25: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

25 25

References DevelopingIPMul<castNetworks,Vol1–BeauWilliamsonLANSwitchSecurity–WhatHackersKnowAboutYourSwitches,EricVyncke,ChristopherPaggen,CiscoPressEnnoRey-@Enno_Insinuator,�@WEareTROOPERS��,ERNWPapersandResources,www.ernw.de,www.insinuator.netIvanPepeInjak-@IOShints,PapersandResources,h[p://www.ipspace.netIPv6Security,Sco[HoggandEricVyncke,CiscoPressh[p://www.gtri.com/wp-content/uploads/2014/10/IPv6-Hacker-Halted-The-Hacker-Code-Angels-vs-Demons.pdfThePrac<ceofNetworkSecurityMonitoring,RicardBejtlich,NoStarchPressRouterSecurityStrategiesSecuringIPNetworkTrafficPlanes,GreggSchudel,DavidJ.Smith,CiscoPressh[ps://www.cisco.com/go/safeh[p://docwiki.cisco.com/wiki/FHSh[p://www.netop<cs.com/blog/01-07-2011/sample-pcap-filesh[p://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipapp_frp/configura<on/12-4/fp-12-4-book.htmlh[p://www.cisco.com/c/en/us/td/docs/solu<ons/Enterprise/Security/Baseline_Security/securebasebook/sec_chap8.htmlh[p://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst6500/ios/12-2SX/best/prac<ces/recommenda<ons.htmlh[p://www.cisco.com/c/en/us/td/docs/solu<ons/Enterprise/Security/Baseline_Security/securebasebook/sec_chap8.htmlh[p://www.cisco.com/web/about/security/intelligence/ipv6_first_hop.htmlh[p://www.cisco.com/c/en/us/support/docs/ip/access-lists/13608-21.htmlh[p://monkey.org/~dugsong/dsniff/h[ps://www.yersinia.neth[ps://www.nsa.gov/ia/_files/factsheets/Factsheet-Cisco%20Port%20Security.pdfh[p://iase.disa.mil/s<gs/net_perimeter/network-infrastructure/Pages/index.aspxh[p://www.cisco.com/c/en/us/about/security-center/mul<cast-toolkit.html

Page 26: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

26 26

Ques&ons?

@PaulCoggin

Page 27: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

27 27

OSPF – MD5 Authentication

Page 28: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

28 28

10.1.2.0 255.255.255.0

EIGRP – MD5 Authentication

Page 29: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

29 29

VPN_A

VPN_A

VPN_B 10.3.0.0

10.1.0.0

11.5.0.0

P P

P

P

PE

PE CE

CE

CE

VPN_A

VPN_B

VPN_B

10.1.0.0

10.2.0.0

11.6.0.0

CE PE

PE CE

CE

VPN_A 10.2.0.0

CE

iBGP sessions

•  P Routers (LSRs) are in the Core of the MPLS Cloud •  PE Routers (Edge LSRs or LERs) Use MPLS with the

Core and Plain IP with CE Routers •  P and PE Routers Share a Common IGP •  PE Routers are MP-iBGP Fully-meshed

MPLS Architecture Overview

Service provider may accidentally or intentionally misconfigure VPN’s

Utilize IPSEC VPN over MPLS VPN to insure security

Page 30: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

30 30

MPLS Label PCAP - Service Provider Core

32-bit MPLS Label Format •  Label : 20-bit •  EXP : 3-bit •  Bottom-of-Stack : 1-bit •  TTL : 8-bit

CPE to CPE Telnet over Service Provider MPLS VPN

Page 31: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

31 31

Telnet Username \ Password – Clear Text Encapsulated in MPLS VPN

A Separate Overlay Encrypted VPN is Required to Secure Your Traffic

Page 32: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

32 32

CAM Table Overflow Attack

Yersinia, Macof, DSNIFF

Node2toNode4

Node2toNode4

Node 1

Node 2 Node 4

Node 3

Node2toNode4

Switch CAM table exploited resulting in switch VLAN operating like a shared Ethernet hub Attack may cause multiple switches to fallback to shared Ethernet behavior

Implement port security to limit MACs per interface, SNMP Traps

Page 33: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

33 33

ARP Poisoning

Corporate Server

IP 172.16.1.1

User 1 IP 192.168.1.2 MAC 2222.2222.2222

User 3 IP 192.168.1.3 MAC 3333.3333.3333

Router IP 192.168.1.1 MAC 1111.1111.1111

Gratuitous ARP – User 1 traffic to server redirected to User 3 172.16.1.1 MAC 3333.3333.3333

Gratuitous ARP – Return traffic redirected to User 3 192.168.1.2 MAC 3333.3333.3333

Cain and Abel Ettercap

User 1 ARP Cache Poisoned

Router ARP Cache Poisoned

Page 34: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

34 34

ARP Poisoning

•  Dynamic ARP Inspection •  IP Source Inspection •  SNMP Alerts and Syslog monitoring

Page 35: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

35 35

Rogue DHCP Server

DHCP Client Corporate

DHCP Server

Rogue User

Unauthorized DHCP Server •  Allocates bad DNS server or default gateway Denial of service by exhausting the leases in the DHCP scope •  Tools – Yersinia, Gobbler Mitigation •  Limit MAC addresses per interface •  VACL’s to block DHCP UDP 68 •  DHCP snooping Trusted\Untrusted (mitigates client hardware address change)

Page 36: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

36 36

Lawful Intercept Identify Physical Source of Traffic

DHCP with Option 82

Support

Example Enterprise Network

DHCP Option 82 provides the DSLAM and Switch Name and the Physical Interface That Requested a DHCP IP Address

DHCP request

DHCP response with IP address

DHCP request with sub ID in Option identifier (RFC 3046)

Ethernet Access Domain

MAC B

MAC C

MAC A

ISP

DHCP Server ADSL

modem

IP DSLAM PE-AGG

DSL CPE

L3VPN-PE

Page 37: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

37 37

Spanning Tree Protocol – Attack

Implement Root Guard, BPDU Guard, Syslog, SNMPv3 Alerts

Root Bridge MITM, DoS (Yersinia)

BPDU

w/p

riority0

Root

Page 38: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

38 38

VLAN Trunking Protocol (VTP)

VTP Server

Transparent (VTP DB rev 0) VTP

Client VTP

Client

802.1Q Trunk 802.1Q Trunk

802.1Q Trunk

•  VLANs are added\removed on VTP Server •  VLAN modifications propagated to VTP Clients •  Common VTP Domain name and password •  Same Native VLAN on Trunk •  Sync to latest changes

VTP Client

802.1Q Trunk

Page 39: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

39 39

VLAN Trunking Protocol (VTP) - Security

VTP Server

Transparent (VTP DB rev 0) VTP

Client VTP

Client

802.1Q Trunk 802.1Q Trunk

802.1Q Trunk

•  Existing network running default VTP settings •  Switches sync to higher rev VTP DB resulting in VLAN config being lost!! •  Everyone has a current VLAN.DAT backup right?? •  Configure a password for VTP Domain (NOT Cisco….SanFran….) •  Delete VLAN.DAT before connecting a new switch •  Change the native VLAN to something other than 1

VTP Client

802.1Q Trunk

Switch with higher rev of VTP DB added

Page 40: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

40 40

Broadcast Storms

VLAN 20

VLAN 20

VLAN 20 VLAN 20

VLAN 20

Rogue Insider Misconfigured Application

Failed NIC

Broadcast storm propagated across VLAN

VLAN 20

Traffic Storm Control limits unicast, multicast, broadcast traffic to a % of port BW •  Not enabled on interfaces by default (add to template configuration for port security) •  Traffic that exceeds configured threshold will be dropped •  Violations can be configured to be shutdown or send a SNMP Trap(recommend v3)

Page 41: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

41 41

VLAN Hopping – Dynamic Trunking Protocol

•  Dynamic Trunk Protocol (DTP) Modes : Auto, On, Off, Desirable, Non-negotiate •  IP Phones, Wireless Access Points •  All VLANs are trunked by default •  Native VLAN (untagged); Default Native VLAN 1 and required by DTP •  Yersinia or other packet crafting tools •  Disable trunking on interfaces where not in use •  Specify VLANs to be allowed on trunk interfaces •  Do not use Native VLAN 1

VLAN 50

VLAN 60

VLAN 50

VLAN 40

VLAN 60

DTP Trunk

Spoof DTP to look like switch (Yersinia)

Page 42: Bsides Vienna 2016 Paul Coggin @PaulCoggin · Bsides Vienna 2016 Paul Coggin @PaulCoggin . 2 2 OSI and TCP/IP Mode OSI Model 7 6 5 4 3 2 1 Application Presentation Session Transport

42 42

VLAN Hopping – Double VLAN Tag

•  No two-way communication. Frames sent to target with no response to sender. •  Craft Frames with double encapsulated frames •  VLAN trunking is not required in this scenario •  Disable AUTO\DYNAMIC NEGOTIATION! •  Don’t use native VLAN 1. Use tagged mode for native VLAN x on trunks •  Disable interfaces not in use

VLAN 50

VLAN 60

VLAN 50 VLAN 40

VLAN 60

VLAN 10

Yersinia VLAN

10,VLAN40

VLAN40TagFrame UntaggedFrame

Switch strips off first VLAN ID