Operational security: firewalls and I D S

Một phần của tài liệu Chapter 8 v7 0 accessible (Trang 30 - 74)

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Authentication (1 of 2)

Goal: Bob wants Alice to “prove” her identity to him

Protocol ap1.0: Alice says “I am Alice”

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Authentication (2 of 2)

Goal: Bob wants Alice to “prove” her identity to him

Protocol ap1.0: Alice says “I am Alice”

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Authentication: Another Try (1 of 4)

Protocol ap2.0: Alice says “I am Alice” in an I P packet containing her source I P address

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Authentication: Another Try (2 of 4)

Protocol ap2.0: Alice says “I am Alice” in an I P packet containing her source I P address

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Authentication: Another Try (3 of 4)

Protocol ap3.0: Alice says “I am Alice” and sends her secret password to “prove” it.

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Authentication: Another Try (4 of 4)

Protocol ap3.0: Alice says “I am Alice” and sends her secret password to “prove” it.

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Authentication: Yet Another Try (1 of 3)

Protocol ap3.1: Alice says “I am Alice” and sends her encrypted secret password to “prove” it.

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Authentication: Yet Another Try (2 of 3)

Protocol ap3.1: Alice says “I am Alice” and sends her encrypted secret password to “prove” it.

record and playback still

works!

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Authentication: Yet Another Try (3 of 3)

Goal: avoid playback attack

nonce: number (R) used only once-in-a-lifetime

ap4.0: to prove Alice “live”, Bob sends Alice nonce, R. Alice must return R, encrypted with shared secret key

Failures, drawbacks?

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Authentication: ap5.0

ap4.0 requires shared symmetric key

• can we authenticate using public key techniques?

ap5.0: use nonce, public key cryptography Bob computes

and knows only Alice could have the private key, that encrypted R such that

 

+ -

A A

k k (R) = R

 

+ -

A A

k k (R) = R

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

ap5.0: Security Hole (1 of 2)

man (or woman) in the middle attack: Trudy poses as Alice (to Bob) and as Bob (to Alice)

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

ap5.0: Security Hole (2 of 2)

man (or woman) in the middle attack: Trudy poses as Alice (to Bob) and as Bob (to Alice)

difficult to detect:

• Bob receives everything that Alice sends, and vice versa.

(e.g., so Bob, Alice can meet one week later and recall conversation!)

• problem is that Trudy receives all messages as well!

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Learning Objectives (4 of 9)

8.1 What is network security?

8.2 Principles of cryptography

8.3 Message integrity, authentication 8.4 Securing e-mail

8.5 Securing T C P connections: S S L 8.6 Network layer security: IPsec

8.7 Securing wireless LANs

8.8 Operational security: firewalls and I D S

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Digital Signatures (1 of 3)

cryptographic technique analogous to hand- written signatures:

• sender (Bob) digitally signs document,

establishing he is document owner/creator.

verifiable, nonforgeable: recipient (Alice) can prove to someone that Bob, and no one else

(including Alice), must have signed document

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Digital Signatures (2 of 3)

simple digital signature for message m:

• Bob signs m by encrypting with his private key creating “signed”

message,

  ,

-

k mB -  

k mB

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Digital Signatures (3 of 3)

• suppose Alice receives msg m, with signature:

• Alice verifies m signed by Bob by applying Bob’s public key

whoever signed m must have used Bob’s private key.

• If

Alice thus verifies that:

• Bob signed m

• no one else signed m

• Bob signed m and not m’

 

B

m, K m

   

 

B

- -

B B m then che B

k to k cks K K m ( ) = m.

+ -  

B B m

k (k ) = m,

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Digital Signatures (4 of 4)

non-repudiation:

– Alice can take m, and

signature to court

prove that Bob signed and m

-  

k mB

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Message Digests

computationally expensive to public-key-encrypt long messages

goal: fixed-length, easy- to-compute digital

“fingerprint”

• apply hash function H to m, get fixed size

message digest,

Hash function properties:

• many-to-1

• produces fixed-size msg digest (fingerprint)

• given message digest x,

computationally infeasible to find m such that

H(m).

x = H(m)

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Internet Checksum: Poor Crypto Hash Function

Internet checksum has some properties of hash function:

• produces fixed length digest (16-bit sum) of message is many-to-one

But given message with given hash value, it is easy to find another message with same hash value:

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Digital Signature = Signed Message Digest

Bob sends digitally signed message:

Alice verifies signature, integrity of digitally signed message:

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Hash Function Algorithms

• MD5 hash function widely used (R F C 1321)

– computes 128-bit message digest in 4-step process.

– arbitrary 128-bit string x, appears difficult to construct msg m whose MD5 hash is equal to x

• S H A - 1 is also used

– U S standard [N I S T, F I P S P U B 180-1]

– 160-bit message digest

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Recall: ap5.0 Security Hole

man (or woman) in the middle attack: Trudy poses as Alice (to Bob) and as Bob (to Alice)

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Public-Key Certification

• motivation: Trudy plays pizza prank on Bob – Trudy creates e-mail order:

Dear Pizza Store, Please deliver to me four pepperoni pizzas. Thank you, Bob

– Trudy signs order with her private key – Trudy sends order to Pizza Store

– Trudy sends to Pizza Store her public key, but says it’s Bob’s public key

– Pizza Store verifies signature; then delivers four pepperoni pizzas to Bob

– Bob doesn’t even like pepperoni

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Certification Authorities (1 of 2)

