do’s and don’ts of client authentication on the web

75
11/18/2003 University of South Carolina 1 Do’s and Don’ts of Client Authentication on the Web Kevin Fu, Emil Sit, Kendra Smith, Nick Feamster MIT Laboratory for Computer Science http://cookies.lcs.mit.edu Presenters: Vaibhav Gowadia Cory Calmbacher

Upload: catrin

Post on 18-Mar-2016

35 views

Category:

Documents


0 download

DESCRIPTION

Do’s and Don’ts of Client Authentication on the Web. Kevin Fu, Emil Sit, Kendra Smith, Nick Feamster. MIT Laboratory for Computer Science. http://cookies.lcs.mit.edu. Presenters:. Vaibhav Gowadia Cory Calmbacher. Goal. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina1

Do’s and Don’ts of Client Authentication on the Web

Kevin Fu, Emil Sit, Kendra Smith, Nick Feamster

MIT Laboratory for Computer Sciencehttp://cookies.lcs.mit.edu

Presenters:Vaibhav GowadiaCory Calmbacher

Page 2: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina2

Goal

Identify common mistakes in web authentication and recommend secure authentication protocol.

Page 3: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina3

Outline

Security Objectives Security Requirements Limitations Proposed Design Case Studies Evaluation

Page 4: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina4

Security Objectives

Authentication Confidentiality Privacy

Page 5: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina5

What requires authentication?

Clients want to ensure that only authorized people can access and modify personal information that they share with Web sites.

Web sites want to ensure that only authorized users have access to the services and content it provides.

Page 6: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina6

What requires confidentiality?

Online Brokerages

Auction sites

Banks

Online merchants

Page 7: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina7

What requires privacy?

Page 8: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina8

Outline

Security Objectives Security Requirements Limitations Proposed Design Case Studies Evaluation

Page 9: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina9

Security Requirements

Secure Authentication Granularity Secure against attacks

Page 10: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina10

Secure Authentication Cryptography

Proper use of existing cryptographic tools preferred over designing new scheme

PasswordsPrimary means of authentication today

AuthenticatorsTokens presented by client to gain access to system

Page 11: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina11

Use Cryptography Appropriately Use the appropriate amount of security Do not be inventive Do not rely on the secrecy of a protocol Understand the properties of

cryptographic tools Do not compose security schemes

Page 12: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina12

Protect Passwords

Limit exposure of passwords Prohibit guessable password Reauthenticate before changing passwords

Page 13: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina13

Handling of Authenticators

Make authenticators unforgeable Protect authenticators that must be

secret Limit lifetime of authenticators Bind authenticators to addresses Avoid using persistent cookies

Page 14: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina14

Granularity

Fine-grainedUseful if specific authorization or accountability of user is required

Coarse-grained

Page 15: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina15

Fine Grained

Page 16: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina16 Happy Gilmore

Page 17: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina17

CLICK

Page 18: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina18

Page 19: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina19

Granularity

Fine-grainedUseful if specific authorization or accountability of user is required

Coarse-grainedUseful if partial user anonymity is desired

Page 20: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina20

Coarse Grained

Page 21: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina21

Attacks

Goal of adversary: Break an authentication scheme faster than by brute force

Types: Existential forgery

Forge authenticator for at least one user Selective forgery

Forge authenticator for any chosen user Replay attack Total break

Recovery of secret key used to mint authenticators

Page 22: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina22

Adversaries

Interrogative Adversary Can query a Web server, but not see traffic Bases next query on previous query results

Eavesdropping AdversaryCan see traffic, but not modify

Active AdversaryCan see and modify all traffic

Page 23: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina23

Outline

Security Objectives Security Requirements Limitations Proposed Design Case Studies Evaluation

Page 24: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina24

Security Model Limitations

PerformanceHigher security implies lower performance

User AcceptabilityNon-confrontational

DeployabilityUse protocols and technologies commonly available

Page 25: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina25

Deployability

Cannot rely on hardware token systems (such as smart card readers)

Limit reliance on computationActiveXJavaJavaScriptSSL

Cookies!

Page 26: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina26

What are Cookies?

Text file stored on client’s hard drive

Contains information about visitors to a website (such as username and preferences)

Types:• Persistent Cookies:

Stored on computer indefinitely (unless user deletes)• Ephemeral / Temporary Cookie:

