Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... ·...

70
1 © 2003 Cisco Systems, Inc. All rights reserved. Session Number Presentation_ID 325_mbehring © 2001, Cisco Systems, Inc. All rights reserved. Securing a Core Network Manchester, 21 Sep 2004 Michael Behringer <[email protected]> Christian Panigl <[email protected]>

Transcript of Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... ·...

Page 1: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

1© 2003 Cisco Systems, Inc. All rights reserved.

Session NumberPresentation_ID325_mbehring © 2001, Cisco Systems, Inc. All r ights reserved.

Securing a Core Network

Manchester, 21 Sep 2004

Michael Behringer <[email protected]>

Christian Panigl <[email protected]>

Page 2: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

222© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 2

Attacks Against Routers

• Everyday attacksRouter compromise (0wn3d) due to weak password

TCP amplification/reflection attacks

Packet floods

Receive path saturation

• NewIP options

IPv6 attacks

“ Giga-Bots” : More than 1 Gbit/s attack traffic!

Core Security More Important than Ever!

Page 3: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

333© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 3

Securing a Core NetworkAgenda

0915 Overview on Securing a Core

securing a router, routing security, management security, ingress filtering (RFC2827)

1030 break

1100 Core hiding techniques

ISIS, private address space, MPLS

1130 Infrastructure ACLs

What it is, How to deploy, pros and cons

1200 Discussion

1230 end

Page 4: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

4© 2003 Cisco Systems, Inc. All rights reserved.

Session NumberPresentation_ID325_mbehring © 2001, Cisco Systems, Inc. All r ights reserved.

Overview on Securing a Core

Page 5: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

555© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 5

Core Security Overview

1. Basic Security

AAA, SSH, SNMPv3, rACL, CoPP, etc…

2. Don’t let packets into (!) the core

� No way to attack core, except through routing, thus:

3. Secure the routing protocol

Neighbor authentication, maximum routes, route filters, dampening, GTSM, …

4. Design for transit traffic

Correct Core Design (Capacity / QoS)

Bogon filters (RFCs 2827, 3330, 3704)

Choose correct router for bandwidth

5. Operate Securely

Still “ open” : routingprotocol

Only attack vector: Transit traffic

Now only insider attacks possible

Avoid insider attacks

Individual router security

Page 6: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

666© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 6

Router Security Basics

• AAA: Central admin control, logging, etc.

• SSH instead of Telnet

• SNMPv3 for managment

… plus many security best practices

Page 7: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

777© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 7

Receive ACLs

i/f

IN

OUT

Line Card i/f

IN

OUT

Switch

RP

[no] ip receive access-list <num>

Packets to the routerPackets through the router

Receive-ACLReceive-ACL

Special adjacency for router’s own addresses (punt)

Gobal config

Page 8: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

888© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 8

Receive ACL: Features

• Single ACL, for all interfaces

• Only checks traffic to the router (receive traffic)

• Does not affect transit traffic

• In short: permit traffic that needs to get to the router (routing, NTP, SSH, …)

deny the rest

Page 9: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

999© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 9

Control Plane Protection (CoPP)

• More powerful than rACLs

• In addition to permit / deny allows rate limits to control plane

• Will be on all platforms

• Will eventually replace rACLs

Page 10: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

101010© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 10

Core Security Overview

1. Basic Security

AAA, SSH, SNMPv3, rACL, CoPP, etc…

2. Don’t let packets into (!) the core

� No way to attack core, except through routing, thus:

3. Secure the routing protocol

Neighbor authentication, maximum routes, dampening, GTSM, …

4. Design for transit traffic

Correct Core Design

Capacity / QoS

Choose correct router for bandwidth

5. Operate Securely

Still “ open” : routingprotocol

Only attack vector: Transit traffic

Now only insider attacks possible

Avoid insider attacks

Individual router security

Page 11: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

111111© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 11

Infrastructure ACLs

• See second part of this presentation

• (left separate for discussion)

Page 12: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

121212© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 12

Core Security Overview

1. Basic Security

AAA, SSH, SNMPv3, rACL, CoPP, etc…

