Monthly Archives: June 2012

Cracking sha1 on Amazon EC2

Today I spent some time testing the speed of the Cluster GPU instances (cg1.4xlarge) of Amazon EC2.

Install ec2-ami-tools, and the environment variables appropriately. You can find more details at AWSEC2 User Guide
JAVA_HOME=/usr/lib/jvm/java-6-openjdk
EC2_HOME=/usr/local/ec2-api-tools
EC2_URL=https://ec2.us-east-1.amazonaws.com
EC2_PRIVATE_KEY=/root/.ec2/pk-foo.pem
EC2_CERT=/root/.ec2/cert-foo.pem

For this test I used the AMI image called: amzn-ami-gpu-hvm-2012.03.1.x86_64-ebs (ami-fd65ba94)

Replace “your-key” with the name assigned to your ssh keys in the AWS Management Console under “Key pairs”.

ec2-run-instances –key “your-key” –instance-type cg1.4xlarge –availability-zone us-east-1a ami-fd65ba94

Now let’s try to crack the password “AAAAAAA”:
echo -n AAAAAAA|sha1sum -|cut -d ‘ ‘ -f 1 | tr [a-f] [A-F] >/tmp/crack-me.txt
yum upgrade
yum install nvidia-gpu-sdk
reboot
modprobe nvidia
cd /usr/local/src
wget http://downloads.sourceforge.net/project/cryptohaze/Cryptohaze-Linux_x64_1_31a.tar.bz2
tar jxvf Cryptohaze-Linux_x64_1_31a.tar.bz2
cd Cryptohaze-Linux
./Cryptohaze-Multiforcer -h SHA1 -c charsets/charsetall -f /tmp/crack-me.txt

Make sure that crack-me.txt contains a list of SHA1 hashes, one per line and uppercase.

I got an average of 650 million/s tries on the cg1.4xlarge instance. YMMV.

Share