OLD VULNERABILITIES IN NEW PROTOCOLS? HEADACHES ABOUT IPV6 FRAGMENTS



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

IPv6 Security Best Practices. Eric Vyncke Distinguished System Engineer

Security implications of the Internet transition to IPv6

Vulnerabili3es and A7acks

Security Assessment of Neighbor Discovery for IPv6

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

Chapter 8 Security Pt 2

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

How to securely operate an IPv6 network

Chapter 9. IP Secure

CS5008: Internet Computing

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

Firewalls. Firewalls. Idea: separate local network from the Internet 2/24/15. Intranet DMZ. Trusted hosts and networks. Firewall.

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

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

Security of IPv6 and DNSSEC for penetration testers

INTRODUCTION TO FIREWALL SECURITY

Virtual private network. Network security protocols VPN VPN. Instead of a dedicated data link Packets securely sent over a shared network Internet VPN

IPv6 Security from point of view firewalls

Network Security. Chapter 3. Cornelius Diekmann. Version: October 21, Lehrstuhl für Netzarchitekturen und Netzdienste Institut für Informatik

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

We will give some overview of firewalls. Figure 1 explains the position of a firewall. Figure 1: A Firewall

Chapter 8 Network Security

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

Practical Security Assessment of IPv6 Networks and Devices. Fernando Gont

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

Post-Class Quiz: Telecommunication & Network Security Domain

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

APNIC elearning: Network Security Fundamentals. 20 March :30 pm Brisbane Time (GMT+10)

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

Session Hijacking Exploiting TCP, UDP and HTTP Sessions

Overview. Securing TCP/IP. Introduction to TCP/IP (cont d) Introduction to TCP/IP

IPV6 FRAGMENTATION. The Case For Deprecation. Ron Bonica NANOG58

What is a Firewall? A choke point of control and monitoring Interconnects networks with differing trust Imposes restrictions on network services

Introduction to IP v6

FIREWALLS & CBAC. philip.heimer@hh.se

CYBER ATTACKS EXPLAINED: PACKET CRAFTING

IPv6 Fundamentals: A Straightforward Approach

Introduction of Intrusion Detection Systems

Internet Protocol Version 6 (IPv6)

How To Set Up An Ip Firewall On Linux With Iptables (For Ubuntu) And Iptable (For Windows)

A S B

Network Security Fundamentals

20-CS X Network Security Spring, An Introduction To. Network Security. Week 1. January 7

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

FIREWALLS. Firewall: isolates organization s internal net from larger Internet, allowing some packets to pass, blocking others

Firewalls. Chapter 3

Security Technology White Paper

How will the Migration from IPv4 to IPv6 Impact Voice and Visual Communication?

Security vulnerabilities in the Internet and possible solutions

Solution of Exercise Sheet 5

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

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

IPv6 Hardening Guide for Windows Servers

VLAN und MPLS, Firewall und NAT,

IPv6 Advantages. Yanick Pouffary.

ITL BULLETIN FOR JANUARY 2011

IP address format: Dotted decimal notation:

APNIC elearning: IPSec Basics. Contact: esec03_v1.0

Outline. CSc 466/566. Computer Security. 18 : Network Security Introduction. Network Topology. Network Topology. Christian Collberg

Overview. Firewall Security. Perimeter Security Devices. Routers

A Very Incomplete Diagram of Network Attacks

Network Security TCP/IP Refresher

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

Firewalls. Ahmad Almulhem March 10, 2012

ProCurve Networking IPv6 The Next Generation of Networking

Protocol Security Where?

How To Compare Ipv6 And Ipv4 To Ipv5 (V1.2.0)

Firewalls. Test your Firewall knowledge. Test your Firewall knowledge (cont) (March 4, 2015)

Cryptography and network security

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

Content Distribution Networks (CDN)

Firewalls and Intrusion Detection

Firewall Introduction Several Types of Firewall. Cisco PIX Firewall

