network security mechanisms

34
Lecture 11 Page 1 CS 236 Online Network Security Mechanisms • Again, the usual suspects - –Encryption –Authentication –Access control –Data integrity mechanisms –Traffic control

Upload: justin-clark

Post on 04-Jan-2016

47 views

Category:

Documents


0 download

DESCRIPTION

Network Security Mechanisms. Again, the usual suspects - Encryption Authentication Access control Data integrity mechanisms Traffic control. Encryption for Network Security. Relies on the kinds of encryption algorithms and protocols discussed previously - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Network Security Mechanisms

Lecture 11Page 1CS 236 Online

Network Security Mechanisms

• Again, the usual suspects -

– Encryption

– Authentication

– Access control

– Data integrity mechanisms

– Traffic control

Page 2: Network Security Mechanisms

Lecture 11Page 2CS 236 Online

Encryption for Network Security

• Relies on the kinds of encryption algorithms and protocols discussed previously

• Can be applied at different places in the network stack

• With different effects and costs

Page 3: Network Security Mechanisms

Lecture 11Page 3CS 236 Online

Link Level EncryptionSource Destination

plaintext

Let’s say we want to send a message using encryption

ciphertext ciphertextplaintextciphertext ciphertextplaintextciphertext ciphertextplaintextciphertext ciphertextplaintext

Different keys (maybe even different ciphers) used at each hop

Page 4: Network Security Mechanisms

Lecture 11Page 4CS 236 Online

End-to-End EncryptionSource Destination

plaintextciphertext ciphertext ciphertext ciphertext ciphertextplaintext

Cryptography only at the end points

Only the end points see the plaintext

Normal way network cryptography done

When would link encryption be better?

Page 5: Network Security Mechanisms

Lecture 11Page 5CS 236 Online

IPSec

• Standard for applying cryptography at the network layer of IP stack

• Provides various options for encrypting and authenticating packets– On end-to-end basis– Without concern for transport layer

(or higher)

Page 6: Network Security Mechanisms

Lecture 11Page 6CS 236 Online

What IPSec Covers

• Message integrity

• Message authentication

• Message confidentiality

Page 7: Network Security Mechanisms

Lecture 11Page 7CS 236 Online

What Isn’t Covered

• Non-repudiation• Digital signatures• Key distribution• Traffic analysis• Handling of security associations• Some of these covered in related

standards

Page 8: Network Security Mechanisms

Lecture 11Page 8CS 236 Online

Some Important Terms for IPsec• Security Association - “A Security

Association (SA) is a simplex "connection" that affords security services to the traffic carried by it. – Basically, a secure one-way channel

• SPI (Security Parameters Index) – Combined with destination IP address and IPsec protocol type, uniquely identifies an SA

Page 9: Network Security Mechanisms

Lecture 11Page 9CS 236 Online

General Structure of IPsec• Really designed for end-to-end encryption

– Though could do link level• Designed to operate with either IPv4 or IPv6• Meant to operate with a variety of different

encryption protocols• And to be neutral to key distribution methods• Has sub-protocols

– E.g., Encapsulating Security Payload

Page 10: Network Security Mechanisms

Lecture 11Page 10CS 236 Online

Encapsulating Security Payload (ESP) Protocol

• Encrypt the data and place it within the ESP

• The ESP has normal IP headers

• Can be used to encrypt just the payload of the packet

• Or the entire IP packet

Page 11: Network Security Mechanisms

Lecture 11Page 11CS 236 Online

ESP Modes• Transport mode

– Encrypt just the transport-level data in the original packet

– No IP headers encrypted• Tunnel mode

– Original IP datagram is encrypted and placed in ESP

– Unencrypted headers wrapped around ESP

Page 12: Network Security Mechanisms

Lecture 11Page 12CS 236 Online

ESP in Transport Mode

• Extract the transport-layer frame

– E.g., TCP, UDP, etc.

• Encapsulate it in an ESP

• Encrypt it

• The encrypted data is now the last payload of a cleartext IP datagram

Page 13: Network Security Mechanisms

Lecture 11Page 13CS 236 Online

ESP Transport Mode

Original IP header

ESPHdr

Normal Packet Payload

ESPTrlr

ESPAuth

Encrypted

Authenticated

Page 14: Network Security Mechanisms

Lecture 11Page 14CS 236 Online

Using ESP in Tunnel Mode

• Encrypt the IP datagram – The entire datagram

• Encapsulate it in a cleartext IP datagram

• Routers not understanding IPsec can still handle it

• Receiver reverses the process

Page 15: Network Security Mechanisms

Lecture 11Page 15CS 236 Online

ESP Tunnel Mode

New IP hdr

ESPHdr

OriginalPacket Payload

ESPTrlr

ESPAuth

Orig. IP hdr

Encrypted

Authenticated

Page 16: Network Security Mechanisms

Lecture 11Page 16CS 236 Online

Uses and Implications of Tunnel Mode

• Typically used when there are security gateways between sender and receiver– And/or sender and receiver don’t speak

IPsec• Outer header shows security gateway

identities– Not identities of real parties

• Can thus be used to hide some traffic patterns

Page 17: Network Security Mechanisms

Lecture 11Page 17CS 236 Online

What IPsec Requires

• Protocol standards– To allow messages to move securely

