Security Assessment of Neighbor Discovery for IPv6



Similar documents
IPv6 Associated Protocols

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

Security Implications of the Internet Protocol version 6 (IPv6)

OLD VULNERABILITIES IN NEW PROTOCOLS? HEADACHES ABOUT IPV6 FRAGMENTS

IPv6 First Hop Security Protecting Your IPv6 Access Network

IPv6 Functionality. Jeff Doyle IPv6 Solutions Manager

Practical Security Assessment of IPv6 Networks and Devices. Fernando Gont

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

The Truth about IPv6 Security

IPv6 Infrastructure Security

Security of IPv6 and DNSSEC for penetration testers

Vulnerabili3es and A7acks

Dedication Preface 1. The Age of IPv6 1.1 INTRODUCTION 1.2 PROTOCOL STACK 1.3 CONCLUSIONS 2. Protocol Architecture 2.1 INTRODUCTION 2.

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

IPv6 Fundamentals: A Straightforward Approach

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

About the Technical Reviewers

Recent Advances in IPv6 Security. Fernando Gont

Joe Davies. Principal Writer Windows Server Information Experience. Presented at: Seattle Windows Networking User Group June 1, 2011

IPv6 Hardening Guide for Windows Servers

Implementing DHCPv6 on an IPv6 network

Neighbour Discovery in IPv6

Chapter 3 Configuring Basic IPv6 Connectivity

IPv6 INFRASTRUCTURE SECURITY WORKSHOP SESSION 10 BUILDING IPv6 INFRASTRUCTURE NETWORK SECURITY

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

IPv6 Security Analysis

Personal Firewall Default Rules and Components

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

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

Types of IPv4 addresses in Internet

Efficient IPv6 Neighbor Discovery Optimizations for Wired and Wireless Networks

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

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

ITL BULLETIN FOR JANUARY 2011

IPv6 Security Best Practices. Eric Vyncke Distinguished System Engineer

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

IPv6 Addressing and Subnetting

IPv6 associated protocols. Piers O Hanlon

Vicenza.linux.it\LinuxCafe 1

IPv6 Diagnostic and Troubleshooting

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

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

Firewalls und IPv6 worauf Sie achten müssen!

TESTING IPV6 ROUTERS WITH THE NEIGHBOR DISCOVERY PROTOCOL

SEcure Neighbour Discovery: A Report

IPv6 Advantages. Yanick Pouffary.

Corresponding Auto Names for IPv6 Addresses <draft-kitamura-ipv6-auto-name-02.txt> Hiroshi KITAMURA NEC Corporation

IPv6 Security 111 Short Module on Security

IPv6 Network Reconnaissance:

IPv6 Secure Neighbor Discovery

Introduction to IP v6

Technology Brief IPv6 White Paper.

IPv6 Security: Transition from IPv4 to IPv6

IPV6 FRAGMENTATION. The Case For Deprecation. Ron Bonica NANOG58

CSE 127: Computer Security. Network Security. Kirill Levchenko

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

Introduction to Mobile IPv6

Review: Lecture 1 - Internet History

