password cracking - computer sciencecollberg/teaching/466-566/2012/resou… · password cracking...

76
Introduction Let’s Attack A Time-Memory Trade-Off The LanManager Hash Physical Attacks Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin and Mark Tokutomi Password Cracking

Upload: others

Post on 05-Oct-2020

5 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Password Cracking

Sam Martin and Mark Tokutomi

CS466/566: Computer Security

April 22, 2012

Sam Martin and Mark Tokutomi Password Cracking

Page 2: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

The Basics

What are passwords for?

Proving identity (Authentication)

There are multiple ways to authenticate yourself

Sam Martin and Mark Tokutomi Password Cracking

Page 3: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

The Basics

What are passwords for?

Proving identity (Authentication)

There are multiple ways to authenticate yourself

Sam Martin and Mark Tokutomi Password Cracking

Page 4: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

The Basics

What are passwords for?

Proving identity (Authentication)

There are multiple ways to authenticate yourself

Sam Martin and Mark Tokutomi Password Cracking

Page 5: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

Authentication

Something you areSomething you have

or...

Sam Martin and Mark Tokutomi Password Cracking

Page 6: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

Authentication

Something you areSomething you haveor...

Sam Martin and Mark Tokutomi Password Cracking

Page 7: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

Something you know!

Sam Martin and Mark Tokutomi Password Cracking

Page 8: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

Why would this be more or less useful?

Compromised authentication

AnonymityPeople are so bad at making passwords...Let alone keeping them secret!

Sam Martin and Mark Tokutomi Password Cracking

Page 9: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

Why would this be more or less useful?

Compromised authenticationAnonymity

People are so bad at making passwords...Let alone keeping them secret!

Sam Martin and Mark Tokutomi Password Cracking

Page 10: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

Why would this be more or less useful?

Compromised authenticationAnonymityPeople are so bad at making passwords...

Let alone keeping them secret!

Sam Martin and Mark Tokutomi Password Cracking

Page 11: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

Why would this be more or less useful?

Compromised authenticationAnonymityPeople are so bad at making passwords...Let alone keeping them secret!

Sam Martin and Mark Tokutomi Password Cracking

Page 12: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

Sam Martin and Mark Tokutomi Password Cracking

Page 13: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

Before we find out how to crack passwords, we need to knowwhat we’re fightingWhat does the Unix password file look like?

Sam Martin and Mark Tokutomi Password Cracking

Page 14: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

1 User or account name

2 Hash of password

3 User number

4 Group identifier

5 Gecos field

6 Home directory

7 Opening command

Sam Martin and Mark Tokutomi Password Cracking

Page 15: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

But shouldn’t the password file have passwords in it

(I’m a well known liar)

The actual hashes are in the shadow file

The average user can’t get his hands on the hashes

Sam Martin and Mark Tokutomi Password Cracking

Page 16: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

But shouldn’t the password file have passwords in it

(I’m a well known liar)

The actual hashes are in the shadow file

The average user can’t get his hands on the hashes

Sam Martin and Mark Tokutomi Password Cracking

Page 17: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

But shouldn’t the password file have passwords in it

(I’m a well known liar)

The actual hashes are in the shadow file

The average user can’t get his hands on the hashes

Sam Martin and Mark Tokutomi Password Cracking

Page 18: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

The Security Account Manager file is similar to the Unixpasswd File

1 User or account name

2 User number

3 Encrypted password

4 Hash 1 of password

5 Hash 2 of password

6 Full name of user

7 Home directory

Sam Martin and Mark Tokutomi Password Cracking

Page 19: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

Everyone can read the Unix passwd file

The operating system has an exclusive lock on the WindowsSAM file

Why are these different?

Sam Martin and Mark Tokutomi Password Cracking

Page 20: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

Everyone can read the Unix passwd file

The operating system has an exclusive lock on the WindowsSAM file

Why are these different?

Sam Martin and Mark Tokutomi Password Cracking

Page 21: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

WPA2 Passwords

Sam Martin and Mark Tokutomi Password Cracking

