dragonfly handshake of
play

Dragonfly Handshake of WPA3 and EAP-pwd Mathy Vanhoef and Eyal Ronen - PowerPoint PPT Presentation

Dragonblood : Analyzing the Dragonfly Handshake of WPA3 and EAP-pwd Mathy Vanhoef and Eyal Ronen Background: Wi-Fi Security 1999: Wired Equivalent Privacy (WEP) RC4 with 40 (!) or 104 bits key Broken in 2001 [FMS01] Deprecated 2004 2


  1. Hash-to-curve: WPA3 for (counter = 1; counter < 40 ; counter++) x = hash(pw, counter, addr1, addr2) if x >= p: continue if square_root_exists(x) and not P : P = (x, 𝑦 3 + 𝑏𝑦 + 𝑐 ) pw = rand() return P 28

  2. Hash-to-curve: WPA3 for (counter = 1; counter < 40 ; counter++) x = hash(pw, counter, addr1, addr2) if x >= p: continue if square_root_exists(x) and not P : P = (x, 𝑦 3 + 𝑏𝑦 + 𝑐 ) pw = rand() return P WPA3: always do 40 loops & return first P 28

  3. Hash-to-curve: WPA3 for (counter = 1; counter < 40; counter++) x = hash(pw, counter, addr1, addr2) if x >= p: continue if square_root_exists(x) and not P: P = (x, 𝑦 3 + 𝑏𝑦 + 𝑐 ) Blinded constant time pw = rand() square root test return P 29

  4. Hash-to-curve: WPA3 for (counter = 1; counter < 40; counter++) x = hash(pw, counter, addr1, addr2) if x >= p: continue if square_root_exists(x) and not P: P = (x, 𝑦 3 + 𝑏𝑦 + 𝑐 ) pw = rand() return P Extra iterations based on random password 30

  5. Hash-to-curve: WPA3 for (counter = 1; counter < 40; counter++) x = hash(pw, counter, addr1, addr2) if x >= p: continue if square_root_exists(x) and not P: P = (x, 𝑦 3 + 𝑏𝑦 + 𝑐 ) pw = rand() return P Are we Safe? 31

  6. Hash-to-curve: WPA3 for (counter = 1; counter < 40; counter++) x = hash(pw, counter, addr1, addr2) if x >= p: continue Truncate to size of prime p if square_root_exists(x) and not P: P = (x, 𝑦 3 + 𝑏𝑦 + 𝑐 ) pw = rand() return P 32

  7. Hash-to-curve: WPA3 for (counter = 1; counter < 40; counter++) x = hash(pw, counter, addr1, addr2) if x >= p: continue if square_root_exists(x) and not P: P = (x, 𝑦 3 + 𝑏𝑦 + 𝑐 ) Brainpool: 𝑞 = 0xA9FB57DBA1EEA9BC… pw = rand()  High chance that x >= p return P 33

  8. Hash-to-curve: WPA3 for (counter = 1; counter < 40; counter++) x = hash(pw, counter, addr1, addr2) if x >= p: continue = rejection sampling if square_root_exists(x) and not P: P = (x, 𝑦 3 + 𝑏𝑦 + 𝑐 ) pw = rand() return P 34

  9. Hash-to-curve: WPA3 for (counter = 1; counter < 40; counter++) x = hash(pw, counter, addr1, addr2) if x >= p: continue if square_root_exists(x) and not P: P = (x, 𝑦 3 + 𝑏𝑦 + 𝑐 ) pw = rand() return P Code may be skipped 35

  10. Hash-to-curve: WPA3 for (counter = 1; counter < 40; counter++) x = hash(pw, counter, addr1, addr2) if x >= p: continue if square_root_exists(x) and not P: P = (x, 𝑦 3 + 𝑏𝑦 + 𝑐 ) pw = rand() return P #Times skipped depends on password 36

  11. Hash-to-curve: WPA3 for (counter = 1; counter < 40; counter++) x = hash(pw, counter, addr1, addr2) if x >= p: continue if square_root_exists(x) and not P: P = (x, 𝑦 3 + 𝑏𝑦 + 𝑐 ) pw = rand() return P #Times skipped depends on password & random password in extra itreations 37

  12. Hash-to-curve: WPA3 for (counter = 1; counter < 40; counter++) x = hash(pw, counter, addr1, addr2) if x >= p: continue if square_root_exists(x) and not P: P = (x, 𝑦 3 + 𝑏𝑦 + 𝑐 ) pw = rand() return P Variance ~ when password element was found 38

  13. Hash-to-curve: WPA3 for (counter = 1; counter < 40; counter++) x = hash(pw, counter, addr1, addr2) if x >= p: continue if square_root_exists(x) and not P: P = (x, 𝑦 3 + 𝑏𝑦 + 𝑐 ) pw = rand() return P Variance ~ when password element was found Average ~ when found & #iterations code skipped 39

  14. Raspberry Pi 1 B+ 40

  15. Raspberry Pi 1 B+ WPA3 AP (Hostap): ~300 measurements / address Using Crosby’s box test 40

  16. Cache Attacks 41

  17. Threat Model 42

  18. Threat Model 42

  19. Threat Model 42

  20. Cache attack on NIST curves for (counter = 1; counter < 40; counter++) x = hash(pw, counter, addr1, addr2) if x >= p: continue if square_root_exists(x) and not P: NIST: 𝑞 = 0x0xFFFFFFFF00000001000… P = (x, 𝑦 3 + 𝑏𝑦 + 𝑐 )  Negligible chance that x >= p pw = rand() return P 43

  21. Cache attack on NIST curves for (counter = 1; counter < 40; counter++) x = hash(pw, counter, addr1, addr2) if x >= p: continue if square_root_exists(x) and not P: P = (x, 𝑦 3 + 𝑏𝑦 + 𝑐 ) pw = rand() NIST curves: use Flush+Reload to return P detect when code is executed 44

  22. Cache attack on NIST curves Monitor using Flush+Reload to know in which iteration we are for (counter = 1; counter < 40; counter++) x = hash(pw, counter, addr1, addr2) if x >= p: continue if square_root_exists(x) and not P: P = (x, 𝑦 3 + 𝑏𝑦 + 𝑐 ) pw = rand() NIST curves: use Flush+Reload to return P detect when code is executed 44

  23. Attacking client: Intel Core i7-7500 45

  24. Attacking client: Intel Core i7-7500 WPA3 client (Hostap): ~20 measurements / address Using Linear Classifier 46

  25. Detailed Analysis: See Paper › Estimate required #(spoofed MAC addresses): 47

  26. Detailed Analysis: See Paper › Estimate required #(spoofed MAC addresses): › Offline brute-force cost: 47

  27. Password Brute-force Cost 48

  28. Implementation Inspection 49

  29. Invalid Curve Attack Commit(x’, y’) 50

  30. Invalid Curve Attack Point isn’t on curve Commit(x’, y’) 50

  31. Invalid Curve Attack Point isn’t on curve Commit(x’, y’) Negotiated key is predictable 50

  32. Invalid Curve Attack Point isn’t on curve Commit(x’, y’) Negotiated key is predictable Commit reply Guess key and send confirm 50

  33. Invalid Curve Attack Point isn’t on curve Commit(x’, y’) Negotiated key is predictable Commit reply Guess key and send confirm Confirm phase 50

  34. Invalid Curve Attack Point isn’t on curve Commit(x’, y’) Negotiated key is predictable Bypasses authentication Commit reply  EAP-pwd: all implementations affected Guess key and  WPA3: only iwd is vulnerable send confirm Confirm phase 50

  35. Reflection Attack: EAP-pwd example association 51

  36. Reflection Attack: EAP-pwd example association Commit(x, y) 51

  37. Reflection Attack: EAP-pwd example association Commit(x, y) Reflect frame Commit(x, y) 51

  38. Reflection Attack: EAP-pwd example association Commit(x, y) Reflect frame Commit(x, y) Confirm 51

  39. Reflection Attack: EAP-pwd example association Commit(x, y) Reflect frame Commit(x, y) Confirm Reflect frame Confirm 51

  40. Reflection Attack: EAP-pwd example association Commit(x, y) Authenticate as victim Reflect frame Commit(x, y)  EAP-pwd: all servers are vulnerable Confirm  WPA3: old wpa_supplicants affected Reflect frame Confirm 51

  41. Other Implementation Vulnerabilities Bad randomness : › Can recover password element P › Aruba’s EAP -pwd client for Windows is affected › With WPA2 bad randomness has lower impact! 52

  42. Other Implementation Vulnerabilities Bad randomness : › Can recover password element P › Aruba’s EAP -pwd client for Windows is affected › With WPA2 bad randomness has lower impact! Side-channels : › FreeRADIUS aborts if >10 iterations are needed › Aruba’s EAP -pwd aborts if >30 are needed › Can use leaked info to recover password 52

  43. Wi-Fi Specific Attacks 54

  44. Denial-of-Service Attack Convert password to Convert password to group element P group element P AP converts password to EC point when client connects › Conversion is computationally expensive ( 40 iterations ) › Forging 8 connections/sec saturates AP’s CPU 55

  45. Downgrade Attacks Transition mode: WPA2/3 use the same password › WPA2’s handshake detects downgrades 56

  46. Downgrade Attacks Transition mode: WPA2/3 use the same password › WPA2’s handshake detects downgrades › Performing partial WPA2 handshake  dictionary attacks 56

  47. Downgrade Attacks Transition mode: WPA2/3 use the same password › WPA2’s handshake detects downgrades › Performing partial WPA2 handshake  dictionary attacks Handshake can be performed with multiple curves › Initiator proposes curve & responder accepts/rejects › Spoof reject messages to downgrade used curve 56

  48. Implementation-specific downgrades › Clone WPA3-only network & advertise it only supports WPA2 iwd 57

  49. Implementation-specific downgrades › Clone WPA3-only network & advertise it only supports WPA2 › Galaxy S10 & iwd connected using the WPA3-only password › Results in trivial dictionary attack iwd 57

  50. Disclosure 58

  51. Disclosure process Notified parties early with hope to influence WPA3 Reaction of the Wi-Fi Alliance › Privately created backwards-compatible security guidelines › 2 nd disclosure round to address Brainpool side-channels › Nov 2019 : Updated guidelines now prohibit Brainpool curves 59

  52. Latest Wi-Fi Alliance guidelines (Nov 2019) › “implementations must avoid [..] side - channels” 60

  53. Latest Wi-Fi Alliance guidelines (Nov 2019) › “implementations must avoid [..] side - channels” › If WPA3-Transition “doesn’t meet security requirements” , then seperate passwords 60

  54. Latest Wi-Fi Alliance guidelines (Nov 2019) › “implementations must avoid [..] side - channels” › If WPA3-Transition “doesn’t meet security requirements” , then seperate passwords › “Failure to implement...”  how can it be checked? 60

  55. Fundamental issue still unsolved › Hard to implement in constant time › On lightweight devices, doing 40 iterations is too costly 61

  56. Fundamental issue still unsolved › Hard to implement in constant time › On lightweight devices, doing 40 iterations is too costly Draft IEEE 802.11 standard has been updated › Exclude MAC addresses from hash2curve Allows offline computation of password element › Now uses constant-time hash2curve › Explicitly prohibit use of weak EC & MODP groups › Prevent crypto group downgrade attack 61

  57. Remaining issues Message transcript is not included in key derivation › Prevents formal proof of protocol › High risk of implementation issues › E.g. prevention of crypto group downgrade attack 62

Recommend


More recommend