lecture 14 –passwords and authentication...lecture 14 –passwords and authentication stephen...

42
Lecture 14 – Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 – Fall 2017 Slides based on Bailey’s ECE 422 Major Portions Courtesy Ryan Cunningham

Upload: others

Post on 24-Sep-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

Lecture14– PasswordsandAuthentication

StephenCheckowayUniversityofIllinoisatChicago

CS487– Fall2017SlidesbasedonBailey’sECE422

MajorPortionsCourtesyRyanCunningham

Page 2: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

AUTHENTICATION

Page 3: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

AuthenticationBasics

• Authenticationbindsidentitytoasubject• Twostepprocess– Identification- establishidentitytosystem– Verification- processverifiesandbindsentityandidentity

Page 4: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

PASSWORDAUTHENTICATION

Page 5: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

Basics

• Userkeepsasecretstring(password)• Somethingtheuserknows• Advantages?• Disadvantages?

Page 6: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

Attacks• Stealfromtheuser– Installakeylogger (hardwareorsoftware)– Finditwrittendown– Socialengineering/Phishing– Interceptthepasswordovernetwork– Useasidechannel

• Stealfromtheservice– Installmalwareonthewebserver– DumpthepassworddatabasewithSQLinjection

• Stealfromathirdparty(passwordreuse)

Page 7: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

PasswordGuessing

http://www.datagenetics.com/blog/september32012/

Page 8: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

Top20Passwords(MarkBurnett)1. password, 320272. 123456, 259693. 12345678, 86674. 1234, 57865. qwerty, 54556. 12345, 45237. dragon, 43218. pussy, 39459. baseball, 373910. football, 3682

11. letmein, 353612. monkey, 348713. 696969, 334514. abc123, 331015. mustang, 328916. michael, 324917. shadow, 320918. master, 318219. jennifer, 258120. 111111, 2570

https://xato.net/10-000-top-passwords-6d6380716fe0#.lo0geeq99

Page 9: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

PowerLaw

http://www.philippeadjiman.com/blog/2009/10/26/drawing-the-long-tail-of-a-zipf-law-using-gnuplot-java-and-moby-dick/

Page 10: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

SecurePasswords

• Unevendistributionmakesguessingeasier• Passwordsshouldbeuniformlydistributed– Allcharactersinpasswordchosenwithequalprobability

• Passwordsshouldbelong– Longerpassword=largerbruteforcesearchspace

• Passwordsshouldneverbereused• Passwordschosenrandomlyaredifficulttoremember– Tradeoffofsecurityvs.convenience

Page 11: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

STORINGPASSWORDS

Page 12: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

Slide12

Page 13: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

StoringPasswords

• Passworddatabaseishighlysensitive• Weshouldnever storeplaintext passwords• Storesomethingthatletsuserprovetheyknowthepassword

Page 14: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

Hashfunctions(morelater)

• Input– dataofanarbitrarysize• Output– fixedlength• Sameinputalwaysproducesthesameoutput• Onewayfunction– cannotdeduceinputfromoutput• A“fingerprint”fortheinput• Examples:MD5,SHA-1,SHA-256,SHA-512,SHA-3– md5("welcome")= 40be4e59b9a2a2b5dffb918c0e86b3d7

• Noneoftheseshouldbeuseddirectlyusedforpasswordhashing

Page 15: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

Noncryptographic hashfunctions(andmore)

• Cyclicredundancychecks(CRC)– CRC-16,CRC-32,etc.– Basedonpolynomials,manyvariants

• Checksums– sum-8,sum-16,Adler-32,Luhn algorithm,etc.

• Noncryptographic hashfunctions– FNV-1,Berstein hash(djb2),Java’shashCode()

• Noneoftheseshouldbeusedusedforpasswordhashing

Page 16: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

PasswordHashes

• Westoreadatabaseofpasswordhashes• e.g.,/etc/shadowonUNIXrcunnin2:$6$vb1tLY1qiY$M.1ZCqKtJBxBtZm1gRi8Bbkn39KU0YJW1cuMFzTRANcNKFKR4RmAQVk4rqQQCkaJT6wXqjUkFcA/qNxLyqW.U/:15405:0:99999:7::

Page 17: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

PasswordCracking

• Bruteforcesearchthroughallpossiblepasswordsinorder• Useadictionary• Useadictionaryofcommonpasswords• Combinedictionarywithcommonpasswordsandheuristics(e.g.p@$$w0rdandpassword123)

• Usestatisticalmodelsofuserpasswords• Easytoparallelize:hashpasswordguess,comparetoentirehashdatabase

• CommonlydonewitharraysofGPUs

Page 18: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

RainbowTables

• Manypasswordsarecommon• Precomputetheminalookuptable• Time/spacetradeoff

Page 19: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

SaltingPasswordDatabase

• Generateandstorearandomnumber,thesaltforeachpassword• Concatenatepasswordandsalttocomputehash• Effectivelyauniquehashfunctionforeachpassword

p@$$w3rd 1517

zDMovrtf$Vdy63ipRgRAeKHvDIQP3F0

Hash

Page 20: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

PasswordSecurityPolicies• Educateusersaboutpasswordsecurity– Specificallytrainthemtousegoodpasswords– Buttheymightormightnotfollowthrough