2. Don’t let packets into (!) the core

� No way to attack core, except through routing, thus:

3. Secure the routing protocol

Neighbor authentication, maximum routes, dampening, GTSM, …

4. Design for transit traffic

Correct Core Design

Capacity / QoS

Choose correct router for bandwidth

5. Operate Securely

Still “ open” : routingprotocol

Only attack vector: Transit traffic

Now only insider attacks possible

Avoid insider attacks

Individual router security

Page 13: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

131313© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 13

Routing Security: Verify the Peer

• All routing protocols permit MD5 checks

• Some with key chains for smooth key roll-over

• Allows to identify the peer

• Does not protect against DoS!

Page 14: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

141414© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 14

Peer Authentication

• RFC1321 describes MD5.http://www.ietf.org/rfc/rfc1321.txt

• draft-ietf-idr-md5-keys provides suggestions for building MD5 keys.

http://www.ietf.org/internet-drafts/draft-ietf-idr-md5-keys-00.txt

• RFC2385 describes using MD5 with BGP.http://www.ietf.org/rfc/rfc2385.txt

Page 15: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

151515© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 15

Routing Security: Verify the Prefixes

• Prefix filters: deny bogons, RFC1918, your own space.

http://www.cymru.com/Bogons/

Or: Permit only IRR “ known” prefixes (more secure, but more work)

• Filter on Prefix LengthDo not accept longer than /24 for example

Page 16: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

161616© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 16

Routing Security: Verify the AS

• Filter on:

AS of origin

AS path (with regular expressions)

• Filter as tight as possible

Page 17: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

171717© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 17

10.1.1.0/24

10.1.1.0/24AS Path: 65502, 65503

Enforce First AS

• Prevents a BGP peer from advertising a route as if it is sourced from another autonomous system.

• Use this with all of your peers!

• CSCea00782 turns enforce-first-as on permanently.

AS65500

AS65501

router bgp 65000bgp enforce-first-as

denied!

Page 18: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

181818© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 18

BGP Damping

Reuse limit

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

0

1000

2000

3000

4000

Time

Penalty

Suppress limit

NetworkAnnounced

NetworkRe-announced

NetworkNot Announced

Penalty

Page 19: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

191919© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 19

BGP Damping

• If prefix flaps, increase “ penalty” counter

• If “ penalty” > suppress_limit: Dampen prefix

• Continuously decrement “ penalty”

• When “ penalty” < re-use_limit: Re-use prefix

See RFC 2439

Page 20: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

202020© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 20

BGP Damping Configuration

Fixed dampingrouter bgp 100

bgp dampening [<half-life> <reuse-value> <suppress-penalty> <maximum suppress time>]

Selective and variable dampingbgp dampening [route-map <name>]

Recommendations for ISPs

http://www.ripe.net/docs/ripe-229.html

Page 21: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

212121© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 21

Generalized TTL Security Mechanism(GTSM) from 12.0(27)S, 12.3(7)T

• Define IP hops to BGP peer (typical: 1)

• Check TTL on inbound BGP packets:

• If TTL < 255 - max_hops

• then drop BGP packeteBGP

Transmits allpackets with a

TTL of 255Doesn’t acceptpackets with a TTL lower than 254

A

Packets generated here cannot reach

A with a TTL higher than 253.

See RFC 3682

Page 22: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

222222© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 22

Maximum Prefix Number

• Define a maximum prefix number per peer:

neighbor 192.0.2.2 maximum-prefix 100 80 restart 2

• To avoid being overrun with too many prefixes (memory issues)

• Keyword “ warning-only” to not reset the session

max prefixes warning at ..%

retry after 2 min

Page 23: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

232323© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 23

Routing Security: Overview

Generalised TTL Security Mech.to block remote exploits

BGP dampingto prevent effect of flapping

AS path filterto check AS path

enforce-first-ASto check first AS

prefix filter liststo filter out too long prefixes

prefix filter liststo define/filter prefixes

maximum-prefixto limit the number of prefixes

MD5 authenticationto verify the peer

Recommendation: Configure ALL checks!

Page 24: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

242424© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 24