between nodes• Supporting mechanisms at hosts running

IPsec– E.g., a Security Association Database

• Lots of plug-in stuff to do the cryptographic heavy lifting

Page 18: Network Security Mechanisms

Lecture 11Page 18CS 236 Online

The Protocol Components

• Pretty simple• Necessary to interoperate with non-IPsec

equipment• So everything important is inside an

individual IP packet’s payload• No inter-message components to protocol

– Though some security modes enforce inter-message invariants

Page 19: Network Security Mechanisms

Lecture 11Page 19CS 236 Online

The Supporting Mechanisms

• Methods of defining security associations

• Databases for keeping track of what’s going on with other IPsec nodes

– To know what processing to apply to outgoing packets

– To know what processing to apply to incoming packets

Page 20: Network Security Mechanisms

Lecture 11Page 20CS 236 Online

Plug-In Mechanisms

• Designed for high degree of generality

• So easy to plug in:

– Different crypto algorithms

– Different hashing/signature schemes

– Different key management mechanisms

Page 21: Network Security Mechanisms

Lecture 11Page 21CS 236 Online

Status of IPsec

• Accepted Internet standard• Widely implemented and used

– Supported in Windows 2000, XP, and Vista– In Linux 2.6 kernel

• The architecture doesn’t require everyone to use it• RFC 3602 on using AES in IPsec still listed as

“proposed”• Expected that AES will become default for ESP in

IPsec

Page 22: Network Security Mechanisms

Lecture 11Page 22CS 236 Online

Traffic Control Mechanisms

• Filtering

– Source address filtering

– Other forms of filtering

• Rate limits

• Protection against traffic analysis

– Padding

– Routing control

Page 23: Network Security Mechanisms

Lecture 11Page 23CS 236 Online

Source Address Filtering

• Filtering out some packets because of their source address value

– Usually because you believe their source address is spoofed

• Often called ingress filtering

– Or egress filtering . . .

Page 24: Network Security Mechanisms

Lecture 11Page 24CS 236 Online

Source Address Filtering for Address Assurance

• Router “knows” what network it sits in front of– In particular, knows IP addresses of

machines there• Filter outgoing packets with source

addresses not in that range• Prevents your users from spoofing other

nodes’ addresses– But not from spoofing each other’s

Page 25: Network Security Mechanisms

Lecture 11Page 25CS 236 Online

Source Address Filtering Example

128.171.192.*

95.113.27.12 56.29.138.2

My network shouldn’t be creating packets with this

source addressSo drop the packet

Page 26: Network Security Mechanisms

Lecture 11Page 26CS 236 Online

Source Address Filtering in the Other Direction

• Often called egress filtering– Or ingress filtering . . .

• Occurs as packets leave the Internet and enter a border router– On way to that router’s network

• What addresses shouldn’t be coming into your local network?

Page 27: Network Security Mechanisms

Lecture 11Page 27CS 236 Online

Filtering Incoming Packets

128.171.192.*

128.171.192.5 128.171.192.7

Packets with this source address should be going out,

not coming inSo drop the packet

Page 28: Network Security Mechanisms

Lecture 11Page 28CS 236 Online

Other Forms of Filtering

• One can filter on things other than source address– Such as worm signatures, unknown protocol

identifiers, etc.• Also, there are unallocated IP addresses in IPv4

space– Can filter for packets going to or coming from

those addresses• Also, certain source addresses are for local use

only– Internet routers can drop packets to/from them

Page 29: Network Security Mechanisms

Lecture 11Page 29CS 236 Online

Rate Limits

• Many routers can place limits on the traffic they send to a destination

• Ensuring that the destination isn’t overloaded– Popular for denial of service defenses

• Limits can be defined somewhat flexibly• But often not enough flexibility to let the

good traffic through and stop the bad

Page 30: Network Security Mechanisms

Lecture 11Page 30CS 236 Online

Padding

• Sometimes you don’t want intruders to know what your traffic characteristics are

• Padding adds extra traffic to hide the real stuff

• Fake traffic must look like real traffic– Usually means encrypt it all

• Must be done carefully, or clever attackers can tell the good stuff from the noise

Page 31: Network Security Mechanisms

Lecture 11Page 31CS 236 Online

Routing Control

• Use ability to control message routing to conceal the traffic in the network

• Used in onion routing to hide who is sending traffic to whom– For anonymization purposes

• Routing control also used in some network defense– To hide real location of a machine– E.g., SOS DDoS defense system

Page 32: Network Security Mechanisms

Lecture 11Page 32CS 236 Online

Onion Routing

• Meant to hide source and destination of traffic

• Encrypt real packet

• Wrap it in another packet

– With intermediate receiver

– Who actively participates

• Generally, do it multiple times

Page 33: Network Security Mechanisms

Lecture 11Page 33CS 236 Online

The Effect of Onion Routing

• Lots of packets with encrypted payloads flow around

• At each step, one layer of encryption peeled off

• None of the intermediate routers are sure when real delivery occurs

– Last layer also encrypted

Page 34: Network Security Mechanisms

Lecture 11Page 34CS 236 Online

Costs of Onion Routing

• Multiple encryptions per packet

• Packet travels further

• Decryption done at app level

– So multiple trips up and down the network stack

• Unless carefully done, observers can deduce who’s sending to whom