cudaHashCat 1.21.7 on EC2 Setup Tutorial (Cloud Hash Cracking 2014)
Recently, I needed to crack some hashes fast, and without any extra hardware, I took a look at EC2.
There were some really great tutorials out there, and some even better scripts that automated the process.
Finally you should be able to bench mark it using:
You will probably want some wordlists for your cracking, I've assembled a collection of wordlist collections here, with a little bit on creating customized wordlists.
And best of all, it works :) Here's cracking some MD5(Unix) passwords, and here's to cracking more!
There were some really great tutorials out there, and some even better scripts that automated the process.
My problem with the script, is that it dosn't work for the current version of HashCat (this is due to the hardcoded driver versions, and hashcat only offers the new version on their site) .. So I've made an updated tutorial that works at the time of writing (although it also has hardcoded driver versions, and one day may stop working). So let's fire up AWS, and get into our EC2 console.
Under the 'Instances' tab, click 'Launch Instance', then select 'Community AMIs', and search for 'ami-4fad7426'. 'Select' the instance, then check 'GPU instances', type 'g2.2xlarge', then click 'Review and Launch'. You will probably want to check the 'Storage', and increase the root drive to something a little lager than 8gigs, you will probably want to store some wordlists on the disk. Launch it then you should be able to log in as 'ubuntu' with your select ssh key.
Next, run the following upgrade script, and please let me know if you have any issues.
sudo do-release-upgrade
sudo apt-get update
sudo apt-get install gcc g++ build-essential linux-headers-`uname -r`
sudo apt-get install freeglut3 freeglut3-dev p7zip-full
wget http://developer.download.nvidia.com/compute/cuda/5_5/rel/installers/cuda_5.5.22_linux_64.run
chmod a+x cuda_5.5.22_linux_64.run
sudo sh ./cuda_5.5.22_linux_64.run —verbose
sudo echo "PATH=\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/bin/cuda\"" | sudo tee /etc/environment
sudo echo "/usr/local/cuda/lib64" | sudo tee -a /etc/ld.so.conf.d/cuda.conf
sudo echo "/usr/local/cuda/lib" | sudo tee -a /etc/ld.so.conf.d/cuda.conf
sudo ldconfig
cd /usr/local/cuda/samples/1_Utilities/deviceQuery
sudo make
sudo ./deviceQuery
cd ~
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/340.32/NVIDIA-Linux-x86_64-340.32.run
chmod +x NVIDIA-Linux-x86_64-340.32.run
sudo ./NVIDIA-Linux-x86_64-340.32.run
wget http://hashcat.net/files/cudaHashcat-1.21.7z
7za x cudaHashcat-1.21.7z
Finally you should be able to bench mark it using:
./cudaHashcat64.bin -b
You will probably want some wordlists for your cracking, I've assembled a collection of wordlist collections here, with a little bit on creating customized wordlists.
And best of all, it works :) Here's cracking some MD5(Unix) passwords, and here's to cracking more!
./cudaHashcat64.bin -m 500 -a 0 ~/hashes/md5.unix.txt ~/wordlists/rockyou.txt
Session.Name...: cudaHashcat
Status.........: Exhausted
Input.Mode.....: File (/home/ubuntu/wordlists/rockyou.txt)
Hash.Target....: File (/home/ubuntu/hashes/md5.unix.txt)
Hash.Type......: md5crypt, MD5(Unix), FreeBSD MD5, Cisco-IOS MD5
Time.Started...: Sat Aug 16 01:59:39 2014 (3 mins, 26 secs)
Time.Estimated.: 0 secs
Speed.GPU.#1...: 75697 H/s
Recovered......: 4/9 (44.44%) Digests, 4/9 (44.44%) Salts
Progress.......: 129089664/129089664 (100.00%)
Skipped........: 55538172/129089664 (43.02%)
Rejected.......: 9/129089664 (0.00%)
HWMon.GPU.#1...: 0% Util, 64c Temp, -1% Fan
Started: Sat Aug 16 01:59:39 2014
Stopped: Sat Aug 16 02:03:08 2014