Overview of Network Security The need for network security Desirable security properties Common vulnerabilities Security policy designs

INLICHTINGEN DIENSTEN INLICHTINGEN DIENSTEN

IPv6 Security 111 Short Module on Security

Track 2 Workshop PacNOG 7 American Samoa. Firewalling and NAT

Network Security 2. Module 2 Configure Network Intrusion Detection and Prevention

IPv6 First Hop Security Protecting Your IPv6 Access Network

10 Configuring Packet Filtering and Routing Rules

Chapter 3. TCP/IP Networks. 3.1 Internet Protocol version 4 (IPv4)

Network Intrusion Detection Systems. Beyond packet filtering

Internet Firewall CSIS Packet Filtering. Internet Firewall. Examples. Spring 2011 CSIS net15 1. Routers can implement packet filtering

Firewalls N E T W O R K ( A N D D ATA ) S E C U R I T Y / P E D R O B R A N D Ã O M A N U E L E D U A R D O C O R R E I A

CS155 - Firewalls. Simon Cooper <sc@sgi.com> CS155 Firewalls 22 May 2003

Getting started with IPv6 on Linux

IPv6 Associated Protocols

IPv4 and IPv6 Integration. Formation IPv6 Workshop Location, Date

IPv6 Security Assessment and Benchmarking Abstract Test Suite

Cisco Configuring Commonly Used IP ACLs

12/8/2015. Review. Final Exam. Network Basics. Network Basics. Network Basics. Network Basics. 12/10/2015 Thursday 5:30~6:30pm Science S-3-028

CS 665: Computer System Security. Network Security. Usage environment. Sources of vulnerabilities. Information Assurance Module

Transcription:

OLD VULNERABILITIES IN NEW PROTOCOLS? HEADACHES ABOUT IPV6 FRAGMENTS Eric Vyncke (@evyncke) Cisco Session ID: ARCH W01 Session Classification: Advanced

Agenda Status of WorldWide IPv6 Deployment IPv6 refresher: extension headers and fragmentation Processing IPv6 extension headers Hacking with fragmentation and mitigation techniques

IPv6 is Here to Stay Sources: http://www.google.com/ipv6/statistics.html & http://vyncke.org/ipv6status and http://6lab.cisco.com

IPv6 Refresher

IPv6 in One Slide IPv6 is IPv4 with larger addresses 128 bits vs. 32 bits NAT no more needed => easier for applications Simpler hence more security Data-link layer unchanged: Ethernet, xdsl, Transport layer unchanged: UDP, TCP, Applications unchanged : HTTP, SSL, SMTP, IPv6 is not really BETTER than IPv4 because it is new IPv6 has been specified in 1995 IPsec is identical in IPv4 & IPv6 Only benefit is a much larger address space

IPv4 and IPv6 Header Comparison IPv4 Header IPv6 Header Version HL Type of Service Identification Time to Live Protocol Flags Total Length Fragment Offset Header Checksum Version Traffic Class Payload Length Flow Label Next Header Hop Limit Source Address Destination Address Source Address Options Padding Field s Name Kept from IPv4 to IPv6 Fields Not Kept in IPv6 Name and Position Changed in IPv6 New Field in IPv6 Destination Address

Extension Headers (RFC2460) Processed only by node identified in IPv6 Destination Address field => much lower overhead than IPv4 options exception: Hop-by-Hop Options header Eliminated IPv4 s 40-octet limit on options In IPv6, limit is total packet size, or Path MTU in some cases

Extension Headers Extension headers are daisy chained IPv6 Header Next Header = TCP TCP Header + Data IPv6 Header Next Header = Routing Routing Header Next Header = TCP TCP Header + Data IPv6 Header Next Header = Routing Routing Header Next Header = Destination Destination Header Next Header = TCP Fragment of TCP Header + Data