- IPv6 Addressing - (References:

Keywords: IPv6, transition, security, network, IPv4 security of IPv6 still has a long way to go.

How to securely operate an IPv6 network

ProCurve Networking IPv6 The Next Generation of Networking

A Sampling of Internetwork Security Issues Involving IPv6

Windows 7 Resource Kit

Internet Packets. Forwarding Datagrams

IPv6 Hands-on Lab. Faraz Shamim, Technical Leader Harold Ritter, Technical Leader. Toronto, Canada May 30, 2013

IPv6 Security Assessment and Benchmarking Abstract Test Suite

Mobile IP Network Layer Lesson 02 TCP/IP Suite and IP Protocol

Getting started with IPv6 on Linux

Router Security Configuration Guide Supplement - Security for IPv6 Routers

INLICHTINGEN DIENSTEN INLICHTINGEN DIENSTEN

Mobility on IPv6 Networks

Junos OS. IPv6 Neighbor Discovery Feature Guide for Routing Devices. Release Modified: Copyright 2015, Juniper Networks, Inc.

Moonv6 Test Suite. IPv6 Firewall Functionality and Interoperablility Test Suite. Technical Document. Revision 0.6

IPv6 Autoconfiguration Best Practice Document

Discovering IPv6 with Wireshark. presented by Rolf Leutert

Name Service in IPv6 Mobile Ad-hoc Network

Overview. Lecture 16: IP variations: IPv6, multicast, anycast. I think we have a problem. IPv6. IPv6 Key Features

Security with IPv6 Explored. U.S. IPv6 Summit Renée e Esposito Booz Allen Hamilton Richard Graveman RFG Security

Internet Protocol Version 6 (IPv6)

Brocade NetIron Denial of Service Prevention

Industry Automation White Paper Januar 2013 IPv6 in automation technology

About Me. Work at Jumping Bean. Developer & Trainer Contact Info: mark@jumpingbean.co.za

IPv6 mobility and ad hoc network mobility overview report

Mobile IP. Bheemarjuna Reddy Tamma IIT Hyderabad. Source: Slides of Charlie Perkins and Geert Heijenk on Mobile IP

Domain Name Auto-Registration for Plugged-in IPv6 Nodes. <draft-kitamura-ipv6-name-auto-reg-00.txt>

ERserver. iseries. Networking TCP/IP setup

Transcription:

Security Assessment of Neighbor Discovery for IPv6 Fernando Gont project carried out on behalf of UK Centre for the Protection of National Infrastructure LACNIC XV 15 al 20 de Mayo de 2011. Cancún, México

Agenda Ongoing work on IPv6 security at UK CPNI IPv6 Address resolution mechanism Attacks against the address resolution mechanism IPv6 Stateless Address Auto-Configuration (SLAAC) Attacks against SLAAC Router Advertisement Guard (RA-Guard) evasion Conclusions Questions (and hopefully answers )

Ongoing work on IPv6 security at UK CPNI

Ongoing work on IPv6 security at CPNI The UK CPNI (Centre for the Protection of National Infrastructure) is currently working on a security assessment of the IPv6 protocol suite Similar project to the one we carried out years ago on TCP and IPv4: Security assessment of the protocol specifications Security assessment of common implementation strategies Production of assessment/proof-of-concept tools Publication of best practices documents Currently cooperating with vendors and other parties If you re working on a IPv6 implementation, have hardware that you can let me play with, I d like to hear from you

Neighbor Discovery in IPv6

Neighbor Discovery in IPv6 Neighbor Discovery is employed for Address Resolution and Stateless Address Autoconfiguration (SLAAC) It is based on ICMPv6 messages It implements a similar functionality to that provided in IPv4 by the ARP and DHCPv4

Address Resolution in IPv6

Address Resolution in IPv6 Employs Neighbor Solicitation and Neighbor Advertisement messages. The process is simple: 1. Node 1 sends a NS: Who has IPv6 address 2001:db8::1? 2. Node 2 responds with a NA: I have address 2001:db8::1, and the Link-layer address is 06:09:12:cf:db:55. 3. Node 1 caches the received information in the Neighbor Cache for a while (an optimization) 4. Node 1 can now send packets to Node 2

Neighbor Solicitation messages Used to request the Link-layer address of an IPv6 node. The only allowed option is the Source Link-layer address option 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 Type Code Checksum Reserved // Target Address // Options... +-+-+-+-+-+-+-+-+-+-+-+-

Neighbor Advertisement messages Used to respond with the Link-layer address of an IPv6 node. The only allowed option is the Target Link-layer address option 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 Type Code Checksum Reserved // Target Address // Options... +-+-+-+-+-+-+-+-+-+-+-+-

Source/Target Link-layer address option The Source Link-layer address option contains the link-layer address of the IPv6 Source Address of the packet The Target Link-layer address contains the link-layer address of the Target Address of a Neighbor Solicitation message 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 Type Length Link-Layer Address... Type: 1 for Source Link-layer Address 2 for Target Link-layer Address

Address Resolution in IPv6 (a sample attack ) All work and no play makes Jack a dull boy...

Overflowing the Neighbor Cache Some implementations fail to enforce limits on the number of entries in the Neigbor Cache Attack: Send tons of Neighbor Solicitation messages that include a Source Link-layer address option For each packet, the target system adds an entry in the Neighbor Cache If entries are added at a higher rate than they are garbage-collected

Overflowing the Neighbor Cache (II)

Manin themiddleordenialofservice If no athentication is in place, node impersonation becomes trivial Attack: Just listen for Neighbor Solicitation messages for the victim host Forge a Neighbor Advertisement when a solicitation is received If the forged Target Link-layer address is non-existent, traffic is blackholed, and hence a DoS is achieved If the forged Target Link-layer address is that of the attacker s box, he can perform a Man In The Middle (MITM) attack

Stateless Address Autoconfiguration in IPv6

Stateless Address Autoconfiguration It roughly works as follows: 1. The host configures a link-local address 2. It checks that the address is unique i.e., performs Duplicate Address Detection (DAD) for that address Send a NS, and wait to see if a NA arrives 3. The host sends a Router Solicitation message 4. When a response is received, a tentative address is configured 5. Thetentativeaddressischeckedforuniqueness i.e., Duplicate Address Detection (DAD) is performed for that address Send a NS, and wait to see if a NA arrives 6. If it s unique, the address becomes a valid address

SLAAC Flowchart

Router Solicitation messages They are ICMPv6 messages of Type 133, Code 0 Used for soliciting a local router network configuration The only option that is currently allowed in RS messages is the Source Link-layer Address option 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 Type Code Checksum Reserved Options... +-+-+-+-+-+-+-+-+-+-+-+-

Router Advertisement messages They are ICMPv6 messages of Type 134, Code 0 Used for soliciting a local router network configuration 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 Type Code Checksum Cur Hop Limit M O H Prf Resvd Router Lifetime Reachable Time Retrans Timer Options... +-+-+-+-+-+-+-+-+-+-+-+-

Allowed options in RA messages The current specifications allow RA messages to contain any of the following options: Source Link-layer address Prefix Information MTU Route Information Recursive DNS Server

Prefix Information option Used to specify on-link prefixes and prefixes for autoconfiguration 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 Type Length Prefix Length L A R Reserved1 Valid Lifetime Preferred Lifetime Reserved2 // Prefix //

SLAAC for IPv6 a few sample attacks All work and no play makes Jack a dull boy...

Denial of Service Play with Duplicate Address Detection Listen for Neighbor Solicitation messages that use the unspecified address (::) as the IPv6 Source Address When a Solicitation is received, respond with a Neighbor Advertisement As a result, the address will be considered non-unique, and DAD will fail. Disable an existing router Impersonate the local router, and send a Router Advertisement with a Router Lifetime of 0 (or other small value)

Router Advertisement Guard (RA-Guard) Placebo Security

Router Advertisement Guard Many organizations use Router Advertisement Guard as the first line of defence for Neighbor Discovery attacks RA-Guard works (roughly) as follows: A layer-2 device is configured such that Router Advertisement messages are allowed if they arrive on a specified port RA messages received on other ports are blocked It relies on the RA-Guard box s ability to identify Router Advertisement messages

Router Advertisement Guard evasion, Making the RA-Guard box s life painfull

Problem statement The protocol specifications allow (and implementations support it) use of multiple extension headers even multiple instances of the same extension header type. The resulting packet structure becomes complex, and it becomes difficult to implement packet filtering. Example: NH=60 NH=58 IPv6 IPv6 Destination Options Destination Options ICMPv6 ICMPv6 Router Router Advertisement Advertisement

Problem statement (II) The Bad Combination of Destination Options header and fragmentation: Original Packet NH=60 IPv6 IPv6 NH=58 Destination Options Destination Options ICMPv6 ICMPv6 Router Router Advertisement Advertisement NH=44 NH=60 NH=58 First Fragment IPv6 IPv6 Fragmentation Fragmentation Destination Options Destination Options NH=44 NH=60 NH=58 Second Fragment IPv6 IPv6 Fragmentation Fragmentation Dest. Options Dest. Options ICMPv6 ICMPv6 Router Router Advertisement Advertisement

Problem statement (III) The Ugly Two Destination Options header, and fragmentation: Original Packet NH=60 IPv6 IPv6 NH=60 Destination Options Destination Options NH=58 Dest. Options Dest. Options ICMPv6 Router ICMPv6 Advertisement Router Advertisement NH=44 NH=60 NH=60 First Fragment IPv6 IPv6 Fragment Fragment Dest. Options Dest. Options NH=44 NH=60 NH=58 Second Fragment IPv6 IPv6 Fragment Fragment D. Opt. Hdr. D. Opt. Hdr. Dest. Options Dest. Options ICMPv6 Router ICMPv6 Advertisement Router Advertisement

Results Even a simple Destination Options header breaks simple implementations of RA Guard A combination of fragmentation makes it impossible for a layer-2 device to event detect that a Router Advertisement message is traversing the device (i.e., Game Over )

Conclusions Clearly, it will take a long time till the maturity of IPv6 implementations matches that of IPv4 implementations. It is dangerous that organizations deploy technologies and mitigations without a deep understanding of them.

Questions?

Acknowledgements UK CPNI, LACNIC, y ISOC Fernando Gont fernando@gont.com.ar http://www.gont.com.ar Foro de Seguridad de LACNIC http://seguridad.lacnic.net