Page 22: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

SQL tables for webservices

Encrypted?

Hashed?

Cleartext?

Sam Martin and Mark Tokutomi Password Cracking

Page 23: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

SQL tables for webservices

Encrypted?

Hashed?

Cleartext?

Sam Martin and Mark Tokutomi Password Cracking

Page 24: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

SQL tables for webservices

Encrypted?

Hashed?

Cleartext?

Sam Martin and Mark Tokutomi Password Cracking

Page 25: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

SQL tables for webservices

Encrypted?

Hashed?

Cleartext?

Sam Martin and Mark Tokutomi Password Cracking

Page 26: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

More randomness is more strength

Decent systems will add randomness for you

This strengthens passwords and makes precomputationattacks difficult

Sam Martin and Mark Tokutomi Password Cracking

Page 27: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

More randomness is more strength

Decent systems will add randomness for you

This strengthens passwords and makes precomputationattacks difficult

Sam Martin and Mark Tokutomi Password Cracking

Page 28: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

More randomness is more strength

Decent systems will add randomness for you

This strengthens passwords and makes precomputationattacks difficult

Sam Martin and Mark Tokutomi Password Cracking

Page 29: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Building BlocksUnix Password FileWindows SAM FileOther Password SchemesSalty Goodness

Password Hashed ValueNo Salt this1sAg00dPASSword!! a5a5baa0c16166260e9ef8a48dbde112Salted 6789o3uigtbgeat7this1sAg00dPASSword!! 53cffc58904a10b9dcc40345433862dcSalted v8734ihv6!nre432this1sAg00dPASSword!! 28b8f782262a890b4d730f8001d23bd5

No Salt love b5c0b187fe309af0f4d35982fd961d7eSalted 12bg55tygsdf4gvi9yrdslove 65c96e15930d34dd9a9ce916b81fb044Salted 879rughq2ebt5dfxcasedlove a35436c0e0f2821db2703c1983a641ab

Sam Martin and Mark Tokutomi Password Cracking

Page 30: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Brute ForceDictionary AttacksGraphical Passwords

Let’s say we have access to an input screen

If we want to try to crack a password, why don’t we just tryevery one?

There aren’t very many to try right?

lower case lower/upper lower/upper/digits Ascii

1 26 52 62 95

2 676 2704 3844 9025

4 456,976 7,311,616 14,766,336 81,450,625

8 2.09x1011 5.35x1013 2.18x1014 6.63x1015

16 4.36x1022 2.86x1027 4.77x1028 4.40x1031

Sam Martin and Mark Tokutomi Password Cracking

Page 31: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Brute ForceDictionary AttacksGraphical Passwords

Let’s say we have access to an input screen

If we want to try to crack a password, why don’t we just tryevery one?

There aren’t very many to try right?

lower case lower/upper lower/upper/digits Ascii

1 26 52 62 95

2 676 2704 3844 9025

4 456,976 7,311,616 14,766,336 81,450,625

8 2.09x1011 5.35x1013 2.18x1014 6.63x1015

16 4.36x1022 2.86x1027 4.77x1028 4.40x1031

Sam Martin and Mark Tokutomi Password Cracking

Page 32: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Brute ForceDictionary AttacksGraphical Passwords

Let’s say we have access to an input screen

If we want to try to crack a password, why don’t we just tryevery one?

There aren’t very many to try right?

lower case lower/upper lower/upper/digits Ascii

1 26 52 62 95

2 676 2704 3844 9025

4 456,976 7,311,616 14,766,336 81,450,625

8 2.09x1011 5.35x1013 2.18x1014 6.63x1015

16 4.36x1022 2.86x1027 4.77x1028 4.40x1031

Sam Martin and Mark Tokutomi Password Cracking

Page 33: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Brute ForceDictionary AttacksGraphical Passwords

Well ok, that looks like a lot...

But computers are super fast!

Let’s assume a desktop can try 1 million passwords per second