IPv6 Attacks with Strong IPv4 Similarities Application layer attacks Good news IPv4 IPS signatures can be re-used The majority of vulnerabilities on the Internet today are at the application layer, something that IPSec will do nothing to prevent Rogue devices Rogue devices will be as easy to insert into an IPv6 network as in IPv4 Man-in-the-Middle Attacks (MITM) Flooding Sniffing Without strong mutual authentication, any attacks utilizing MITM will have the same likelihood in IPv6 as in IPv4 Flooding attacks are identical between IPv4 and IPv6 IPv6 is no more or less likely to fall victim to a sniffing attack than IPv4

Processing IPv6 Extension Headers

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???

Fragment Header: IPv6 In IPv6 fragmentation is done only by the end system Tunnel end-points are end systems => Fragmentation / reassembly can happen inside the network Reassembly done by end system like in IPv4 Attackers can still fragment in intermediate system on purpose ==> a great obfuscation tool Next Header = 44 Fragment Header IPv6 Basic Header Fragment Header Fragment Header Next Header Reserved Identification Fragment Offset M Fragment Data

Atomic IPv6 Fragments See: RFC 6946 Def: fragment which is both the first (offset=0) and the last (M=0) Used when a link MTU on the path < 1280 per RFC 2460 (sect 5) Host caches this feature per destination when receiving ICMPv6 packet-too-big Can be forged by sending a spoofed ICMPv6 packettoo-big A trick must be used to ensure that the error message contains a copy of a valid packets But, several OS do not even check, so why bother? Mitigation: anti-spoofing

Fragmentation Used in IPv4 by Attackers... Also applicable to IPv6 of course Great evasion techniques Some firewalls do not process fragments except for the first one Some firewalls cannot detect overlapping fragments with different content IPv4 tools like whisker, fragrout, etc. Makes firewall and network intrusion detection harder Used mostly in DoSing hosts, but can be used for attacks that compromise the host Send a fragment to force states (buffers, timers) in OS See also: http://insecure.org/stf/secnet_ids/secnet_ids.html 1998!

Hacking with fragmentation

Playing Tricks with Fragments /1 Assuming stateful IPS (or even firewall) prefers the last fragment and host the first fragment... Data = ATTACK ID=n, OFF=10 Data = GOOD ID=n, OFF=10 Data = ATTACK ID=n, OFF=10 Data = GOOD ID=n, OFF=10 After re-assembly: GOOD After re-assembly: ATTACK

Playing Tricks with Fragments /2 Assuming stateful IPS/firewall prefers the first fragment... Data = GOOD ID=n, OFF=10, HL=2 Data = GOOD ID=n, OFF=10, HL=1 Data = ATTACK ID=n, OFF=10, HL=32 Data = ATTACK ID=n, OFF=10, HL=31 Data = ATTACK ID=n, OFF=10, HL=30

Parsing the Extension Header Chain Fragmentation Matters! Extension headers chain can be so large than it must be fragmented! RFC 3128 is not applicable to IPv6 Layer 4 information could be in 2 nd fragment IPv6 hdr HopByHop Routing Fragment1 Destination IPv6 hdr HopByHop Routing Fragment2 TCP Data Layer 4 header is in 2 nd fragment

Parsing the Extension Header Chain Fragments and Stateless Filters RFC 3128 is not applicable to IPv6 Layer 4 information could be in 2 nd fragment But, stateless firewalls could not find it if a previous extension header is fragmented IPv6 hdr HopByHop Routing Fragment1 Destination IPv6 hdr HopByHop Routing Fragment2 Destination TCP Data Layer 4 header is in 2 nd fragment, Stateless filters have no clue where to find it!

Overlapping Fragments Issues RFC 5722 Also in IPv4 Can hinder NIDS/firewall Can bypass stateless ACL, e.g. established sessions IPv6 hdr (block Frg TCP ID=n O=0 SYN) TCP DST=80, ACK Filler IPv6 hdr Frg ID=n O=12 SYN Attack At host: TCP DST=80, ACK SYN Filler Attack RFC 5722 => drop overlapping fragments FreeBSD, Ubuntu 11.10 and Windows 7 implement RFC 5722 hence no worries for them

