ssl gone in 30 seconds
play

SSL, GONE IN 30 SECONDS b r e a c h A BREACH beyond CRIME SSL, - PowerPoint PPT Presentation

Angelo Prado Neal Harris Yoel Gluck SSL, GONE IN 30 SECONDS b r e a c h A BREACH beyond CRIME SSL, GONE IN 30 SECONDS AGENDA Proceed with caution: Review of CRIME Introducing BREACH In the weeds Demo time! Mitigations b r e a c h SSL,


  1. Angelo Prado Neal Harris Yoel Gluck SSL, GONE IN 30 SECONDS b r e a c h A BREACH beyond CRIME SSL, GONE IN 30 SECONDS

  2. AGENDA Proceed with caution: Review of CRIME Introducing BREACH In the weeds Demo time! Mitigations b r e a c h SSL, GONE IN 30 SECONDS

  3. PREVIOUSLY... CRIME Target Requirements Presented at Secrets in HTTP TLS compression ekoparty 2012 headers MITM A browser Juliano Rizzo Thai Duong b r e a c h SSL, GONE IN 30 SECONDS

  4. SO ABOUT CRIME... The Compression Oracle: SSL doesn’t hide length SSL/SPDY compress headers CRIME issues requests with every possible character, and measures the ciphertext length Looks for the plaintext which compresses the most – guesses the secret byte by byte Requires small bootstrapping sequence knownKeyPrefix=secretCookieValue b r e a c h SSL, GONE IN 30 SECONDS

  5. COMPRESSION OVERVIEW DEFLATE / GZIP  LZ77: reducing redundancy Googling the googles -> Googling the g(-13,4)s  Huffman coding: replace common bytes with shorter codes b r e a c h SSL, GONE IN 30 SECONDS

  6. IT’S FIXED! TLS Compression Disabled b r e a c h SSL, GONE IN 30 SECONDS

  7. DO NOT PANIC: TUBES SECURE b r e a c h SSL, GONE IN 30 SECONDS

  8. Or are they? b r e a c h SSL, GONE IN 30 SECONDS

  9. [ let’s bring it back to life] b r e a c h SSL, GONE IN 30 SECONDS

  10. FIRST THINGS FIRST: FIX WIKIPEDIA b r e a c h SSL, GONE IN 30 SECONDS

  11. INTRODUCING B rowser R econnaissance & E xfiltration via BREACH A daptive C ompression of H ypertext b r e a c h SSL, GONE IN 30 SECONDS

  12. A CRIME AGAINST THE RESPONSE BODY b r e a c h SSL, GONE IN 30 SECONDS

  13. (sample traffic) b r e a c h SSL, GONE IN 30 SECONDS

  14. BREACH / the ingredients GZIP A secret in the response body · Very prevalent, any browser · CSRF, PII, ViewState … anything! Fairly stable pages Attacker-supplied guess · Less than 30 seconds for · In response body simple pages Three-character prefix MITM / traffic visibility · To bootstrap compression · No SSL tampering / downgrade Any version of SSL / TLS b r e a c h SSL, GONE IN 30 SECONDS

  15. [PREFIX / sample bootstrap] secret (CSRF token) guess b r e a c h SSL, GONE IN 30 SECONDS

  16. BREACH / architecture b r e a c h SSL, GONE IN 30 SECONDS

  17. BREACH / command & control b r e a c h SSL, GONE IN 30 SECONDS

  18. C&C/ logic Traffic Monitor MITM: ARP spoofing, Transparent relay SSL proxy  DNS, DHCP, WPAD… HTML/JS Controller I. Dynamically generated for specific target server II. Injects & listens to iframe streamer from c&c:81 that dictates the new HTTP requests to be performed ( img.src=. ..) III. Issues the outbound HTTP requests to the target site via the victim's browser, session-riding a valid SSL channel IV. Upon synchronous completion of every request ( onerror ) , performs a unique callback to c&c:82 for the Traffic Monitor to measure encrypted response size b r e a c h SSL, GONE IN 30 SECONDS

  19. C&C/ logic Main C&C Driver Coordinates character guessing  Adaptively issues requests to target site  Listens to JS callbacks upon request completion  Measures -inbound- packets length  Has built-in intelligence for compression oracle  runtime recovery b r e a c h SSL, GONE IN 30 SECONDS

  20. THE ORACLE MEASURE GUESSING ERROR SIZE DELTA BYTE-BY-BYTE RECOVERY b r e a c h SSL, GONE IN 30 SECONDS

  21. SSL REVEALS LENGTH TCP connection SSL records HTTP clear text SSL cipher text 10 bytes b r e a c h SSL, GONE IN 30 SECONDS

  22. COMPRESSION ORACLE (I) <html> … 48 bytes supersecret tkn= … supersecreX guess= after gzip <html> … 3 8 bytes supersecret tkn= … (-22, 10)X guess= b r e a c h SSL, GONE IN 30 SECONDS

  23. COMPRESSION ORACLE (II) <html> … 48 bytes supersecret tkn= … supersecret guess= after gzip <html> … 3 7 bytes supersecret tkn= … (-22, 11) guess= b r e a c h SSL, GONE IN 30 SECONDS

  24. b r e a c h SSL, GONE IN 30 SECONDS

  25. THE ORACLE Huffman Coding Nightmares Correct Guess https://target-server.com/page.php?blah=blah2... &secret=4bf (response: 1358 bytes) b Incorrect Guess https://target-server.com/page.php?blah=blah2... a &secret=4bf (response: 1358 bytes) b r e a c h SSL, GONE IN 30 SECONDS

  26. THE ORACLE Fighting Huffman Coding Two Tries + random [ dynamic ] padding https://target-server.com/page.php?blah=blah2... &secret=4bf {}{}(...){}{}{}{}{} 7 &secret=4bf {}{}(...){}{}{}{}{} 7 Character set pool + random padding https://target-server.com/page.php?blah=blah2... &secret=4bf {}{}(...){}{}{}{}{}---a-b-c-d- … -5-6-8-9- … 7 8 &secret=4bf {}{}(...){}{}{}{}{}---a-b-c-d- … -5-6-7-9- … b r e a c h SSL, GONE IN 30 SECONDS

  27. THE ORACLE Two Tries Reality Less than ideal conditions: In theory, two-tries allows for short-circuiting once winner  is found In practice, still need to evaluate all candidates  Huffman encoding causes collisions  b r e a c h SSL, GONE IN 30 SECONDS

  28. ROADBLOCKS Conflict & Recovery mechanisms (no winners / too many winners) Look-ahead (2+ characters) – reliable, but expensive  Best value / averages  Rollback (last-known conflict)  Check compression ratio of guess string  Page URL / HTML entity encoding Can interfere with bootstrapping  b r e a c h SSL, GONE IN 30 SECONDS

  29. MORE ROADBLOCKS Stream cipher vs. block cipher Stream cipher reveals exact plain text length 10 bytes Compressed HTTP response SSL cipher text b r e a c h SSL, GONE IN 30 SECONDS

  30. MORE ROADBLOCKS Stream cipher vs. block cipher Block cipher hides exact plain text length 16 bytes Compressed HTTP response Compressed HTTP response SSL cipher text Align response to a tipping point  Guess Window (keeping response aligned)  b r e a c h SSL, GONE IN 30 SECONDS

  31. EVEN MORE ROADBLOCKS Keep-Alive (a premature death) Image requests vs. scripts vs. CORS requests  Browser synchronicity limits (1x) Hard to correlate HTTP requests to TCP segments  Filtering out noise Active application?  Background polling?  b r e a c h SSL, GONE IN 30 SECONDS

  32. YET MORE ROADBLOCKS ‘Unstable’ pages (w/ random DOM blocks) Averaging & outlier removal  The war against Huffman coding Weight (symbol) normalization  Circumventing cache Random timestamp  Other Oracles Patent-pending!  b r e a c h SSL, GONE IN 30 SECONDS

  33. OVERWHELMED? b r e a c h SSL, GONE IN 30 SECONDS

  34. DEMO TIME (let us pray) b r e a c h SSL, GONE IN 30 SECONDS

  35. THE TOOL b r e a c h SSL, GONE IN 30 SECONDS

  36. MITIGATIONS RANDOMIZING DYNAMIC MASKING THE LENGTH SECRETS THE SECRET · variable padding · dynamic CSRF · random XOR – easy, · fighting against math tokens per request dirty, practical path · /FAIL · downstream enough SEPARATING CSRF-PROTECT THROTTLING SECRETS EVERYTHING & MONITORING · deliver secrets in · unrealistic input-less servlets DISABLING GZIP · chunked secret FOR DYNAMIC separation (lib patch) PAGES b r e a c h SSL, GONE IN 30 SECONDS

  37. FUTUREWORK Better understanding of DEFLATE / GZIP Beyond HTTPS Very generic side-channel  Other protocols, contexts?  Stay tuned for the next BREACH b r e a c h SSL, GONE IN 30 SECONDS

  38. WANT MORE? AGENTS STANDING BY BreachAttack.com PAPER PRESENTATION POC TOOL b r e a c h SSL, GONE IN 30 SECONDS

  39. THANK YOU EVERYBODY ! b r e a c h SSL, GONE IN 30 SECONDS

  40. BREACHATTACK.COM Angelo Prado Neal Harris Yoel Gluck angelpm@gmail.com neal.harris@gmail.com yoel.gluck2@gmail.com @PradoAngelo @IAmTheNeal If you liked the talk*, don’t forget to scan your badge for the evaluation survey * ignore otherwise b r e a c h SSL, GONE IN 30 SECONDS

Recommend


More recommend