Open Attack Vectors

• Only one possible attack:

DoS: spoofed source, to BGP peer

Cannot fake/intrude, but might DoS BGP session

• How easy is this?

Page 25: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

252525© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 25

Attacking IXP Peerings

• IXP address spaces are known (IRR)

• � Easy to spoof BGP packets

• Can I get there?

• Not if: ISP 1 does anti-spoofing

• Not if: IXP address space not routed(and nobody defaults to either ISP, or ISPs don’t default to IXP)

src: x; dst: y; TCP 179ISP1 ISP2

IXP

x y

Page 26: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

262626© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 26

Core Security Overview

1. Basic Security

AAA, SSH, SNMPv3, rACL, CoPP, etc…

2. Don’t let packets into (!) the core

� No way to attack core, except through routing, thus:

3. Secure the routing protocol

Neighbor authentication, maximum routes, dampening, GTSM, …

4. Design for transit traffic

Correct Core Design

Capacity / QoS

Choose correct router for bandwidth

5. Operate Securely

Still “ open” : routingprotocol

Only attack vector: Transit traffic

Now only insider attacks possible

Avoid insider attacks

Individual router security

Page 27: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

272727© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 27

Latest Info on Address Ranges: Cymru

• www.cymru.com

• Lists of bogons, unused address space, etc.

• Use for ingress filters

• Regularly check for updates!!

Page 28: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

282828© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 28

Transit ACLs

• Normally: ISP Networks “ permit ip any any” for transit

• “ Transparency”

• Under extreme stress (worms, DoS):ISP apply temporary ACLs to filter attack/worm traffic

• Note: TEMPORARY

• Routers must support this

Discussion!

Page 29: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

292929© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 29

Re-Colouring at Edge

• Precedence 6&7: Reserved for routing

• No transit traffic should use prec 6 or 7Problem with QoS on the core

Problem with routing protocols (same priority)

Routers look first at prec 6&7 traffic!!

� This can be a security risk

• Re-colour at edge!! (CAR)

• Depends on ingress line card / router

Discussion!

Page 30: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

303030© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 30

Three Golden Core Stability Rules

The Core must:

1. be 100% stable

2. not be attackable

3. sustain DoS attacks across it

Old network planning:

“ normal” traffic + X

New network planning:

Ingress link full with 40 byte packets

Plan for DoS attacks to happen!!

Page 31: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

313131© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 31

Network Bandwidth Planning

• Assume: uplink completely loaded, 40 byte packets.

• Plan with this number: Can you handleACLs, NetFlow, CAR, other features?

• Example: 1 GE uplink to an IXP1 Gbit/s / 8 bit/byte / 64 byte/packet ≈ 2 Mpps

• Can your ingress router handle that?

• Can your network?

• Can your sink-hole?

• What about floods on several ingress ports?

Page 32: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

323232© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 32

Bandwidth Planning: Assume DoS

Target

OtherISPs

1 Gbps = 2 Mpps

1 Mbps = 2 kpps

622 Mbps = 2 Mpps

1 Mbps = 2 kpps

1 Mbps = 2 kpps

Can you handle incoming pps rate here?

Can your core transport x times max incoming rate?

Can your sink hole take in x times max incoming rate?

If not, deploy several sink holes, close to ingress

If not, you must filter ingress to reduce DoS traffic

If not, upgrade! (As a minimum, you must be able to put ACLs at line rate)

Can your aggregation boxes ?

If not, you must filter ingress to reduce DoS traffic

Page 33: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

333333© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 33

Sink Holes and Backscatter Analysis

