How to securely operate an IPv6 network



Similar documents
How to Securely Operate an IPv6 Network. Eric

Eric Vyncke, Distinguished Engineer, 2011 Cisco and/or its affiliates. All rights reserved. Cisco Public 1

OLD VULNERABILITIES IN NEW PROTOCOLS? HEADACHES ABOUT IPV6 FRAGMENTS

NetFlow/IPFIX Various Thoughts

IPv6 First Hop Security Protecting Your IPv6 Access Network

Presentation_ID. 2001, Cisco Systems, Inc. All rights reserved.

IPV6 流 量 分 析 探 讨 北 京 大 学 计 算 中 心 周 昌 令

IPv6 Fundamentals: A Straightforward Approach

IPv6 Security. Scott Hogg, CCIE No Eric Vyncke. Cisco Press. Cisco Press 800 East 96th Street Indianapolis, IN USA

Introduction to Cisco IOS Flexible NetFlow

IPv6 Trace Analysis using Wireshark Nalini Elkins, CEO Inside Products, Inc.

Configuring Flexible NetFlow

IPv6 Infrastructure Security

Security Assessment of Neighbor Discovery for IPv6

Vulnerabili3es and A7acks

Guide to Network Defense and Countermeasures Third Edition. Chapter 2 TCP/IP

IPv6 INFRASTRUCTURE SECURITY WORKSHOP SESSION 10 BUILDING IPv6 INFRASTRUCTURE NETWORK SECURITY

IPv6 Infrastructure Security Jeffrey L Carrell Network Conversions Network Security Consultant, IPv6 SME/Trainer

LAB II: Securing The Data Path and Routing Infrastructure

IPv6 Security. Scott Hogg. Global Technology Resources, Inc. Director of Technology Solutions CCIE #5133, CISSP #4610

IPv6 Fundamentals, Design, and Deployment

IPv6 Security Best Practices. Eric Vyncke Distinguished System Engineer

Internet Protocol Version 6 (IPv6)

Security of IPv6 and DNSSEC for penetration testers

IPv6 SECURITY. May The Government of the Hong Kong Special Administrative Region

IP(v6) security. Matěj Grégr. Brno University of Technology, Faculty of Information Technology. Slides adapted from Ing.

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

Cisco Network Foundation Protection Overview

IPv6 Security Threats and Mitigations

Recent advances in IPv6 insecurities Marc van Hauser Heuse Deepsec 2010, Vienna Marc Heuse

IPv6 Secure Neighbor Discovery

IP address format: Dotted decimal notation:

Router Security Configuration Guide Supplement - Security for IPv6 Routers

CloudEngine Series Switches. IPv6 Technical White Paper. Issue 01 Date HUAWEI TECHNOLOGIES CO., LTD.

Security Technology White Paper

: Interconnecting Cisco Networking Devices Part 1 v2.0 (ICND1)

Introduction to IP v6

IPv6 Security from point of view firewalls

"Charting the Course...

Internet Firewall CSIS Internet Firewall. Spring 2012 CSIS net13 1. Firewalls. Stateless Packet Filtering

Interconnecting Cisco Network Devices 1 Course, Class Outline

How To Learn Cisco Cisco Ios And Cisco Vlan

Telematics. 9th Tutorial - IP Model, IPv6, Routing

Types of IPv4 addresses in Internet

Security in IPv6. Basic Security Requirements and Techniques. Confidentiality. Integrity

IPv6 Hardening Guide for Windows Servers

Mobility on IPv6 Networks

IPv6 Associated Protocols

Tomás P. de Miguel DIT-UPM. dit UPM

Chapter 3 Configuring Basic IPv6 Connectivity

Internet Protocol: IP packet headers. vendredi 18 octobre 13

ProCurve Networking IPv6 The Next Generation of Networking

IP Next Generation (IPv6)

CCNA 2 v5.0 Routing Protocols Final Exam Answers

Vanguard Applications Ware IP and LAN Feature Protocols. Firewall

Appendix A: Configuring Firewalls for a VPN Server Running Windows Server 2003

Getting started with IPv6 on Linux

IPv6 Security Assessment and Benchmarking Abstract Test Suite

Brocade NetIron Denial of Service Prevention

Network Management & Monitoring

IP Next Generation (IPv6)

Cisco IOS Flexible NetFlow Technology

Securing IP Networks with Implementation of IPv6

Course Contents CCNP (CISco certified network professional)

IPv6 Security 111 Short Module on Security

Task 20.1: Configure ASBR1 Serial 0/2 to prevent DoS attacks to ASBR1 from SP1.

CSCI 454/554 Computer and Network Security. Topic 8.1 IPsec

IPv6 Security ::/0. Poland MUM Warsaw March, 2012 Eng. Wardner Maia Brazil

Configuring Static and Dynamic NAT Translation

