This is a bit of a different post for me. One exercise in the CCSK Enhanced Class which we are developing for the Cloud Security Alliance is to encrypt a block storage (EBS) volume attached to an AWS instance. There are a few different ways to do this but we decided on Trend Micro’s SecureCloud service for a couple reasons. First of all, setting it up is something we can handle within the time constraints of the class. The equivalent process with TrueCrypt or some other native encryption services within our AWS instance would take more time than we have, considering the CCSK Enhanced class is only one day and covers a ton of material. The other reason is that it supports my preferred architecture for encryption: the key server is separate from the encryption engine, which is separate from the data volume. This is actually pretty complex to set up using free/open source tools. Finally, they offer a free 60-day trial. The downside is that I don’t like using a vendor-specific solution in a class since it could be construed as endorsement. So please keep in mind that a) there are other options, and b) the fact that we use the tool for the class doesn’t mean this is the best solution for you. Ideally we will rotate tools as the class develops. For example, Porticor is a new company focusing on cloud encryption, and Vormetric is coming out with cloud-focused encryption. I think one of the other “V” companies is also bringing a cloud encryption product out this week. That said, SecureCloud does exactly what we need for this exercise. Especially since it’s SaaS based, which makes setting it up in the classroom much easier. Here’s how it works:
This is my preferred encryption model to teach – especially for enterprise apps – because it separates out the key management and encryption operations. The same basic model is the one most well-designed applications use for encrypting data – albeit normally at the data/database level, rather than by volume. I’ve only tested the most basic features of the service and it works well. But there are a bunch of UI nits and the documentation is atrocious. It was much harder to get this up and running the first time than I expected. Now for the meat. I’m posting this guide mostly for our students so they can cut and paste command lines, instead of having to do everything manually. So this is very specific to our class; but for the rest of you, once you run through the process you should be able to easily adjust it for your own requirements. Hopefully this will help fill the documentation gaps a bit… but you should still read Trend’s documentation, beacuse I don’t explain why I have you do all these steps. This also covers 2 of the class exercises because I placed some of the requirements we need later for encryption into the first, more basic, exercise:
If you are a Windows user you must download an ssh client and update your key file to work with it.
.PEM key file.In this exercise we will launch our first AMI (Amazon Machine Image) Instance and apply basic security controls.
us-east-1.ami-8ef607e7” into the Search box. You want the CentOS image.CCSK_Test1. Choose the Default security group, and availability zone us-east-1.ssh port: 22. Click Okay.yes when prompted in the terminal window. You are now securely logged into to your instance as root via ssh, authenticated with your key pair.At this point you have a basic, secure instance running with only port 22 accessible. All access is via ssh, with authentication via public key cryptography. You can also create Windows instances, although the process takes longer, and you connect with Remote Desktop and an Administrator pasword. IT can take up to 20-30 minutes for AWS to configure a Windows system and make the password accessible, but you find it on the same right-click menu, which is also available in the EC2 web console. Now we will explore IP addresses, domain names, Availability Zones, and Security Groups:
default with basic rules. Note that these rules block everything except port 22, which you just opened.https. For network, enter “0.0.0.0/0”. This opens port 443 to the entire Internet.CCSK-Encrypted. Click create.This completes the first exercise. You should now understand Access Keys, Key Pairs, Digital Certificates, Security Groups, Availability Zones, Volumes, and how to securely connect to your Instance. These specifics vary between cloud providers, but the underlying processes are very similar.
For this exercise we will use a SaaS-based encryption service, because it maps well to our recommended encryption model, and is much faster than configuring it manually. We will use the Trend Micro Secure Cloud service.
sftp -oIdentityFile=your keyfile path root@your AMI IP Address”. Windows users: use PSFTP instead (part of the PuTTY suite).put path to your certificate file /tmp/”.put path to your certificate key file /tmp/”.cd /tmp”. We will now install some prerequisite software.wget http://www.trendmicro.com/ftp/products/securecloud/c9agent-1.0.0.1261-1.i386.rpm”.wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm”.rpm -ivh rpmforge-release-0.5.1-1.el5.rf.i386.rpm”.yum -y install gcc automake autoconf libtool make e2fsprogs-devel
wget http://cryptsetup.googlecode.com/files/cryptsetup-1.0.7.tar.bz2
tar -jxvf cryptsetup-1.0.7.tar.bz2
cd cryptsetup-1.0.7
./configure
make
make install
mv /sbin/cryptsetup /sbin/cryptsetup_bak
cp /usr/sbin/cryptsetup /sbin/cryptsetup
This completes preparation of the AMI. We will come back to it after we set up the Secure Cloud proxy server.
ami-8a7782e3. This is the AMI for Secure Cloud in our Region; the documentation lists the AMI for each region.SecureCloud.CCSK_Encrypted as the name. Set /dev/sdc as the mount point. Click Save. Wait, and occasionally click Refresh. This sometimes fails for me and I need to run through the process again. If you need to do this, do not click on the device again. Click the Encrypt button instead.cd /tmp.yum install --nogpgcheck c9agent-1.0.0.1261-1.i386.rpm”.y when prompted./var/cloud9/config_main.sh1 for EC2. Then hit the Space bar to scroll through the license. At the end type yes./tmp/key file name./tmp/certificate file name.ReadOnly prompt.ReadWrite field.cd /dev. Then ls. Notice that sdc doesn’t appear.ls, and /dev/sdc should appear.For this final exercise we would like you to design and implement a secure application architecture for ResearchCorp’s content delivery platform. Rather than walking you through it exactly, use the knowledge we’ve discussed to build it out yourself. There are three main application components:
Customers enter through the portal server, which is public. New customers can sign up and information goes securely into the customer database. All content is accessed through the CDP application server and the separate CDP database. We are deliberately providing only limited information for this exercise, and the structure above might not even be optimal. Focus on the following:
Once you sketch this out, go into ElasticFox and create the proper security groups with the appropriate ports. If you have the time and inclination, you can then install instances into these locations, but that isn’t required.