• Sink hole router: Statically announce unused address space (1/8, 2/8, 5/8, …) (see http://www.iana.org/assignments/ipv4-address-space)

• Note: Hackers know this trick: Use also unused space from your own ranges!!!

• Or, use default (if running full routing)

• Victim replies to random destinations

• -> Some backscatter goes to sink hole router, where it can be analysed

Page 34: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

343434© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 34

Backscatter Analysis

Target

IngressRouters

OtherISPs

random sources

random sources

Sink hole Router

random destinations

Page 35: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

353535© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 35

Re-Directing Traffic from the Victim

Target

IngressRouters

OtherISPs

Sink hole Router: Announces route “ target/32”

-Keeps line to customer clear-But cuts target host off completely-Discuss with customer!!!

Page 36: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

363636© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 36

Core Security Overview

1. Basic Security

AAA, SSH, SNMPv3, rACL, CoPP, etc…

2. Don’t let packets into (!) the core

� No way to attack core, except through routing, thus:

3. Secure the routing protocol

Neighbor authentication, maximum routes, dampening, GTSM, …

4. Design for transit traffic

Correct Core Design

Capacity / QoS

Choose correct router for bandwidth

5. Operate Securely

Still “ open” : routingprotocol

Only attack vector: Transit traffic

Now only insider attacks possible

Avoid insider attacks

Individual router security

Page 37: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

373737© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 37

Operational Security

• Strict Permission ControlWho is allowed what

• Log every command, Sanity checksDual control: Network engineers have no access to log files

• Regular config checksSpecifically after re-boots

Page 38: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

383838© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 38

Links

Lots of useful information at http://www.cymru.com/, specifically:

• http://www.cymru.com/Documents/secure-ios-template.html

• http://www.cymru.com/gillsr/documents/junos-template.pdf

• http://www.cymru.com/Documents/secure-bgp-template.html

• http://www.cymru.com/gillsr/documents/junos-bgp-template.pdf

ISP Essentials:

Cisco Press book, by Barry Green and Philip Smith.

• ftp://ftp-eng.cisco.com/cons/isp/security

Page 39: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

39© 2003 Cisco Systems, Inc. All rights reserved.

Session NumberPresentation_ID325_mbehring © 2001, Cisco Systems, Inc. All r ights reserved.

Core Hiding Techniques

Page 40: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

404040© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 40

The Old World

• Core routers individually secured

• Every router accessible from outside

“ outside” “ outside”

core

telnet snmp

mbehring

Page 41: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

414141© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 41

The New World

• Core routers individually secured PLUS

• Infrastructure protection

• Routers generally NOT accessible from outside

“ outside” “ outside”

core

telnet snmp

mbehring

Page 42: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

424242© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 42

Goal of this Presentation

• Some core security techniques have an impact on the global Internet

• Currently there is no commonly agreed “ best current practice”

• Open discussion of pros and cons

Page 43: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

434343© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 43

Core Hiding Techniques

• Private Address Space

• Non-IP Control Plane

ISIS

• MPLS

Page 44: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

444444© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 44

Private Address Space (RFC1918)

• All core interfaces get RFC1918 addresses

• All traffic from/to RFC1918 addresses blocked at ingress (implicit protection of core) => core interface addresses unreachable from outside core

• Blocking of traffic to edge interfaces (peering/upstream/customers) with non-private IP addresses still needs explicit ACL

• Troubleshooting (ping/traceroute) harder or even impossible from/to core devices

• Traceroute through core work but doesn’t resolve IP addresses externally

Page 45: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

454545© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 45

Non-IP Control Plane (CLNS/ISIS)

• Use of nonIP addresses & routing protocol for whole core

• Only loopback interface gets (possibly private) IP address

• Doesn’t even need any filtering to block traffic to core interfaces

• Blocking of traffic to edge interfaces (peering/upstream/customers) with IP addresses still needs explicit ACLs

• Troubleshooting (ping/traceroute) harder or even impossible directly from/to core devices

More Work Needed

Page 46: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

464646© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 46

Visible Address Space

Hiding of the MPLS Core Structure

• VRF contains MPLS IPv4 addresses

• Only peering Interface (on PE) exposed (-> CE)! -> ACL or unnumbered

PE

MPLS core

IP(PE; l0)P

CE2IP(CE2) IP(PE; fa1)

VRF CE2

CE1IP(CE1) IP(PE; fa0)

VRF CE1

P

P P

Page 47: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

474747© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 47

MPLS Core HidingAddress Planes: True Separation!

core address space0.0.0.0 – 255.255.255.255

VPN2 address space0.0.0.0 – 255.255.255.255

VPN1 address space0.0.0.0 – 255.255.255.255

CE

PE

CE

CE

CE

mbehring

PEP

PE-CE interfaces

belong to VPN.Only attack

point!!control plane

several data planes

Page 48: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

48© 2003 Cisco Systems, Inc. All rights reserved.

Session NumberPresentation_ID325_mbehring © 2001, Cisco Systems, Inc. All r ights reserved.

Infrastructure ACLs

Page 49: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

494949© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 49

Securing the Core: Infrastructure ACLs

• On “ PE” : “ deny ip any <core address space>”

some exceptions, e.g. routing protocol from host to host

• Idea: No traffic to core � you can’t attack

• Prevents intrusions 100%

• DoS: Very hard, only with transit traffic

“ outside” “ outside”coreprovider edge

Note: “ PE” and “ CE” are meant here as generic terms, not necessarily in the context of MPLS.

Page 50: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

“ Any packet directed towards your core network should be discarded – unless you are sure it is safe.”

Page 51: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

515151© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 51

Securing the Core: Infrastructure ACLs

• On PE: “ deny ip any <core address space>”

Exception: Routing protocol from host to host

• Idea: No traffic to core � you can’t attack

• Prevents intrusions 100%

• DoS: Very hard, but traffic over router theoretically enables DoS.

CPE PE

Page 52: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

525252© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 52

Securing the Core: Infrastructure ACLs

• Example:

deny ip any 1.1.1.0 0.0.0.255

permit ip any any

• Caution: This also blocks packets to the CE’s!

Alternatives: List all PE i/f in ACL, or use secondary i/f on CE

CE PE

CE PE

PE

PE

CE

CE

1.1.1.0/30

1.1.1.4/30

1.1.1.8/30

1.1.1.12/30.1

.1

.1

.1.2

.2

.2

.2

Page 53: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

535353© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 53

Where to Apply Infrastructure ACLs?

• To all ISP peers, downstream, upstream, peers:

On peering points on IXPs

On private peering points

• Towards customers

To all “ untrusted” networks, where attacks might enter the ISP core

Page 54: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

545454© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 54

Deployment

• Develop list of required protocols that are sourced from outside your AS and access core routers

Example: eBGP peering, GRE, IPSec, etc.

Use classification ACL as required

• Identify core address block(s)This is the protected address space

Summarization is critical � simpler and shorter ACLs

Page 55: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

555555© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 55

Deployment

• Infrastructure ACL will permit only required protocols and deny ALL others to infrastructure space

• ACL should also provide anti-spoof filteringDeny your space from external sources

Deny RFC1918 space

Deny multicast sources addresses (224/4)

RFC3330 defines special use IPv4 addressing

Page 56: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

565656© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 56

Infrastructure ACLs

• Infrastructure ACL must permit transit trafficTraffic passing through routers must be allowed via

permit ip any any

• ACL is applied inbound on ingress interfaces

• Fragments destined to the core can be filtered via fragments keywordFragments pose a security risk: by default they are

not filtered by ACLs

Fragments are likely not needed

access-list 101 deny/permit … fragments

Page 57: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

575757© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 57

PR1 PR2

R1

CR1R4

R2

R3

R5

SRC: 127.0.0.1DST: any

SRC: validDST: Rx (any R)

SRC: eBGP peerDST: CR1 eBGP

SRC: validDST: external to AS (e.g. customer)

CR2ACL “ in” ACL “ in”

ACL “ in”ACL “ in”

Infrastructure ACL in Action

Page 58: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

585858© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 58

Step 1 –Which IP Protocols are Required?

• TCP – BGP, SSH, Telnet

• UDP – SNMP, NTP

• OSPF, EIGRP

• GRE

• ICMP to/from core routersICMP unreachables / TTL expired for traceroute

Do you require other ICMP? (e.g. ping)

Caution: ICMP can be used for DoS

• Caution: Only flows from “ outside” your core

Page 59: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

595959© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 59

Step 1 – Classification ACL

• Example:permit tcp any core_CIDR_block

permit gre any core_CIDR_block

permit esp any core_CIDR_block

permit ip any any

• Classification ACLs affect data plane trafficALL ACLs have IMPLICIT deny

Classification ACL must have permit any any to allow normal traffic to flow

Page 60: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

606060© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 60

Step 2 – Begin to filter

• Permit protocols identified in step 1 to infrastructure only address blocks

• Deny all other to addresses blocksWatch ACE counters

Log keyword can help identify protocols that have been denied but are needed

• Last line: permit ip any any � permit transit traffic

• The ACL now provides basic protection and can be used to ensure that the correct suite of protocols has been permitted

Page 61: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

616161© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 61

Steps 3 and 4 – Restrict Source Addresses

• ACL is providing basic protection

• Required protocols permitted, all other denied

• Identify source addresses and permit only those sources for requires protocols

e.g. external BGP peers, tunnel end points

• Increase security: deploy destination address filters if possible

Page 62: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

626262© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 62

Example: Infrastructure ACL

! Deny our internal space as a source of external packets

access-list 101 deny ip our_CIDR_block any

! Deny src addresses of 0.0.0.0 and 127/8access-list 101 deny ip host 0.0.0.0 any

access-list 101 deny ip 127.0.0.0 0.255.255.255 any

! Deny RFC1918 space from entering ASaccess-list 101 deny ip 10.0.0.0 0.255.255.255 any

access-list 101 deny ip 172.16.0.0 0.0.15.255 any

access-list 101 deny ip 192.168.0.0 0.0.255.255 any

Page 63: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

636363© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 63

Example: Infrastructure ACL

! The only protocol that require infrastructure access is eBGP. Define both src and dst addresses

access-list 101 permit tcp host peerA host peerB eq 179

access-list 101 permit tcp host peerA eq 179 host peerB

! Deny all other access to infrastructure

access-list 101 deny ip any core_CIDR_block

! Permit all data plane traffic

access-list 101 permit ip any any

Page 64: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

646464© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 64

Reachability of CPE

• Not always possible to block the subnet between PE and CPE:

If CPE is a PAT device

If customer wants to ping CPE-CPE(although, could ping/trace from/to loopbacks, but requires enable mode for extended trace/ping)

CPE “ PE”

Page 65: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

656565© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 65

Warning

• Infrastructure ACLs are NOT a replacement for general network security

�Mistakes can happen

�“ Defence in Depth” : Several layers of security

Secure routers, routing, management traffic as before!

Page 66: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

666666© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 66

rACL versus iACL

• iACL: Protection of the whole core

• rACL: Protection of a single router

• Edge routers should have BOTH rACLand iACL configured

Page 67: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

676767© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 67

Infrastructure ACLs: Pros

Security against:

1. Operational mistakes (mis-configuration)

2. Bugs on the router (vulnerabilities)

• generally speaking, another layer of security around the core

Page 68: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

686868© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 68

Infrastructure ACLs: Cons

1. Breaks transparency: Access from the outside through pings, traceroute into the core does not work. (Note: traceroute across n/w works!)

2. As a consequence, makes troubleshooting harder: from the outside, and from the core (traceroute from core routers to outside)

3. hard to deploy if core address space is not contiguous, or not easily expressed in an ACL

4. hardware does not support line speed ACLs on all platforms

5. hard to maintain (when core address space changes)

Page 69: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

69© 2003 Cisco Systems, Inc. All rights reserved.

Session NumberPresentation_ID325_mbehring © 2001, Cisco Systems, Inc. All r ights reserved.

Discussion

Infrastructure ACLs: Bug or Feature?

Core Hiding: The right way forward?

Page 70: Securing a Core Network - RIPEmeetings.ripe.net/ripe-49/presentations/ripe49-eof-security... · Securing a Core Network Agenda 0915 Overview on Securing a Core securing a router,

707070© 2003 Cisco Systems, Inc. All rights reserved.Presentation_ID 70

ISP Essentials

• The “ bible” for Core Security

• Available as book, and on FTP:ftp://ftp-eng.cisco.com/cons/isp/security

• How to secure the coreSecurity for devices, routing, traffic, management, …