lower case lower/upper lower/upper/digits Ascii1 26 microseconds 52 microseconds 62 microseconds 95 microseconds2 676 microseconds 2.704 milliseconds 3.844 milliseconds 9.025 milliseconds4 ≈.5 seconds ≈7 seconds ≈14 seconds ≈81 seconds8 ≈2.42 days ≈1.7 years ≈6.9 years ≈210 years16 ≈1.38 billion years ≈91 trillion years ≈1.5 quadrillion years ≈1.4 quintillion years

Sam Martin and Mark Tokutomi Password Cracking

Page 34: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Brute ForceDictionary AttacksGraphical Passwords

Well ok, that looks like a lot...

But computers are super fast!

Let’s assume a desktop can try 1 million passwords per second

lower case lower/upper lower/upper/digits Ascii1 26 microseconds 52 microseconds 62 microseconds 95 microseconds2 676 microseconds 2.704 milliseconds 3.844 milliseconds 9.025 milliseconds4 ≈.5 seconds ≈7 seconds ≈14 seconds ≈81 seconds8 ≈2.42 days ≈1.7 years ≈6.9 years ≈210 years16 ≈1.38 billion years ≈91 trillion years ≈1.5 quadrillion years ≈1.4 quintillion years

Sam Martin and Mark Tokutomi Password Cracking

Page 35: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Brute ForceDictionary AttacksGraphical Passwords

Well ok, that looks like a lot...

But computers are super fast!

Let’s assume a desktop can try 1 million passwords per second

lower case lower/upper lower/upper/digits Ascii1 26 microseconds 52 microseconds 62 microseconds 95 microseconds2 676 microseconds 2.704 milliseconds 3.844 milliseconds 9.025 milliseconds4 ≈.5 seconds ≈7 seconds ≈14 seconds ≈81 seconds8 ≈2.42 days ≈1.7 years ≈6.9 years ≈210 years16 ≈1.38 billion years ≈91 trillion years ≈1.5 quadrillion years ≈1.4 quintillion years

Sam Martin and Mark Tokutomi Password Cracking

Page 36: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Brute ForceDictionary AttacksGraphical Passwords

Hm...Isn’t there anything faster?

Why yes there is! Some smart people programmed somethingthat can try 2.8 billion passwords per second on a singlemachine.

lower case lower/upper lower/upper/digits Ascii1 9 nanoseconds 19 nanoseconds 22 nanoseconds 34 nanoseconds2 241 nanoseconds 966 nanoseconds 1.373 microseconds 3.223 microseconds4 ≈163 microseconds ≈2.61 milliseconds ≈5.28 milliseconds ≈29.1 milliseconds8 ≈74.6 seconds ≈5.307 hours ≈21.6 hours ≈27.4 days16 ≈.5 million years ≈32 billion years ≈.5 trillion years ≈.5 quadrillion years

Sam Martin and Mark Tokutomi Password Cracking

Page 37: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Brute ForceDictionary AttacksGraphical Passwords

Hm...Isn’t there anything faster?

Why yes there is! Some smart people programmed somethingthat can try 2.8 billion passwords per second on a singlemachine.

lower case lower/upper lower/upper/digits Ascii1 9 nanoseconds 19 nanoseconds 22 nanoseconds 34 nanoseconds2 241 nanoseconds 966 nanoseconds 1.373 microseconds 3.223 microseconds4 ≈163 microseconds ≈2.61 milliseconds ≈5.28 milliseconds ≈29.1 milliseconds8 ≈74.6 seconds ≈5.307 hours ≈21.6 hours ≈27.4 days16 ≈.5 million years ≈32 billion years ≈.5 trillion years ≈.5 quadrillion years

Sam Martin and Mark Tokutomi Password Cracking

Page 38: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Brute ForceDictionary AttacksGraphical Passwords

Not all passwords are created equally

abc123

purple

password

123456

We can try only common passwords

Sam Martin and Mark Tokutomi Password Cracking

Page 39: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Brute ForceDictionary AttacksGraphical Passwords

Not all passwords are created equally

abc123

purple

password

123456

We can try only common passwords

Sam Martin and Mark Tokutomi Password Cracking