• Generatepasswordsrandomly– Perfectuniformdistribution– Butnotverypsychologicallyacceptable

• Reactivepasswordchecking– Crackyourownuser’spasswords– Butexpensiveandpasswordsvulnerableuntilcracked

• Complexpasswordpolicy/proactivechecking

Page 21: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

ComplexPasswordPolicy/ProactiveChecking

• Lettheuserselecttheirownpassword• Forcethemtofollowapolicy• Rejectpasswordsthatdon’tfollowpolicy• But…– Technicallyreduces numberofpossiblepasswords– Policymightnotbepsychologicallyacceptable–Wedon’tknowifusersarereusingtheirpasswords

Page 22: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

SecurityQuestions

• Arealsoasharedsecret• BruceSchneier callsthem“abackuppassword”• Easiertoguessandsocialengineer• Somecannotbechanged• Somewebsiteshaveafixedsetofanswers!

Page 23: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

Breacheshappen

• Databasesofusernamesandpasswordsareexposed• https://haveibeenpwned.com/ß Usethis!

Page 24: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

RECENTPASSWORDSOLUTIONS

Page 25: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

PasswordManagers• Applicationthatgeneratesandmaintainspasswords• Examples:LastPass,KeePass,DashLane,1Password• Advantages:– Canhandlerandompasswords– Cancreateuniquepasswordsforeverywebsiteandservice

• Disadvantages– Onepointoffailure– Requiresastrongpassword(couldbesnooped)– Couldbehacked(onlyassecureasthepasswordmanager)– Inconvenient(doesn’tworkforsomesites,setuptime,etc.)

Page 26: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

OnePointofFailure…

Page 27: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

SingleSign-On(SSO)

• Logintotrusted3rdparty(identityprovider),whovouchesforuseridentity

• Examples:FacebookConnect,OAuth,OpenID• ProsandconssimilartoPasswordManagers• Thirdpartycantrackusers…

Page 28: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

TOKEN-BASEDAUTHENTICATION

Page 29: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

Basics

• Somethingtheuserhas• Staticmemorycards– Readonly– e.g.ATMcard/CreditCard– Vulnerabletoreplayattack

• Smartcard– Storageandcomputation– Enableschallenge-responseorone-timepassword– Protectsagainstreplayattack

Page 30: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

Challenge-Response

Page 31: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

One-timepassword(OTP)

• Smartcardcanalsoimplementone-timepasswordscheme• S/Keyisonesuchscheme:– Startwitharandomseed– Hashthecurrentseedtoproducethenext– Usethehashoutputsinreverseorder

• Time-basedone-timepassword(TOTP)• Vulnerabletoman-in-the-middle(MitM)

Page 32: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

Universalsecondfactor(U2F)

• AddressesOTP’sweaknesstoMitM

• Website’soriginiscryptographicallyboundtotheresponse(notdisplayedinthediagram)

https://developers.yubico.com/U2F/Libraries/Using_a_library.html

Page 33: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

Disadvantages

• Tokencanbelost,stolen,orcounterfeited• Requiresanindividualphysicaltoken• Requiresanextrastep(mildlyinconvenient)• Hardwarecanbeexpensive…– …butusuallyisn’t– $18forU2FkeyfromYubico– Google,Facebook,andYubico wereallgivingtheseawayatarecentconferenceIattended

Page 34: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

BIOMETRICAUTHENTICATION

Page 35: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

Biometrics

• Somethingtheuseris ordoes• Deriveasignaturefrombiologicalfeaturesofuser– Voice,fingerprint,face,retina,handwriting,gait

• Advantages?• Disadvantages?

Page 36: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

Disadvantages

• Imprecisemeasurementsrequireapproximatematching– Essentiallyamachinelearningtask– Falsenegativesandfalsepositiveshaveacost

• Measurementschangeovertime• Pooraccessibility• Cannotbereplacedorconcealed• Replayattacks/spoofingpossible• Canbelegallycompelledtoprovidebiometrics

Page 37: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

OPMBreach

Page 38: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

FacialRecognition

Page 39: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

OTHERSCHEMES

Page 40: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

2FactorAuthentication(2FA)

• SomethingyouhaveANDsomethingyouknow• Eitherfactorisuselesswithouttheother• ChipandPIN• CommonlyimplementedinmobilephonesviaSMS– Disadvantages:

• ONEdevice(ifhacked)• SMSiseasytoredirect• ONEpointoffailureforSE(phonecompany)

• Googleauthenticator,DuoMobile,Authy,Yubico Authenticator• OTPtokens(e.g.,TOTP),U2Fkeys

Page 41: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

MultifactorAuthentication

• Nextlevel2FA• Combinationofbiometrics,knowledge,andpossession

Page 42: Lecture 14 –Passwords and Authentication...Lecture 14 –Passwords and Authentication Stephen Checkoway University of Illinois at Chicago CS 487 –Fall 2017 Slides based on Bailey’s

BehaviorProfiling

• Trackaccessbehaviorofusers– Systemsused– Timesandlocationswhenactive– Typicalusage

• Lookforanomalousorfraudulentbehavior• “WhyisthisguywhowasinIowa2minutesagologginginfromNigeria?”

• Usedinfraudprevention