Stored in browser’s memory and disappears when usercloses browser

Page 27: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina27

Outline

Security Objectives Security Requirements Limitations Proposed Design Case Studies Evaluation

Page 28: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina28

Web-based Authentication

Page 29: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina29

Web-based Authentication

User

1. Username, Password

Is <username,password

> valid ?

2. Authentication Token

Server

Login Procedure

Page 30: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina30

Web-based Authentication

User

Is Authenticato

r valid ?

3. Request, Auth Token

4. Content

Server

Subsequent Requests

Page 31: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina31

Features of Authenticator

Personalizable Stateless verification Server controls lifetime Can refer to session info on server

Page 32: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina32

Cookie Recipe

IngredientsExpiration TimeData (Optional: Non-confidential info)

Procedureexp=&data=&digest=MAC(exp=

&data=)

Page 33: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina33

Note

This recipe does not require session identifiers, i.e. #state is O(1)

Maintaining session ID’s is O(n) Session identifiers requires synchronized,

duplicated data between servers

Page 34: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina34

Cookie Example

domain .wsj.comPath /cgiSSL? FALSEExpiration 941452067Variable name fastloginValue bitdiddleMaRdw2J1h6Lfc

Page 35: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina35

Cookie Validation

Authentication:Server recalculates MAC

Revocation mechanism:Not provided

Page 36: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina36

Security Analysis

Forging AuthenticatorSolution: MAC

Cookie hijackingSolution: SSL

Brute force Key SearchSolution: Key rotation

Page 37: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina37

Outline

Security Objectives Security Requirements Limitations Proposed Design Case Studies Evaluation

Page 38: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina38

Case Studies

Vulnerability Website

No cryptography www.highschoolalumni.com

Trusting user input www.instant-shop.com

Leaking secrets www.sprintpcs.com

Predictable SN’s www.fatbrain.com

Misuse of cryptography www.wsj.com

Page 39: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina39

High School Alumni

Page 40: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina40

High School Alumni

Page 41: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina41

High School Alumni

Problem: No cryptographic authentication Adversary: Interrogative Break: Universal forgery Today: Sold to another reunion site

Page 42: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina42

Instant Shop

Page 43: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina43

Instant Shop: What’s Inside

<form action=commit sale.cgi><input type=hidden name=item1 value=10> Batteries $10 <input type=hidden name=item2 value=99> Biology textbook $99 <input type=hidden name=item3 value=25> Britney Spears CD $25 <input type=submit> Confirm purchase </form>

Page 44: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina44

Instant Shop: What’s Inside

<form action=commit sale.cgi><input type=hidden name=item1 value=0> Batteries $10 <input type=hidden name=item2 value=0> Biology textbook $99 <input type=hidden name=item3 value=0> Britney Spears CD $25 <input type=submit> Confirm purchase </form>

Page 45: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina45

Instant Shop

Problem: Server trusts users not to modify HTML variables

Adversary: Interrogative Today: Out of business

Page 46: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina46

Sprint PCS

Page 47: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina47

Sprint PCS

Page 48: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina48

Sprint PCS

Problem: Secure content can leak through plaintext channels

Adversary: Eavesdropper Break: Replay

Page 49: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina49

Fat Brain

Page 50: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina50

Fat Brain

Page 51: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina51

Fat Brain

Start:https://www.fatbrain.com/HelpAccount.asp? t=0&[email protected]&p2=540555758

Try: https://www.fatbrain.com/HelpAccount.asp? t=0&[email protected]&p2=540555757

Target: https://www.fatbrain.com/HelpAccount.asp?t=0&[email protected]&p2=540555752

Page 52: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina52

Fat Brain

Start:https://www.fatbrain.com/HelpAccount.asp? t=0&[email protected]&p2=540555758

Try: https://www.fatbrain.com/HelpAccount.asp? t=0&[email protected]&p2=540555756

Target: https://www.fatbrain.com/HelpAccount.asp?t=0&[email protected]&p2=540555752

Page 53: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina53

Fat Brain

Start:https://www.fatbrain.com/HelpAccount.asp? t=0&[email protected]&p2=540555758

Try: https://www.fatbrain.com/HelpAccount.asp? t=0&[email protected]&p2=540555755

Target: https://www.fatbrain.com/HelpAccount.asp?t=0&[email protected]&p2=540555752

Page 54: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina54

Fat Brain

