Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password...

47
3 June 2020 SE 425: Communication and Information Security 1 Passwords and Human Authentication 3 June 2020 Lecture 10 Some Slides Credit: Steve Zdancewic (UPenn)

Transcript of Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password...

Page 1: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

3 June 2020 SE 425: Communication and Information Security 1

Passwords and Human

Authentication

3 June 2020

Lecture 10

Some Slides Credit: Steve Zdancewic (UPenn)

Page 2: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Topics for Today

• Human Authentication

– Password basics

– Multi-factor authentication

– Password storage

– Password alternatives

3 June 2020 SE 425: Communication and Information Security 2

Page 3: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

3 June 2020 SE 425: Communication and Information Security 3

Human User Authentication

• Machine

– Good at authenticating

other machines

– Good at mathematical

manipulations, etc.

– Can handle keys, secrets,

etc.

– Very good memory of things

stored in it

• Humans

– Good at identifying people

– Use small clues that when

combined yield an

unmistakable picture

• Voice

• Height

• Stance

• Shared history

• How do you:

– Know you're talking to a human?

– Allow a human user to identify him or herself to a machine?

Page 4: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

3 June 2020 SE 425: Communication and Information Security 4

Identifying Any Human• Problem:

– How does a machine establish that it's talking to a human?

– Why?

• Prevent SPAM, abuse of web accounts, foil bots and web crawlers,…

• Answer: Challenge / Response– Challenge is something that only humans can do (quickly):

– Example: deciphering obscured text

– Read: "Telling Humans and Computers Apart" (von Ahn, Blum, and Langford) www.captcha.net

• Counter strategies:– 'Grandmaster chess attack' : get humans to do the decoding

Page 5: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Identifying a particular human

Something you know

Password, etc.

Something you have

Driver’s license, Student ID, Key

Something inherent about you

Biometric, location

3 June 2020 SE 425: Communication and Information Security 5

Page 6: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

3 June 2020 SE 425: Communication and Information Security 6

Passwords

• Shared code/phrase

• Client sends to

authenticate

• Simple, right?

• How do you…

– Establish them to begin with?

– Stop them from leaking?

– Stop them from being guessed?

Page 7: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

3 June 2020 SE 425: Communication and Information Security 7

Prime Mover Problem

• Set up password: out of band

– Physical mail

– Email

– Attached to the box

– SMS

• Piggybacking

– Swipe ID Card to make Password

– But where does the chain stop?

• ID Card → TZ→ birth certificate

Page 8: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

On the box

3 June 2020 SE 425: Communication and Information Security 8

Page 9: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Federated ID (Oauth)

3 June 2020 SE 425: Communication and Information Security 9

Page 10: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

How OAuth 2.0 Works

3 June 2020 SE 425: Communication and Information Security 10

Ima

ge

so

urc

e: O

racle

https://d

ocs.o

racle

.com

/cd/E

39

82

0_

01

/doc.1

112

1/g

ate

wa

y_

docs/c

onte

nt/im

ag

es/o

auth

/

oauth

_w

eb_serv

er_

flow

.pn

g

Page 11: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

3 June 2020 SE 425: Communication and Information Security 11

Leaks & Challenges

• Social engineering

• Managing large numbers of passwords:

– Writing the password down on paper

– Storing it in an electronic "safe"

– Using a web browsers 'remember this

password' feature

• Legal and responsibility

– Shared password == shared liability

Page 12: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Oops

3 June 2020 SE 425: Communication and Information Security 12

Page 13: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Oops

3 June 2020 SE 425: Communication and Information Security 13

Page 14: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Oops

3 June 2020 SE 425: Communication and Information Security 14

Page 15: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Oops

3 June 2020 SE 425: Communication and Information Security 15

Page 16: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Password Safe (LastPass)

3 June 2020 SE 425: Communication and Information Security 16

Page 17: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

User Problems

• “No such user" error

– Gives an attacker

information about

usernames

– “User or password are

incorrect”

• “Here's who we are"

mistake

– Gives an attacker

information about

usernames

Password Problems

• Common words, phrases

for passwords

• Null passwords,

"password", username,

backwards, etc.

• Dictionary attacks

• How bad is it?

3 June 2020 SE 425: Communication and Information Security 17

Guessing Passwords

Page 18: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

1979 Survey of 3,289 Passwords

• With no constraints on

choice of password,

Morris and Thompson

got:

1 ASCII Char, 15

2 ASCII Chars, 72

3 ASCII Chars, 464

4 Alphanumic Chars, 477

5 Letters (All upper/lower),

706

6 Letters (all lower), 605

Other, but in dictionary, 492

OK, 458

3 June 2020 SE 425: Communication and Information Security 18

Page 19: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

3 June 2020 SE 425: Communication and Information Security 19

Other Surveys of Passwords• Klein (1990) and Spafford (1992) of 15𝐾 passwords

– 2.7% guessed in 15 minutes, 21% in a week

– Sounds ok? Not if the passwords last 30 days

• Schneier (2006) survey of 34,000 MySpace passwords– 65% eight characters or less

– 28% lower case letters followed by a single digit

