Slide 1

Slide 1 text

Encrypting the Cloud • We're going to be talking about storage • Assuming you're already doing transport

Slide 2

Slide 2 text

Why encrypt? • Loss of physical control • Insider attack vector • Cloud provider breach • State actors / Lawyer attacks

Slide 3

Slide 3 text

At the file system / volume level dm-crypt - ext4/dmcrypt/device # cryptsetup -y luksFormat /dev/sda5 # cryptsetup luksOpen /dev/sda5 storagesecure # mkfs.ext4 -j /dev/mapper/storagesecure # mount /dev/mapper/storagesecure /home/securestorage - ext4/lvm/dmcrypt/device # cryptsetup -y luksFormat /dev/sda5 # cryptsetup luksOpen /dev/sda5 sda5_crypt # pvcreate /dev/mapper/sda5_crypt # vgcreate storage /dev/mapper/sda5_crypt # lvcreate -l 100%FREE storage -n secure # mkfs.ext4 -j /dev/mapper/storage-secure # mount /dev/mapper/storage-secure /home/securestorage

Slide 4

Slide 4 text

Some problems with this • Dealing with reboots – We can't store passphrase on server – Remote intervention (automated or manually) • Recovering the key – If we can snapshot memory, we can scrap for key'ing data • Research on the specifics is public • Look for crypt_config struct in memory dump

Slide 5

Slide 5 text

Can we make our database do this? • MySQL supports symmetric encryption mysql> insert into foobar values(1, AES_ENCRYPT('plaintext', SHA2('passphrase', 512))); mysql> select AES_DECRYPT(data, SHA2('passphrase', 512)) from foobar where index=1; • Protecting the passphrase is important – Store passphrase in tmpfs? – Use users password?

Slide 6

Slide 6 text

Asymmetric approaches • Data stored using public key – PHP supports GnuPG gnupg_addencryptkey($resource, "keyfingerprint"); $ciphertext = gnupg_encrypt($resource, "clear text"); • Data retrieved using private key – OpenPGP.js with local key storage – Separate local web server instance

Slide 7

Slide 7 text

What about backups to the cloud? • Bacula supports data encryption PKI Signatures = Yes PKI Encryption = Yes PKI Keypair = "/etc/bacula/my-local-keypair.pem" PKI Master Key = "/etc/bacula/my-master-certificate.crt" • Duplicity has GnuPG support --encrypt-key key-id

Slide 8

Slide 8 text

We need to think about this issue more. Not enough discussion on this. • Follow me @jzsavoie • XMPP [email protected] • Questions, Angry Rants?