certification authority (C A): binds public key to particular entity, E.

• E(person, router) registers its public key with C A.

– E provides “proof of identity” to C A.

– C A creates certificate binding E to its public key.

– certificate containing E’s public key digitally signed by C A – C A says “this is E’s public key”

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Certification Authorities (2 of 2)

• when Alice wants Bob’s public key:

– gets Bob’s certificate (Bob or elsewhere).

– apply CA’s public key to Bob’s certificate, get Bob’s public key

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Learning Objectives (5 of 9)

8.1 What is network security?

8.2 Principles of cryptography

8.3 Message integrity, authentication 8.4 Securing e-mail

8.5 Securing T C P connections: S S L 8.6 Network layer security: IPsec

8.7 Securing wireless LANs

8.8 Operational security: firewalls and I D S

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Secure E-Mail (1 of 4)

Alice wants to send confidential e-mail, m, to Bob.

Alice:

• generates random symmetric private key, KS

• encrypts message with KS (for efficiency)

• also encrypts KS with Bob’s public key

• sends both K mS   and K K to BobB( S)

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Secure E-Mail (2 of 4)

Alice wants to send confidential e-mail, m, to Bob.

Bob:

• uses his private key to decrypt and recover KS

• uses KS to decrypt K m to recover mS  

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Secure E-Mail (3 of 4)

Alice wants to provide sender authentication message integrity

• Alice digitally signs message

• sends both message (in the clear) and digital signature

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Secure E-Mail (4 of 4)

Alice wants to provide secrecy, sender authentication, message integrity.

Alice uses three keys: her private key, Bob’s public key, newly created symmetric key

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Learning Objectives (6 of 9)

8.1 What is network security?

8.2 Principles of cryptography

8.3 Message integrity, authentication 8.4 Securing e-mail

8.5 Securing T C P connections: S S L 8.6 Network layer security: IPsec

8.7 Securing wireless LANs

8.8 Operational security: firewalls and I D S

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

S S L: Secure Sockets Layer

• widely deployed security protocol

– supported by almost all browsers, web servers – https

– billions $/year over S S L

• mechanisms: [Woo 1994], implementation: Netscape

• variation -T L S: transport layer security, R F C 2246

• provides

confidentialityintegrity

authentication

• original goals:

– Web e-commerce transactions

– encryption (especially credit-card numbers) – Web-server

authentication – optional client

authentication

– minimum hassle in doing business with new merchant

• available to all T C P applications

– secure socket interface

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

S S L and T C P / I P

• S S L provides application programming interface (A P I) to applications

• C and Java S S L libraries/classes readily available

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Could Do Something Like P G P:

• but want to send byte streams & interactive data

• want set of secret keys for entire connection

• want certificate exchange as part of protocol:

handshake phase

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Toy S S L: A Simple Secure Channel

handshake: Alice and Bob use their certificates, private keys to authenticate each other and

exchange shared secret

key derivation: Alice and Bob use shared secret to derive set of keys

data transfer: data to be transferred is broken up into series of records

connection closure: special messages to securely close connection

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Toy: A Simple Handshake

M S: master secret

E M S: encrypted master secret

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Toy: Key Derivation

• considered bad to use same key for more than one cryptographic operation

– use different keys for message authentication code (M A C) and encryption

• four keys:

– Kc = encryption key for data sent from client to server – Mc = M A C key for data sent from client to server

– Ks = encryption key for data sent from server to client – Ms = M A C key for data sent from server to client

• keys derived from key derivation function (K D F)

– takes master secret and (possibly) some additional random data and creates the keys

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Toy: Data Records

• why not encrypt data in constant stream as we write it to T C P?

– where would we put the M A C? If at end, no message integrity until all data processed.

– e.g., with instant messaging, how can we do integrity check over all bytes sent before displaying?

• instead, break stream in series of records – each record carries a M A C

– receiver can act on each record as it arrives

• issue: in record, receiver needs to distinguish M A C from data – want to use variable-length records

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Toy: Sequence Numbers

problem: attacker can capture and replay record or re-order records

solution: put sequence number into M A C:

– note: no sequence number field

problem: attacker could replay all records

solution: use nonce

MAC = MAC M , sequence ( x || data)

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Toy: Control Information

problem: truncation attack:

– attacker forges T C P connection close segment – one or both sides thinks there is less data than

there actually is.

solution: record types, with one type for closure – type 0 for data; type 1 for closure

• MAC = MAC M , sequ ( x ence || type || data)

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Toy S S L: Summary

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Toy S S L Isn’T Complete

• how long are fields?

• which encryption protocols?

• want negotiation?

– allow client and server to support different encryption algorithms

– allow client and server to choose together specific algorithm before data transfer

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

S S L Cipher Suite

• cipher suite

– public-key algorithm – symmetric encryption

algorithm

– M A C algorithm

• S S L supports several cipher suites

• negotiation: client, server agree on cipher suite

– client offers choice – server picks one

• common S S L symmetric ciphers

– D E S – Data

Encryption Standard:

block

– 3D E S – Triple strength: block

– RC2 – Rivest Cipher 2: block

– RC4 – Rivest Cipher 4: stream

• S S L Public key encryption – R S A

Copyright © 2017, 2013, 2010 Pearson Education, Inc. All Rights Reserved

Real S S L: Handshake (1 of 4)

Purpose

Một phần của tài liệu Chapter 8 v7 0 accessible (Trang 30 - 74)

Tải bản đầy đủ (PPTX)

(134 trang)