Start:https://www.fatbrain.com/HelpAccount.asp? t=0&[email protected]&p2=540555758

Try: https://www.fatbrain.com/HelpAccount.asp? t=0&[email protected]&p2=540555754

Target: https://www.fatbrain.com/HelpAccount.asp?t=0&[email protected]&p2=540555752

Page 55: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina55

Fat Brain

Start:https://www.fatbrain.com/HelpAccount.asp? t=0&[email protected]&p2=540555758

Try: https://www.fatbrain.com/HelpAccount.asp? t=0&[email protected]&p2=540555753

Target: https://www.fatbrain.com/HelpAccount.asp?t=0&[email protected]&p2=540555752

Page 56: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina56

Fat Brain

Start:https://www.fatbrain.com/HelpAccount.asp? t=0&[email protected]&p2=540555758

Try: https://www.fatbrain.com/HelpAccount.asp? t=0&[email protected]&p2=540555752

Target: https://www.fatbrain.com/HelpAccount.asp?t=0&[email protected]&p2=540555752

Page 57: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina57

Fat Brain

Problem: Customer can determine theauthenticator for any other user

Adversary: Interrogative Break: Selective forgery

Page 58: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina58

Wall Street Journal

Page 59: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina59

Wall Street Journal (WSJ)

Design: cookie = {user, MACk(user)}

Reality: cookie = user + UNIX-crypt (user + server secret)

Page 60: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina60

Wall Street Journal (WSJ)

Problems:Usernames matching first 8 characters

have same authenticatorNo expiration

Adversary:Interrogative

Break:Universal forgery

Page 61: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina61

Obtaining server secret (WSJ)

Chosen message attack Runs in max 128x8 queries rather than

intended 1288 queries.

Page 62: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina62

How attack works

Secret guess username crypt input worked? bitdiddl bitdiddl

Page 63: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina63

How attack works

Secret guess username crypt input worked? bitdiddl bitdiddl A bitdidd bitdiddA

Page 64: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina64

How attack works

Secret guess username crypt input worked? bitdiddl bitdiddl B bitdidd bitdiddB

Page 65: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina65

How attack works

Secret guess username crypt input worked? bitdiddl bitdiddl C bitdidd bitdiddC

Page 66: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina66

How attack works

Secret guess username crypt input worked? bitdiddl bitdiddl D bitdidd bitdiddD

Page 67: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina67

How attack works

Secret guess username crypt input worked? bitdiddl bitdiddl D bitdidd bitdiddDU bitdid bitdidDUD bitdi bitdiDUDE bitd bitdDUDE0 bit bitDUDE00 bi biDUDE007 B bDUDE007

Page 68: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina68

Outline

Security Objectives Security Requirements Limitations Proposed Design Case Studies Evaluation

Page 69: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina69

Performance Evaluation

Crypt HMAC-SHA1

Input 8 bytes + 2 byte salt

27 bytes +20 byte key

Avg. Time 8.08 sec 41.4 sec

# Requests = 5000Amount of data retrieved = 400 bytes

Page 70: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina70

Performance Evaluation

0200400600800

1000120014001600

HTTP SSL

Connections/second

11

1493

Page 71: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina71

Comparison

Plain HTTP HTTP with basic authentication Always-authenticated FastCGI script

Page 72: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina72

Do’s

Use standard protocols and technologies available

Use appropriate level of security Prohibit guessable passwords Limit exposure of passwords Limit lifetime of authenticators Sign what you mean!

Page 73: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina73

Don’ts

Do not rely on the secrecy of protocol Avoid using persistent cookies Do not store session identifiers in

cookie Do not trust browser to expire cookies Do not trust client side data

Page 74: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina74

References

Amazon http://www.amazon.com Ameritrade http://www.ameritrade.com Bank of America http://www.bankofamerica.com BellSouth http://home.bellsouth.net CNN Money http://money.cnn.com/services/portfolio/ Ebay http://www.ebay.com McCintosh Gourmet http://www.mcintoshgourmet.com/ MSN http://www.msn.com/ NetIQ http://www.netiq.com/ PBS http://pbskids.org/sesame/ USAirways http://www.usairways.com Yahoo http://mail.yahoo.com

Page 75: Do’s and Don’ts of Client Authentication on the Web

11/18/2003University of South Carolina75

Questions?

Enjoy your cookies

But Beware the Cookie Monster