About the Technical Reviewers

Firewall Implementation

Personal Firewall Default Rules and Components

IMPLEMENTING CISCO IP ROUTING V2.0 (ROUTE)

IPv6 Diagnostic and Troubleshooting

INTERCONNECTING CISCO NETWORK DEVICES PART 1 V2.0 (ICND 1)

Cisco Certified Network Associate Exam. Operation of IP Data Networks. LAN Switching Technologies. IP addressing (IPv4 / IPv6)

Netflow Overview. PacNOG 6 Nadi, Fiji

MPLS VPN Security BRKSEC-2145

MPLS VPN over mgre. Finding Feature Information. Prerequisites for MPLS VPN over mgre

APNIC elearning: IPSec Basics. Contact: esec03_v1.0

IINS Implementing Cisco Network Security 3.0 (IINS)

Unicast Reverse Path Forwarding

IPv6 Fundamentals Ch t ap 1 er I : ntroducti ti t on I o P IPv6 Copyright Cisco Academy Yannis Xydas

- IPv6 Addressing - (References:

Practical Security Assessment of IPv6 Networks and Devices. Fernando Gont

Configuring Control Plane Policing

DDoS Mitigation Techniques

Review: Lecture 1 - Internet History

Implementing Cisco IOS Network Security

Final exam review, Fall 2005 FSU (CIS-5357) Network Security

SEcure Neighbour Discovery: A Report

Internetwork Expert s CCNA Security Bootcamp. IOS Firewall Feature Set. Firewall Design Overview

Exploiting First Hop Protocols to Own the Network. Rocket City TakeDownCon Paul Coggin Senior Principal Cyber Security

Ethernet. Ethernet. Network Devices

Transcription:

How to securely operate an IPv6 network https://tools.ietf.org/html/draft-ietf-opsec-v6-06 LACNIC 23 Enrique Davila enriqued@cisco.com Released: May 2015

Agenda Ø Management Plane Ø Control Plane Routing Information Neighbor Discovery Control Plane Protection Ø Data Plane Anti-spoofing Access Control List Ø Telemetry Ø Summary 2

Management Plane 3 3

Management over IPv6 SSH, syslog, SNMP, NetFlow all work over IPv6 Dual-stack management plane More resilient: works even if one IP version is down More exposed: can be attacked over IPv4 and IPv6 As usual, infrastructure ACL is your friend as well as out-of-band management 4 4

Control Plane: Routing Protocols 5

Preventing IPv6 Routing Attacks Protocol Authentication BGP, ISIS, EIGRP no change: An MD5 authentication of the routing update OSPFv3 has changed and pulled MD5 authentication from the protocol and instead rely on transport mode IPsec (for authentication and confidentiality) But see RFC 6506 7166 (not yet widely implemented) IPv6 routing attack best practices Use traditional authentication mechanisms on BGP and IS-IS Use IPsec to secure protocols such as OSPFv3 6 6

BGP Route Filters Pretty obvious for customer links For peering, a relaxed one ipv6 prefix-list RELAX deny 3ffe::/16 le 128 ipv6 prefix-list RELAX deny 2001:db8::/32 le 128 ipv6 prefix-list RELAX permit 2001::/32 ipv6 prefix-list RELAX deny 2001::/32 le 128 ipv6 prefix-list RELAX permit 2002::/16 ipv6 prefix-list RELAX deny 2002::/16 le 128 ipv6 prefix-list RELAX deny 0000::/8 le 128 ipv6 prefix-list RELAX deny fe00::/9 le 128 ipv6 prefix-list RELAX deny ff00::/8 le 128 ipv6 prefix-list RELAX permit 2000::/3 le 48 ipv6 prefix-list RELAX deny 0::/0 le 128 Source: http://www.space.net/~gert/ripe/ipv6-filters.html 7 7

Link-Local Addresses vs. Global Addresses Link-Local addresses, fe80::/10, (LLA) are isolated Cannot reach outside of the link Cannot be reached from outside of the link J Could be used on the infrastructure interfaces Routing protocols (inc BGP) work with LLA Benefit: no remote attack against your infrastructure: implicit infrastructure ACL Note: need to provision loopback for ICMP generation (notably traceroute and PMTUD) See also: RFC 7404 LLA can be configured statically (not the EUI-64 default) to avoid changing neighbor statements when changing MAC interface FastEthernet 0/0 ipv6 address fe80::1/64 link-local neighbor fe80::2%fastethernet0/0 8 8

Control Plane: Neighbor Discovery 9

Scanning - Bad for CPU Remote Neighbor Cache Exhaustion RFC 6583 Potential router CPU/memory attacks if aggressive scanning Router will do Neighbor Discovery... And waste CPU and memory Local router DoS with NS/RS/ NS: 2001:db8::3 NS: 2001:db8::2 NS: 2001:db8::1 NS: 2001:db8::3 NS: 2001:db8::2 NS: 2001:db8::1 2001:db8::1 NS: 2001:db8::3 NS: 2001:db8::2 NS: 2001:db8::1 2001:db8::/64 10 10

Mitigating Remote Neighbor Cache Exhaustion Built-in rate limiter with options to tune it Since 15.1(3)T: ipv6 nd cache interface-limit Or IOS-XE 2.6: ipv6 nd resolution data limit Destination-guard is part of First Hop Security phase 3 Priority given to refresh existing entries vs. discovering new ones (RFC 6583) Using a /64 on point-to-point links => a lot of addresses to scan! Using /127 could help (RFC 6164) Internet edge/presence: a target of choice Ingress ACL permitting traffic to specific statically configured (virtual) IPv6 addresses only Using infrastructure ACL prevents this scanning iacl: edge ACL denying packets addressed to your routers Easy with IPv6 because new addressing scheme can be done J http://www.insinuator.net/2013/03/ipv6-neighbor-cache-exhaustion-attacks-risk-assessment-mitigation-strategies-part-1 11 11

Simple Fix for Remote Neighbor Cache Exhaustion Ingress ACL allowing only valid destination and dropping the rest NDP cache & process are safe Requires DHCP or static configuration of hosts 2001:db8::1 NS: 2001:db8::1 NA: 2001:db8::1 2001:db8::/64 12 12

ARP Spoofing is now NDP Spoofing: Threats ARP is replaced by Neighbor Discovery Protocol Nothing authenticated Static entries overwritten by dynamic ones Stateless Address Autoconfiguration rogue RA (malicious or not) All nodes badly configured DoS Traffic interception (Man In the Middle Attack) Attack tools exist (from THC The Hacker Choice) Parasit6 Fakerouter6... 13 13

Mitigating Rogue RA: Host Isolation Prevent Node-Node Layer-2 communication by using: Private VLANs (PVLAN) where nodes (isolated port) can only contact the official router (promiscuous port) WLAN in AP Isolation Mode 1 VLAN per host (SP access network with Broadband Network Gateway) Link-local multicast (RA, DHCP request, etc) sent only to the local official router: no harm Can break DAD Advertise the SLAAC prefix without the on-link bit to force router to do proxy-nd RA Promiscuous Port RA RA RA RA Isolated Port 14 14

Secure Neighbor Discovery (SeND) RFC 3971 Cryptographically Generated Addresses (CGA) IPv6 addresses whose interface identifiers are cryptographically generated RSA signature option Protect all messages relating to neighbor and router discovery Timestamp and nonce options Prevent replay attacks Certification paths for authorized Routers Anchored on trusted parties, expected to certify the authority of the routers on some prefixes Requires IOS 12.4(24)T Not available on host OS (Windows, OS/X, Android, ios, ) 15 15

Securing Link Operations: First Hop Trusted Device Advantages central administration, central operation Complexity limited to first hop Transitioning lot easier Efficient for threats coming from the link Efficient for threats coming from outside Certificate server Disadvantages Applicable only to certain topologies Requires first-hop to learn about end-nodes First-hop is a bottleneck and single-point of failure Time server 16 16

First Hop Security: RAguard since 2010 - RFC 6105 Port ACL blocks all ICMPv6 RA from hosts interface FastEthernet0/2 RA ipv6 traffic-filter ACCESS_PORT in access-group mode prefer port ROUTER Device-role RA-guard lite (12.2(33)SXI4 & 12.2(54)SG ): also dropping all RA received on this port interface FastEthernet0/2 ipv6 nd raguard access-group mode prefer port Can also enforce MTU, prefix,... In RA RA RA RA HOST Device-role RA-guard (12.2(50)SY, 15.0(2)SE) ipv6 nd raguard policy HOST device-role host ipv6 nd raguard policy ROUTER device-role router ipv6 nd raguard attach-policy HOST vlan 100 interface FastEthernet0/0 ipv6 nd raguard attach-policy ROUTER 17 RA 17

Control Plane Protection 18

Control Plane Policing for IPv6 Protecting the Router CPU Against DoS with NDP, Hop-by-Hop, Hop Limit Expiration... Software routers (ISR, 7200): works with CoPPr (CEF exceptions) See also RFC 6192 Rate limiters policy-map COPPr class ICMP6_CLASS police 8000 class OSPF_CLASS police 200000 class class-default police 8000! control-plane cef-exception service-policy input COPPr 19 19

Data Plane 20

DoS Example Ping-Pong over Physical Point-to-Point Same as in IPv4, on real P2P without NDP, if not for me, then send it on the other side... Could produce looping traffic Classic IOS and IOS-XE platforms implement RFC 4443 so this is not a threat Except on 76xx see CSCtg00387 (tunnels) and few others IOS-XR see CSCsu62728 Else use /127 on P2P link (see also RFC 6164) Or use infrastructure ACL or only link-local addresses R1 2) To 2001:db8::3 Serial 0/0 2001:db8::1/64 3) To 2001:db8::3 Serial 0/0 2001:db8::2/64 R2 4) To 2001:db8::3 21... 5) To 2001:db8::3 21

IPv6 Bogon and Anti-Spoofing Filtering IPv6 nowadays has its bogons: http://www.team-cymru.org/services/bogons/fullbogons-ipv6.txt Every network should implement two forms of anti-spoofing protections: Prevent spoofed addresses from entering the network Prevent the origination of packets containing spoofed source addresses Anti-spoofing in IPv6 same as IPv4 => Same technique for single-homed edge= urpf IPv6 Intranet Inter-Networking Device with urpf Enabled X IPv6 Intranet/ Internet IPv6 Unallocated Source Address No Route to SrcAddr => Drop 22 22

Remote Triggered Black Hole RFC 5635 RTBH is easy in IPv6 as in IPv4 urpf is also your friend for blackholing a source RFC 6666 has a specific discard prefix 100::/64 http://www.cisco.com/web/about/security/intelligence/ipv6_rtbh.html Source: Wikipedia Commons 23 23

Parsing the Extension Header Chain Finding the layer 4 information is not trivial in IPv6 Skip all known extension header Until either known layer 4 header found => MATCH Or unknown extension header/layer 4 header found... => NO MATCH IPv6 hdr HopByHop Routing AH TCP data IPv6 hdr HopByHop Routing AH Unknown L4??? 24 24

IOS IPv6 Extended ACL Can match on Upper layers: TCP, UDP, SCTP port numbers, ICMPv6 code and type TCP flags SYN, ACK, FIN, PUSH, URG, RST Traffic class (only six bits/8) = DSCP, Flow label (0-0xFFFFF) IPv6 extension header routing matches any RH, routing-type matches specific RH mobility matches any MH, mobility-type matches specific MH dest-option matches any destination options auth matches AH hbh matches hop-by-hop (since 15.2(3)T) fragments keyword matches Non-initial fragments undetermined-transport keyword does not match if TCP/UDP/SCTP and ports are in the fragment ICMP and type and code are in the fragment Everything else matches (including OSPFv3, ) Only for deny ACE Check your platform & release as your mileage can vary 25 25