Page 40: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Brute ForceDictionary AttacksGraphical Passwords

Not all passwords are created equally

abc123

purple

password

123456

We can try only common passwords

Sam Martin and Mark Tokutomi Password Cracking

Page 41: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Brute ForceDictionary AttacksGraphical Passwords

What if we can get something like the shadow file

Let’s calculate the hashes of those common passwords

Then we can just check for those

Sam Martin and Mark Tokutomi Password Cracking

Page 42: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Brute ForceDictionary AttacksGraphical Passwords

What if we can get something like the shadow file

Let’s calculate the hashes of those common passwords

Then we can just check for those

Sam Martin and Mark Tokutomi Password Cracking

Page 43: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Brute ForceDictionary AttacksGraphical Passwords

What if we can get something like the shadow file

Let’s calculate the hashes of those common passwords

Then we can just check for those

Sam Martin and Mark Tokutomi Password Cracking

Page 44: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Brute ForceDictionary AttacksGraphical Passwords

How many possible passwords are there in a system where youconnect only four dots?

Sam Martin and Mark Tokutomi Password Cracking

Page 45: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Brute ForceDictionary AttacksGraphical Passwords

What are the pros of using graphical passwords?What are the potential drawbacks of them?How would you attack a graphical password scheme?

Sam Martin and Mark Tokutomi Password Cracking

Page 46: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Brute ForceDictionary AttacksGraphical Passwords

Can you guess this person’s password?

Sam Martin and Mark Tokutomi Password Cracking

Page 47: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Less Forceful than Brute ForceHow much less forceful?That’s still too much force!Why am I being subjected to this degree of force?

It’s been shown that we can make time-memory trade-offswhen computing solutions to NP-complete problems

Can we use the same approach here?

Fortunately, we can!

Sam Martin and Mark Tokutomi Password Cracking

Page 48: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Less Forceful than Brute ForceHow much less forceful?That’s still too much force!Why am I being subjected to this degree of force?

It’s been shown that we can make time-memory trade-offswhen computing solutions to NP-complete problems

Can we use the same approach here?

Fortunately, we can!

Sam Martin and Mark Tokutomi Password Cracking

Page 49: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Less Forceful than Brute ForceHow much less forceful?That’s still too much force!Why am I being subjected to this degree of force?

In 1980, Martin Hellman proposed a method of creating“chains” of hashes, and storing them in a table

The chains are built from the hash function and a reductionfunction, which maps hashes back into keyspace

We can reduce/hash the hash we are attacking repeatedly,until we hit one of the table’s end pointsOnce we know the row, we can chain from the start point tofind the inverse of the hash

Sam Martin and Mark Tokutomi Password Cracking

Page 50: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Less Forceful than Brute ForceHow much less forceful?That’s still too much force!Why am I being subjected to this degree of force?

In 1980, Martin Hellman proposed a method of creating“chains” of hashes, and storing them in a table

The chains are built from the hash function and a reductionfunction, which maps hashes back into keyspace

We can reduce/hash the hash we are attacking repeatedly,until we hit one of the table’s end pointsOnce we know the row, we can chain from the start point tofind the inverse of the hash

Sam Martin and Mark Tokutomi Password Cracking

Page 51: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Less Forceful than Brute ForceHow much less forceful?That’s still too much force!Why am I being subjected to this degree of force?

In 1980, Martin Hellman proposed a method of creating“chains” of hashes, and storing them in a table

The chains are built from the hash function and a reductionfunction, which maps hashes back into keyspace

We can reduce/hash the hash we are attacking repeatedly,until we hit one of the table’s end pointsOnce we know the row, we can chain from the start point tofind the inverse of the hash

Sam Martin and Mark Tokutomi Password Cracking

Page 52: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Less Forceful than Brute ForceHow much less forceful?That’s still too much force!Why am I being subjected to this degree of force?

Sam Martin and Mark Tokutomi Password Cracking

Page 53: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Less Forceful than Brute ForceHow much less forceful?That’s still too much force!Why am I being subjected to this degree of force?

Sam Martin and Mark Tokutomi Password Cracking

Page 54: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Less Forceful than Brute ForceHow much less forceful?That’s still too much force!Why am I being subjected to this degree of force?

Sam Martin and Mark Tokutomi Password Cracking

Page 55: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Less Forceful than Brute ForceHow much less forceful?That’s still too much force!Why am I being subjected to this degree of force?

This approach uses N2/3 time, and N2/3 space

That’s faster, but not fast enough:

The 16-character ASCII password would still take over threehundred thousand years to crack!

Sam Martin and Mark Tokutomi Password Cracking

Page 56: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Less Forceful than Brute ForceHow much less forceful?That’s still too much force!Why am I being subjected to this degree of force?

This approach uses N2/3 time, and N2/3 space

That’s faster, but not fast enough:

The 16-character ASCII password would still take over threehundred thousand years to crack!

Sam Martin and Mark Tokutomi Password Cracking

Page 57: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Less Forceful than Brute ForceHow much less forceful?That’s still too much force!Why am I being subjected to this degree of force?

Hellman’s approach has other problems:Chains can merge or loopUse lots of small tables with different reduction functionsDistinguished points can solve these issues, as well as save time

Sam Martin and Mark Tokutomi Password Cracking

Page 58: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Less Forceful than Brute ForceHow much less forceful?That’s still too much force!Why am I being subjected to this degree of force?

Hellman’s approach has other problems:Chains can merge or loopUse lots of small tables with different reduction functionsDistinguished points can solve these issues, as well as save time

Sam Martin and Mark Tokutomi Password Cracking

Page 59: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Less Forceful than Brute ForceHow much less forceful?That’s still too much force!Why am I being subjected to this degree of force?

Rainbow Tables offer the same improvements as distinguishedpoints, with a greater speed increase

Instead of one reduction function, we’ll use a family of themWe can only merge if the collision occurs at the same placenow

Sam Martin and Mark Tokutomi Password Cracking

Page 60: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Less Forceful than Brute ForceHow much less forceful?That’s still too much force!Why am I being subjected to this degree of force?

Rainbow Tables offer the same improvements as distinguishedpoints, with a greater speed increase

Instead of one reduction function, we’ll use a family of themWe can only merge if the collision occurs at the same placenow

Sam Martin and Mark Tokutomi Password Cracking

Page 61: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Less Forceful than Brute ForceHow much less forceful?That’s still too much force!Why am I being subjected to this degree of force?

We can use one large table instead of several smaller ones

Because we don’t need distinguished points, all rows can bethe same length

Sam Martin and Mark Tokutomi Password Cracking

Page 62: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Less Forceful than Brute ForceHow much less forceful?That’s still too much force!Why am I being subjected to this degree of force?

Although it may not sound significant, having chains ofconstant length makes application of the table substantiallyfaster

It both increases the lookup speed and decreases the timewasted detecting false alarms

Sam Martin and Mark Tokutomi Password Cracking

Page 63: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Less Forceful than Brute ForceHow much less forceful?That’s still too much force!Why am I being subjected to this degree of force?

How can we avoid attacks which use Rainbow Tables?

Store salted passwords! (It really is that easy!)

Why, then, are there so many tools which crack passwordsusing Rainbow Tables?

Like most of life’s problems, this can be attributed to Microsoft

Sam Martin and Mark Tokutomi Password Cracking

Page 64: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Less Forceful than Brute ForceHow much less forceful?That’s still too much force!Why am I being subjected to this degree of force?

How can we avoid attacks which use Rainbow Tables?

Store salted passwords! (It really is that easy!)

Why, then, are there so many tools which crack passwordsusing Rainbow Tables?

Like most of life’s problems, this can be attributed to Microsoft

Sam Martin and Mark Tokutomi Password Cracking

Page 65: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

It’s bad at its jobWe can’t fire it because it’s old

The Lan Manager hash was used in early versions of Windows

The hashes are not salted

It also splits passwords into two sections before hashing