IPv6 Fragmentation & ACL Fragment Keyword (vendor specific) This makes matching against the first fragment non-deterministic: layer 4 header might not be there but in a later fragment Need for stateful inspection fragment keyword matches Non-initial fragments (same as IPv4) undertermined-transport keyword does not match If non-initial fragment Or if TCP/UDP/SCTP and ports are in the fragment Or if ICMP and type and code are in the fragment Else Everything else matches (including OSPFv3, RSVP, GRE, EIGRP, PIM ) Only for deny ACE

Rogue Router Advertisement Router Advertisements contain: - Prefix to be used by hosts - Data-link layer address of the router - Miscellaneous options: MTU, DHCPv6 use, Last come, first used RA w/o Any Authentication Gives Exactly Same Level of Security as DHCPv4 (None) MITM DoS 1. RS 2. RA 2. RA 1. RS: Data = Query: please send RA 2. RA: Data= options, prefix, lifetime, A+M+O flags

RA Mitigating Rogue RA: RFC 6101 Multiple switches implement RFC 6101 by using stateless filtering of ICMP Router Advertisements RA ROUTER Device-role RA HOST Device-role RA RA

Parsing the Extension Header Chain Fragments and Stateless Filters (RA Guard) RA Guard works like a stateless ACL filtering ICMP type 134 THC fake_router6 FD implements this attack which bypasses RA Guard Partial work-around: block all fragments sent to ff02::1 If supported, deny undetermined-transport blocks this attack (work item at IETF) RFC 6980 IPv6 hdr HopByHop Routing Fragment1 Destination IPv6 hdr HopByHop Routing Fragment2 Destination ICMP type=134 ICMP header is in 2 nd fragment, RA Guard has no clue where to find it!

Predictable Fragment ID... RFC 2460 about ID field The Identification must be different than that of any other fragmented packet sent recently* with the same Source Address and Destination Address In IPv4, this was leveraged for blind scanning... Allows a remote host C to detect the TCP/UDP ports opened between A and B Either for anonymous scan of B Or is C can only reach A (DMZ) C See also draft-gont-6man-predictablefragment-id A B

Review of TCP 3-way Handshake Open Port Closed Port A B A B TCP SYN TCP SYN TCP SYN+ACK TCP RST TCP ACK A sends 2 packets A sends 1 packets

Blind Scanning Recipe C Open Port A B C Closed Port A B ICMP_ECHO_REQ ICMP_ECHO_REQ ICMP_ECHO_REP ID=1000 TCP SYN 1 L of TCP atomic SYN+ACK fragment ICMP_ECHO_REP ID=1000 1 spoon of 3-way 1 gr of spoofing C A lot of predictable fragment ID (to taste) TCP SYN TCP RST ICMP_ECHO_REQ ICMP_ECHO_REP ID=1002 TCP RST ID=1001 ICMP_ECHO_REQ ICMP_ECHO_REP ID=1001

Summary

KEY TAKE AWAY Fragmentation caused several issues in legacy IPv4 Denial of services at reassembly Obfuscation of attacks to evade IPS and firewall Security devices can handle those attacks for IPv4 and IPv6 New in IPv6: fragmented transport header Stateful firewall can handle this Stateless firewalls (ACL, RA-Guard) cannot handle this Undetermined-transport (or equivalent) is your best friend RFC 6980 should fix the RA-guard issue

APPLY Learn more about IPv6 and its security In short: 99% as IPv4 ;-) except for fragments Check your security devices on how they handle IPv6 extension headers and fragmentation Embrace IPv6, you cannot avoid it

QUESTIONS AND ANSWERS?

Thank you! Eric Vyncke Cisco @evyncke evyncke@cisco.com www.cisco.com