– Top 11 passwords: password1, abc123, myspace1, password, blink182, qwerty1, f***you, 123abc, baseball1, football1, 123456

– 23% could be cracked in 30 min, 55% in 8 hours

• Adobe (2013) “survey” of 153,000,000 passwords:– Top 100 passwords (http://www.whatsmypass.com/top-100-adobe-passwords)

– Top 10: 123456, 123456789, password, adobe123, 12345678, qwerty, 1234567, 111111, photoshop, 123123

Page 20: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

XKCD

3 June 2020 SE 425: Communication and Information Security 20

Page 21: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Tricks

• Letter substitutions,

words backwards,

common names,

patterns, etc.

• Anything you can think of

off the top of your head, a

hacker can think of too

Lazy users!

• Weakest link is always

the way of the attack

• One weak password is

enough to give access

3 June 2020 SE 425: Communication and Information Security 21

Password Hacks

Page 22: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

3 June 2020 SE 425: Communication and Information Security 22

Heuristics for Guessing Attacks

• The dictionary with the words spelled backwards

– Israel bonus: Hebrew words spelled in English

– Sample dictionary: https://www.scrapmaker.com/view/dictionaries/rockyou.txt

• A list of first names (best obtained from some mailing list).

Last names, street names, and city names.

• The above with initial upper-case letters.

• All valid license plate numbers in your area. (About 5

hours work in 1979 for New Jersey.)

• Room numbers, social security numbers, telephone

numbers, and the like.

Page 23: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Password Length

• 64 bits of randomness is

hard to crack

– About 20 common ASCII

characters

• But… People can’t

remember random strings

• Longer not necessarily

better - people reuse or

write passwords

Pass phrases

• English Text has roughly

1.3 random bits/char.

• Thus about 50 letters of

English text

• Hard to type without

making mistakes!

3 June 2020 SE 425: Communication and Information Security 23

What makes a good password?

Page 24: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

In practice

• Non-dictionary, mixed

case, mixed

alphanumeric

• Not too short (or too long)

8 - 12 characters

• Tools that check

password strength

– https://howsecureismypass

word.net/

• Enforce non-reuse and

expiration

Infographic

• https://digitalguardian.co

m/blog/uncovering-

password-habits-are-

users-password-security-

habits-improving-

infographic

SE 425: Communication and Information Security 24

What makes a good password?

Page 25: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Password Entropy

3 June 2020 SE 425: Communication and Information Security 25

Source: xkcd.com

Page 26: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

So Far

• Human Authentication

– Password basics

– Multi-factor authentication

– Password storage

– Password alternatives

3 June 2020 SE 425: Communication and Information Security 26

Page 27: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Multifactor Authentication (MFA)

3 June 2020 SE 425: Communication and Information Security 27

Image s

ourc

es: h

ttps://w

ww

.yu

bic

o.c

om

/wp-c

on

ten

t/up

loa

ds/2

02

0/0

4/H

SM

-fam

ily-n

ew

-1m

b.p

ng

,

http

s://w

ww

.go

ogle

-au

the

ntic

ato

r.com

/Pu

blic

/Tp

l/Com

m/im

gs/p

ic_

2.jp

g

Principle: Smart card

online public key

Principle: Encrypt the time Principle: Encrypt a base secret

Page 28: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Aside: SMS for MFA

3 June 2020 SE 425: Communication and Information Security 28

Image sources: https://www.yl-invest.co.il/, https://www.migdal.co.il/mymigdal/process/login

Page 29: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Not such a good idea

3 June 2020 SE 425: Communication and Information Security 29

https://www.cnet.com/how-to/do-you-use-sms-for-two-factor-authentication-heres-why-you-shouldnt/

https://w

ww

.okta

.com

/blo

g/2

01

9/0

2/p

ho

ne

-nu

mb

ers

-as-i

de

ntifiers

-th

e-p

roble

m-w

ith-s

ms-b

ase

d-a

uth

enticatio

n/

https://www.howtogeek.com/310418/why-you-shouldnt-use-sms-for-two-factor-authentication/

Page 30: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Not such a good idea

3 June 2020 SE 425: Communication and Information Security 30

https://dl.acm.org/doi/pdf/10.1145/3203422.3203426

https://fortune.com/2016/07/26/nist-sms-two-factor/

Page 31: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

So Far

• Human Authentication

– Password basics

– Multi-factor authentication

– Password storage

– Password alternatives

3 June 2020 SE 425: Communication and Information Security 31

Page 32: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

3 June 2020 SE 425: Communication and Information Security 32

How does the system store them?

• Is the password file readable by the OS?– Then if I break the OS…

• Can privileged users see the file?– … and make copies

• Is the file backed up somewhere– … insecure?

• Is the file/password in plaintext somewhere in memory?– Core dump or memory scan (Windows)

• Fool the user– A program that masquerades as the authentication program

• Similar problems for database Username / Password tables

Page 33: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

3 June 2020 SE 425: Communication and Information Security 33

Counter-hacks• Control-Alt-Del for logging in

– Establishes a "trusted path" in hardware

– Prevents trojan horses from intercepting passwords

• Slow down / restrict number of tries– Make guessing take too long

– e.g. 3 tries and you're blocked for 30 seconds

• Encrypt the password file– System admin doesn’t know the password!

– Use one way hashes or encryptions on the passwords

– “Salt" - to prevent duplicate passwords showing as duplicate codes

Page 34: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

3 June 2020 SE 425: Communication and Information Security 34

Add Salt • “Salt” the passwords by adding random bits.

– Decreases the likelihood that two identical passwords will appear as identical entries in the password file.

• 12 bit salt results in 4,096 versions of each password.

• Unix: /etc/passwd entry:

• Modern implementations of Unix/Linux use so-called shadow password files /etc/shadow that aren’t world readable.

• Most use longer salts now too (48 bits to 128 bits)

user_id saltu Hash(saltu + passwdu) …

Page 35: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Registration Login

3 June 2020 SE 425: Communication and Information Security 35

Using Salt

Page 36: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Password File Hardening• What if an attacker steals the password file (or database

table)?– Simple hashes of passwords can be attacked using Rainbow Tables

(precomputed hash chains)

• Harden the password file: Make the password + salt → code calculation hard:– Old: Encrypt with DES using password and salt 25 times

– Newer: 5,000 rounds of SHA-2 on the password and salt

• Minimum 1,000 rounds

• More rounds and large salt make Rainbow Tables unfeasible

• Also make guessing attacks longer

• Read more: crypt(), John the Ripper (https://www.openwall.com/john/)

3 June 2020 SE 425: Communication and Information Security 36

Page 37: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Password Reuse

3 June 2020 SE 425: Communication and Information Security 37

Source: xkcd.com

Page 38: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Password Reuse: Problem

• 2011 Study: 49% of users on one site reused the

password on a different site

– Makes it worse if the site uses email address as login

– Bad if you use the same user name on multiple sites

• 2015 Study (Harris Interactive): 59% of

consumers reuse passwords

• 2017 Survey (Digital Guardian): 60% of

consumers reuse passwords

3 June 2020 SE 425: Communication and Information Security 38

Page 39: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Password Reuse: Problem

• Recent news:

– Feb 2013: Hacker publishes 583,000 passwords from walla.co.il

– Sept 2013: Anonymous publishes 165,000 passwords from an

Israeli ISP

– Oct 2013: 153,000,000 passwords from Adobe published online.

Used DES ECB encryption with no salt (oops!)

– 2 April 2014: Ars Technica reports 158,000 passwords from

Boxee.tv (Israeli startup) published

– 15 June 2015: LastPass password vault website hacked,

password hints, salts, and authentication hashes stolen.

3 June 2020 SE 425: Communication and Information Security 39

Page 40: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

3 June 2020 SE 425: Communication and Information Security 40

Page 41: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

From the past few weeks

3 June 2020 SE 425: Communication and Information Security 41

Page 42: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Password Reuse Solutions

3 June 2020 SE 425: Communication and Information Security 42

Don’t use the same login or passwords for

multiple websites

Single Sign On systems (OAuth,

Kerberos)

Host proof password

management tools

Page 43: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

So Far

• Human Authentication

– Password basics

– Multi-factor authentication

– Password storage

– Password alternatives

3 June 2020 SE 425: Communication and Information Security 43

Page 44: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Graphical Passwords Biometrics

3 June 2020 SE 425: Communication and Information Security 44

Password Alternatives

• Finger/Hand print

• Iris

• Cadence (typing, walking)

• Voice print

• Face

• Challenges:– Collection/Enrollment

– Theft

– Ambiguity/Uniqueness

– Accuracy of reader

Page 45: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Biometrics: Fingerprints• Relatively cheap ($10 for a

simple)

• Can match quickly (2s)

• Data is small (<1KB), so database is small

• Less affected by vandalism/dirt

• Can detect fakes/late

3 June 2020 SE 425: Communication and Information Security 45

Issues:

• Caucasians have best defined prints

• Women have finer prints

• Manual workers, elderly have less defined prints

• Building trusted path to reader

Reference: Coventry “Fingerprint Authentication”. (2004)

Page 46: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Other BiometricsVoice print: Speak a fixed statement prerecorded

• Issues:– High quality recordings of

voice

– Problems with voice – cold, cough, etc.

Retinal scans: Picture of back of eye

• Very high quality

• Issues:– Physical proximity

– Relatively long scan time (15s)

Iris scans: Scans iris pattern into a barcode

• Similar to retinal scan, but not as accurate

Facial recognition: Measure facial geometry

• Medium quality authentication

• Issues:– Masks, hats, bandages on

face, facial hair

– Reference: Alexander and Smith. “Engineering Privacy in Public: Confounding Face Recognition”. 2003

3 June 2020 SE 425: Communication and Information Security 46

Page 47: Lecture 10: Passwords and Human Authentication · – Multi-factor authentication – Password storage – Password alternatives 3 June 2020 SE 425: Communication and Information

Conclusion

• Human Authentication

– Password basics

– Multi-factor authentication

– Password storage

– Password alternatives

3 June 2020 SE 425: Communication and Information Security 47