Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Keeping Secrets: Emerging Practice in Database ...

Kenn White
December 05, 2018

Keeping Secrets: Emerging Practice in Database Encryption

Talk from Black Hat Europe 2018

Kenn White

December 05, 2018
Tweet

More Decks by Kenn White

Other Decks in Technology

Transcript

  1. Goals Highlight the gaps between real-world attack scenarios and the

    implicit security guarantees of most popular encrypted databases Review recent advances & breaks in database encryption techniques Look at emerging methods around data in-use & blind admin models Provide architects and defenders with practical guidance for high-sensitivity workloads
  2. A Brief History on Database Encryption... - Transport SSL/TLS over

    native wire protocols - Storage Volume encryption (FDE)
  3. A Brief History on Database Encryption... - Tables/tablespaces Transparent Data

    Encryption (TDE)/Encrypted Storage Engine (ESE) Oracle Server TDE SQLServer TDE MongoDB WiredTiger ESE MySQL Enterprise TDE
  4. Current Market - Microsoft/Azure Transparent Data Encryption (TDE; server-side) Always

    Encrypted engine (AE; client-side) Deterministic Randomized SGX enclave encryption
  5. Current Market - CryptDB (Popa et al) - Google Encrypted

    BigQuery CMKs - delegated - Oracle TDE with table- & column-level encryption
  6. Current Market - MongoDB Wired Tiger ESE Atlas (BYOK w/

    AWS KMS, Azure Vault, GCP KMS) Enterprise (native KMIP w/ HSM)
  7. Broken Promises - Histograms & statistics views: DBA vs. DBA

    - (some) format-preserving encryption - (some) deterministic encryption - Tokenization - Cloud Access Brokers
  8. Broken Promises - Histograms & statistics views: DBA vs. DBA

    - (some) format-preserving encryption
  9. Broken Promises - Histograms & statistics views: DBA vs. DBA

    - (some) format-preserving encryption - (some) deterministic encryption - Tokenization - Cloud Access Brokers
  10. Your threat model is wrong, but your database is worse

    - Breaking next-gen crypto in 2018 with 9th century frequency analysis Inference attacks on property-preserving encrypted databases Wright, Naveed, Kamara - Logs, diagnostics, in-memory structures, oh my! Why your database is not secure Grubbs, Ristenpart, Shmatikov
  11. Thinking beyond naive on/off key rotation lifecycle: Lessons from Google

    & Amazon scaling AWS key management service (KMS): Handling cryptographic bounds for use of AES-GCM Campagna & Gueron (Amazon) Achieving high availability in the internal Google key management system Kanagala, et al (Google)
  12. First Principles - Threat model-driven design - My game over

    is not your game over - RAM is the achilles heel of confidentiality - Snapshot attackers will usually win, but you probably already lost - Thinking through zero knowledge
  13. First Principles - Sane defenses - Rate-limiting - Segmentation -

    Partial views/visibility (excellent use case for rational encryption) - Real time anomaly detection & response
  14. "Of course you'd use sane key management & identity access

    policy." — Cryptographers "We need to give all of Finance, Accounting, HR, and Helpdesk the key." — Senior Management "This web app has [select * from *] & a hard-coded HSM API token." — Production Ops
  15. If your security sucks now without identity management, you'll be

    pleasantly surprised by the lack of change with encryption.
  16. First Principles Game out your own attacks before the bad

    guys do it for you "You're on the Internet. You're already getting the pen test, just not the report" — Zane Lacke
  17. Emerging - Secure enclave hardware - Geo-attestation/location assurance - Instance-based

    identity/temporary credentials - Sane FDE & key management - Homomorphic encryption - Attribute-based (multi-party) encryption
  18. Recommended Reading • Microsoft Always Encrypted engine overview • Oracle

    Column-Mode Transparent Data Encryption • Deterministic & randomized encryption modes • Guidelines for Using the CryptDB System Securely (Popa et al) • Outsourcing the Decryption of ABE Ciphertexts • Searchable Symmetric Encryption. Kamara & Moataz • Inference Attacks on Property-Preserving Encrypted Databases (MSR) • Adrian Colyer analysis on Grubbs et al • Searchable Symmetric Encryption Implementation: Clusion (Kamara Lab)
  19. Black Hat Sound Bytes - Most encrypted database security models

    are weak/underspecified - Encrypted DB disks protect against eBay & Craigslist attacks, not Amazon, Microsoft, Google (and, only minimally, their customers) - You may have to think about: court orders/discovery and motivated advanced attackers - You do have to think about key surface/exposures, AppSec, SQLi, bearer tokens, API intercepts, backups, logs, sysadmins, DBAs...