Telemetry 26

Available Tools Usually IPv4 telemetry is available SNMP MIB Not always available yet on Cisco gears Flexible Netflow for IPv6 Available in : 12.4(20)T, 12.2(33)SRE Public domain tools: nfsen, nfdump, nfcpad 27 27

Flexible Flow Record: IPv6 Key Fields (Version 9) IPv6 IP (Source or Destination) Prefix (Source or Destination) Mask (Source or Destination) Minimum-Mask (Source or Destination) Protocol Traffic Class Flow Label Option Header Header Length Payload Length Payload Size Packet Section (Header) Packet Section (Payload) DSCP Extension Hop-Limit Length Next-header Version Routing Destination AS Peer AS Traffic Index Forwarding Status Is-Multicast IGP Next Hop BGP Next Hop Flow Sampler ID Direction Interface Input Output Transport Destination Port Source Port ICMP Code ICMP Type IGMP Type TCP ACK Number TCP Header Length TCP Sequence Number TCP Window-Size TCP Source Port TCP Destination Port TCP Urgent Pointer TCP Flag: ACK TCP Flag: CWR TCP Flag: ECE TCP Flag: FIN TCP Flag: PSH TCP Flag: RST TCP Flag: SYN TCP Flag: URG UDP Message Length UDP Source Port UDP Destination Port 28

Flexible Flow Record: IPv6 Extension Header Map Bits 11-31 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Res ESP AH PAY DST HOP Res UNK FRA0 RH FRA1 Res FRA1: Fragment header not first fragment RH: Routing header FRA0: Fragment header First fragment UNK: Unknown Layer 4 header (compressed, encrypted, not supported) HOP: Hop-by-hop extension header DST: Destination Options extension header PAY: Payload compression header AH: Authentication header ESP: Encapsulating Security Payload header Res: Reserved 29 29

Summary 30

Key Takeaway As expected IPv6 secure operations are quite similar to IPv4 (Main differences at layer 2) Management plane Protect management plane with access-class Control plane Authenticate IGP Consider the use of link-local on P-P links? Mitigate rogue-ra with RA-guard Configure control plane policing Data plane Beware of ping-pong on not /127 real P2P link Apply anti-spoofing, anti-bogons Use ACL where applicable, ACL must permit NDP Telemetry SNMP MIB and Netflow v9 are your friends Netflow can be used for inventory 31 31