Not only can we attack them in parallel, but...It halves the length of the search space (2k vs 2k/2)

(that’s a big difference!)

It also casts all alphabetic characters to uppercase

This is also bad, but is pretty insignificant compared tosplitting the password

Sam Martin and Mark Tokutomi Password Cracking

Page 66: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

It’s bad at its jobWe can’t fire it because it’s old

The Lan Manager hash was used in early versions of Windows

The hashes are not salted

It also splits passwords into two sections before hashing

Not only can we attack them in parallel, but...

It halves the length of the search space (2k vs 2k/2)

(that’s a big difference!)

It also casts all alphabetic characters to uppercase

This is also bad, but is pretty insignificant compared tosplitting the password

Sam Martin and Mark Tokutomi Password Cracking

Page 67: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

It’s bad at its jobWe can’t fire it because it’s old

The Lan Manager hash was used in early versions of Windows

The hashes are not salted

It also splits passwords into two sections before hashing

Not only can we attack them in parallel, but...It halves the length of the search space (2k vs 2k/2)

(that’s a big difference!)

It also casts all alphabetic characters to uppercase

This is also bad, but is pretty insignificant compared tosplitting the password

Sam Martin and Mark Tokutomi Password Cracking

Page 68: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

It’s bad at its jobWe can’t fire it because it’s old

The Lan Manager hash was used in early versions of Windows

The hashes are not salted

It also splits passwords into two sections before hashing

Not only can we attack them in parallel, but...It halves the length of the search space (2k vs 2k/2)

(that’s a big difference!)

It also casts all alphabetic characters to uppercase

This is also bad, but is pretty insignificant compared tosplitting the password

Sam Martin and Mark Tokutomi Password Cracking

Page 69: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

It’s bad at its jobWe can’t fire it because it’s old

If it’s known to be terrible, why is it still used?

Backward compatibility!

Versions of Windows up to (and including) XP still store it bydefaultIt can’t hash passwords longer than 14 charactersThis behavior can also be disabled, but is not by default untilVista

Sam Martin and Mark Tokutomi Password Cracking

Page 70: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

It’s bad at its jobWe can’t fire it because it’s old

If it’s known to be terrible, why is it still used?

Backward compatibility!

Versions of Windows up to (and including) XP still store it bydefaultIt can’t hash passwords longer than 14 charactersThis behavior can also be disabled, but is not by default untilVista

Sam Martin and Mark Tokutomi Password Cracking

Page 71: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

It’s bad at its jobWe can’t fire it because it’s old

If it’s known to be terrible, why is it still used?

Backward compatibility!

Versions of Windows up to (and including) XP still store it bydefaultIt can’t hash passwords longer than 14 charactersThis behavior can also be disabled, but is not by default untilVista

Sam Martin and Mark Tokutomi Password Cracking

Page 72: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

It’s bad at its jobWe can’t fire it because it’s old

In-Class Exercise!

Assuming we can check 2.8 billion passwords per second, andthey’re 7-bit ASCII...Approximately how long would it take to brute force a14-character password?What about a 7-character password?

Sam Martin and Mark Tokutomi Password Cracking

Page 73: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Rubber-Hose Password CrackingShoulder SurfingAcoustic Emanations

Sam Martin and Mark Tokutomi Password Cracking

Page 74: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Rubber-Hose Password CrackingShoulder SurfingAcoustic Emanations

Sam Martin and Mark Tokutomi Password Cracking

Page 75: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Rubber-Hose Password CrackingShoulder SurfingAcoustic Emanations

Sam Martin and Mark Tokutomi Password Cracking

Page 76: Password Cracking - Computer Sciencecollberg/Teaching/466-566/2012/Resou… · Password Cracking Sam Martin and Mark Tokutomi CS466/566: Computer Security April 22, 2012 Sam Martin

IntroductionLet’s Attack

A Time-Memory Trade-OffThe LanManager Hash

Physical Attacks

Rubber-Hose Password CrackingShoulder SurfingAcoustic Emanations

Questions?

Sam Martin and Mark Tokutomi Password Cracking