unauthenticated encryption in the wild
play

Unauthenticated encryption in the wild Carl Svensson, 26 MSc in - PowerPoint PPT Presentation

September 12, 2017 Carl Svensson SEC-T 2017 Unauthenticated encryption in the wild Carl Svensson, 26 MSc in Computer Science, KTH Head of Security, Kry CTF-player, HackingForSoju 1 About me


  1. September 12, 2017 Carl Svensson SEC-T 2017 Unauthenticated encryption in the wild

  2. • Carl Svensson, 26 • MSc in Computer Science, KTH • Head of Security, Kry • CTF-player, HackingForSoju 1 About me •  calle.svensson@zeta-two.com •  @zetatwo •  https://zeta-two.com

  3. • Transform data • Maths, a lot of it • Many possible goals • Confidentiality (Hide) • Integrity (Verify) • Authentication (Identify) • Non-Repudiation (No take-backsies) • Modularity 2 Cryptography in 30 seconds

  4. • Block cipher • Key • Basic building block • No known attacks* 3 AES - Very good, at one specific thing

  5. 4 Block cipher modes, when you have more data

  6. • A priori, no way to differentiate • Has to accept all ciphertexts • Might be able to tell later • The Cryptographic Doom Principle 5 Encryption is not authentication

  7. 6 Bit flipping attack

  8. • https://link.a.com/AAAA/BBBBBBBBBBBBBBBBBBBBBB • Known plaintext, just visit • Edit link contents 7 Example: Open redirect as a service • x ⊕ m 1 = m 2 ⇔ x = m 1 ⊕ m 2

  9. • PKCS7 padding • bool oracle(input) { ... } • Differing error messages 8 Padding Oracle attack • x ⊕ g = t ⇔ x = g ⊕ t • 16 · 256 ≪ 256 16

  10. • Backup data • File format: • Padding Oracle -> Key -> Craft zip • Zip relative paths -> RCE 9 Example: Extracting secrets -> RCE Enc Km ( key 1 ) || Enc Ks ( zipfile )

  11. • Encryption AND authentication • Message Authentication Code 10 What to do? Authenticate! • HMAC k ( message ) = tag • Verify k ( tag , message ) ∈ True , False

  12. 10 Thanks for listening!

Recommend


More recommend