making password checking systems be7er
play

Making Password Checking Systems Be7er Tom Ristenpart - PowerPoint PPT Presentation

Making Password Checking Systems Be7er Tom Ristenpart Covering joint work with: Anish Athayle, Devda<a Akawhe, Joseph Bonneau, Rahul Cha<erjee, Adam


  1. Making ¡Password ¡Checking ¡ Systems ¡Be7er ¡ Tom ¡Ristenpart ¡ Covering ¡joint ¡work ¡with: ¡ Anish ¡Athayle, ¡Devda<a ¡Akawhe, ¡Joseph ¡Bonneau, ¡Rahul ¡Cha<erjee, ¡ Adam ¡Everspaugh, ¡Ari ¡Juels, ¡Sam ¡Sco< ¡

  2. Password ¡checking ¡systems ¡ tom ¡ password1 ¡ tom, ¡password1 ¡ alice ¡ 123456 ¡ bob ¡ p@ssword! ¡ Login ¡ ¡ server ¡ (plus ¡hundreds ¡of ¡millions ¡more) ¡ Allow ¡login ¡if: ¡ A<ack ¡detecOon ¡mechanisms ¡don’t ¡flag ¡request ¡ Password ¡matches ¡ SomeOmes: ¡ ¡second ¡factor ¡succeeds ¡

  3. Problems ¡w/ ¡password ¡checking ¡systems ¡ tom ¡ password1 ¡ tom, ¡password1 ¡ alice ¡ 123456 ¡ bob ¡ p@ssword! ¡ Login ¡ ¡ server ¡ People ¡oUen ¡enter ¡ ¡ wrong ¡password: ¡ Passwords ¡databases ¡must ¡be ¡protected: ¡ -­‑ Typos ¡ -­‑ Server ¡compromise ¡ -­‑ Memory ¡errors ¡ -­‑ ExfiltraOon ¡a<acks ¡(e.g., ¡SQL ¡injecOon) ¡ Widespread ¡pracOce: ¡ -­‑ Apply ¡hashing ¡w/ ¡salts ¡ -­‑ Hope ¡slows ¡down ¡a<acks ¡enough ¡

  4. Today’s ¡talk ¡ Pythia : ¡moving ¡beyond ¡“hash ¡& ¡hope” ¡ Harden ¡hashes ¡with ¡off-­‑system ¡secret ¡key ¡using ¡ ¡ par$ally ¡oblivious ¡pseudorandom ¡func$on ¡ protocol ¡ [Everspaugh, ¡Cha<erjee, ¡Sco<, ¡Juels, ¡R. ¡– ¡USENIX ¡Security ¡2015] ¡ Typo-­‑tolerant ¡password ¡checking ¡ In-­‑depth ¡study ¡of ¡typos ¡in ¡user-­‑chosen ¡passwords ¡ Show ¡how ¡to ¡allow ¡typos ¡without ¡harming ¡security ¡ [Cha<erjee, ¡Athayle, ¡Akawhe, ¡Juels, ¡R. ¡– ¡Oakland ¡2016] ¡

  5. Password ¡checking ¡systems ¡ tom ¡ tom ¡ password1 ¡ salt 1 ¡, ¡H c (password1,salt 1 ) ¡ tom, ¡password1 ¡ alice ¡ alice ¡ 123456 ¡ salt 2 ¡, ¡H c (123456,salt 2 ) ¡ bob ¡ bob ¡ p@ssword! ¡ salt 3 ¡, ¡H c (p@ssword!,salt 3 ) ¡ Login ¡ ¡ server ¡ Websites ¡should ¡ never ¡store ¡passwords ¡directly, ¡ ¡ they ¡should ¡be ¡(at ¡least) ¡hashed ¡with ¡a ¡salt ¡(also ¡stored) ¡ Cryptographic ¡hash ¡funcOon ¡H ¡ c ¡Omes ¡ ¡ (H ¡= ¡SHA-­‑256, ¡SHA-­‑512, ¡etc.) ¡ Common ¡choice ¡is ¡ ¡c ¡= ¡10,000 ¡ … ¡ H ¡ H ¡ H ¡ pw||salt ¡ Be<er: ¡ ¡scrypt, ¡argon2 ¡ UNIX ¡password ¡hashing ¡scheme, ¡PKCS ¡#5 ¡ Formal ¡analyses: ¡ ¡[Wagner, ¡Goldberg ¡2000] ¡[Bellare, ¡R., ¡Tessaro ¡2012] ¡

  6. Password ¡database ¡compromises ¡ … ¡ year ¡ % ¡recovered ¡ format ¡ # ¡stolen ¡ 2012 ¡ 100% ¡ plaintext ¡(!) ¡ 32.6 ¡million ¡ 2012 ¡ 90% ¡ Unsalted ¡SHA-­‑1 ¡ 117 ¡million ¡ 2013 ¡ ?? ¡ ECB ¡encrypOon ¡ 36 ¡million ¡ Salted ¡bcrypt ¡ 2015 ¡ 36 ¡million ¡ 33% ¡ + ¡MD5 ¡ … ¡

  7. (1) ¡Password ¡protecOons ¡oUen ¡implemented ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡incorrectly ¡in ¡pracOce ¡ (2) ¡Even ¡in ¡best ¡case, ¡hashing ¡slows ¡down ¡but ¡ ¡ ¡does ¡not ¡prevent ¡offline ¡brute-­‑force ¡cracking ¡

  8. Facebook ¡password ¡onion ¡ $cur ¡ ¡= ¡‘password’ ¡ $cur ¡ ¡= ¡md5($cur) ¡ $salt ¡= ¡randbytes(20) ¡ $cur ¡ ¡= ¡hmac_sha1($cur, ¡$salt) ¡ $cur ¡ ¡= ¡remote_hmac_sha256($cur, ¡$secret) ¡ $cur ¡ ¡= ¡scrypt($cur, ¡$salt) ¡ $cur ¡ ¡= ¡hmac_sha256($cur, ¡$salt) ¡

  9. Strengthening ¡password ¡hash ¡storage ¡ tom, ¡password1 ¡ h ¡ K ¡ f ¡= ¡HMAC(K, ¡h) ¡ Back-­‑end ¡ ¡ crypto ¡ ¡ h ¡= ¡H c (password1|| ¡salt) ¡ service ¡ Store ¡salt, ¡f ¡ HMAC ¡is ¡pseudorandom ¡funcOon ¡(PRF). ¡ f’ ¡= ¡H c (123456 ¡|| ¡salt) ¡ f ¡= ¡f’? ¡ f’ ¡= ¡HMAC(K, ¡h’) ¡ K ¡ Back-­‑end ¡ ¡ H c (1234567 ¡|| ¡salt) ¡ Must ¡sOll ¡perform ¡online ¡ ¡ crypto ¡ ¡ service ¡ brute-­‑force ¡a<ack ¡ H c (12345 ¡|| ¡salt) ¡ ¡ ExfiltraOon ¡doesn’t ¡help ¡ … ¡

  10. Strengthening ¡password ¡hash ¡storage ¡ tom, ¡password1 ¡ h ¡ K ¡ f ¡= ¡HMAC(K, ¡h) ¡ Back-­‑end ¡ ¡ crypto ¡ ¡ h ¡= ¡H c (password1|| ¡salt) ¡ service ¡ Store ¡salt, ¡f ¡ CriDcal ¡limitaDon: ¡ ¡can’t ¡rotate ¡K ¡to ¡a ¡new ¡secret ¡K’ ¡ • Idea ¡1: ¡Version ¡database ¡and ¡update ¡as ¡users ¡log ¡in ¡ § But ¡doesn’t ¡update ¡old ¡hashes ¡ • Idea ¡2: ¡Invalidate ¡old ¡hashes ¡ § But ¡requires ¡password ¡reset ¡ • Idea ¡3: ¡Use ¡secret-­‑key ¡encrypOon ¡instead ¡of ¡PRF ¡ § But ¡requires ¡sending ¡keys ¡to ¡web ¡server ¡(or ¡high ¡bandwidth) ¡

  11. The ¡Pythia ¡PRF ¡Service ¡ Blinding ¡means ¡service ¡learns ¡ nothing ¡about ¡passswords ¡ tom, ¡password1 ¡ user ¡id, ¡blinded ¡h ¡ K ¡ Blinded ¡PRF ¡output ¡f ¡ Back-­‑end ¡ ¡ crypto ¡ ¡ h ¡= ¡H c (password1|| ¡salt) ¡ service ¡ Blind ¡h, ¡pick ¡user ¡ID ¡ User ¡ID ¡reveals ¡fine-­‑grained ¡query ¡ Unblind ¡PRF ¡output ¡f ¡ pa<erns ¡to ¡service. ¡ ¡ Store ¡user ¡ID, ¡salt, ¡f ¡ Compromise ¡detecOon ¡& ¡rate ¡limiOng ¡ Cryptographically ¡erases ¡ ¡f: ¡ Useless ¡to ¡a<acker ¡in ¡the ¡future ¡ Combine ¡token ¡and ¡f ¡ ¡ K ¡ to ¡generate ¡f’ ¡= ¡F(K’,h) ¡ Token(K-­‑>K’) ¡ Back-­‑end ¡ ¡ crypto ¡ ¡ Server ¡learns ¡nothing ¡ K’ ¡ service ¡ about ¡K ¡or ¡K’ ¡

  12. New ¡crypto: ¡parDally-­‑oblivious ¡PRF ¡ Groups ¡G 1 ¡, ¡G 2 ¡, ¡G T ¡w/ ¡ ¡ ¡bilinear ¡pairing ¡e ¡: ¡G 1 ¡x ¡G 2 ¡-­‑> ¡G T ¡ ¡ ¡ ¡ ¡ ¡ ¡e(a x ,b y ) ¡= ¡c xy ¡ K ¡ tom, ¡password1 ¡ user ¡id, ¡h r ¡ y ¡ t ¡= ¡H(user ¡id) ¡ y ¡= ¡e(t K ,h r ) ¡ h ¡= ¡H c (password1|| ¡salt) ¡ Choose ¡random ¡r ¡ f ¡= ¡y 1/r ¡ Store ¡user ¡ID, ¡salt, ¡f ¡ f ¡ ¡ ¡= ¡ ¡ ¡e(t K ,h r ) 1/r ¡ ¡ ¡= ¡ ¡ ¡e(t,h) Kr*1/r ¡ ¡ ¡ ¡ = ¡ ¡ ¡ ¡e(t,h) K ¡ • Pairing ¡cryptographically ¡binds ¡user ¡id ¡with ¡password ¡hash ¡ • Can ¡add ¡verifiability ¡(proof ¡that ¡PRF ¡properly ¡applied) ¡ • Key ¡rotaOon ¡straigh•orward: ¡ ¡ ¡ ¡ ¡Token(K ¡-­‑> ¡K’) ¡ ¡= ¡ ¡K ’ ¡ / ¡ K ¡ • InteresOng ¡formal ¡security ¡analysis ¡(see ¡paper) ¡

  13. The ¡Pythia ¡PRF ¡Service ¡ § Queries ¡are ¡fast ¡despite ¡pairings ¡ • PRF ¡query: ¡ ¡ ¡11.8 ¡ms ¡ ¡(LAN) ¡ ¡ ¡ ¡ ¡ ¡ ¡96 ¡ms ¡ ¡(WAN) ¡ § Parallelizable ¡password ¡onions ¡ ¡ • H c ¡ ¡and ¡PRF ¡query ¡made ¡in ¡parallel ¡(hides ¡latency) ¡ § MulO-­‑tenant ¡(theoreOcally: ¡scales ¡to ¡100 ¡million ¡login ¡servers) ¡ § Easy ¡to ¡deploy ¡ • Open-­‑source ¡reference ¡implementaOon ¡at ¡ ¡ ¡ ¡ ¡ ¡h<p://pages.cs.wisc.edu/~ace/pythia.html ¡

  14. Today’s ¡talk ¡ Pythia : ¡moving ¡beyond ¡“hash ¡& ¡hope” ¡ Harden ¡hashes ¡with ¡off-­‑system ¡secret ¡key ¡using ¡ ¡ par$ally ¡oblivious ¡pseudorandom ¡func$on ¡ protocol ¡ [Everspaugh, ¡Cha<erjee, ¡Sco<, ¡Juels, ¡R. ¡– ¡USENIX ¡Security ¡2015] ¡ Typo-­‑tolerant ¡password ¡checking ¡ In-­‑depth ¡study ¡of ¡typos ¡in ¡user-­‑chosen ¡passwords ¡ Show ¡how ¡to ¡allow ¡typos ¡without ¡harming ¡security ¡ [Cha<erjee, ¡Athayle, ¡Akawhe, ¡Juels, ¡R. ¡– ¡Oakland ¡2016] ¡

  15. Back ¡to ¡our ¡big ¡picture ¡ tom ¡ tom ¡ password1 ¡ G K (password1) ¡ tom, ¡password1 ¡ alice ¡ alice ¡ 123456 ¡ G K (123456) ¡ bob ¡ bob ¡ G K (p@ssword!) ¡ p@ssword! ¡ Login ¡ ¡ server ¡ People ¡oUen ¡enter ¡ ¡ wrong ¡password: ¡ Passwords ¡databases ¡must ¡be ¡protected: ¡ -­‑ Typos ¡ -­‑ Server ¡compromise ¡ -­‑ Memory ¡errors ¡ -­‑ ExfiltraOon ¡a<acks ¡(e.g., ¡SQL ¡injecOon) ¡ Widespread ¡pracOce: ¡ -­‑ Apply ¡hashing ¡w/ ¡salts ¡ -­‑ Hope ¡slows ¡down ¡a<acks ¡enough ¡

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend