Skip to content

Instantly share code, notes, and snippets.

@gwillem
Created December 15, 2016 23:46
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save gwillem/e5d606fe235bc760b42837afee482bc3 to your computer and use it in GitHub Desktop.
Save gwillem/e5d606fe235bc760b42837afee482bc3 to your computer and use it in GitHub Desktop.
Get an AWS EC2 p2.xlarge ready for hashcat MD5 cracking!
ssh -i keyfile.pem ubuntu@<ip>

sudo apt -y update && sudo apt -y upgrade
sudo apt install -y p7zip-full build-essential linux-image-extra-virtual linux-source

echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf
sudo update-initramfs -u

# to activate latest kernel
sudo reboot 

ssh -i keyfile.pem ubuntu@<ip>
sudo apt install linux-headers-`uname -r`

sudo mkdir -p /data
sudo chown ubuntu /data
cd /data

# latest driver here: http://www.nvidia.com/object/unix.html
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/375.26/NVIDIA-Linux-x86_64-375.26.run
chmod 755 NV*.run
sudo ./NV*.run
# accept license, install, enter, enter

lsmod | grep nvidia
# if not loaded, do extra reboot

# optimizations from AWS blog
sudo nvidia-smi -pm 1
sudo nvidia-smi -acp 0
sudo nvidia-smi --auto-boost-permission=0
sudo nvidia-smi -ac 2505,875

# a high quality compact wordlist
wget http://downloads.skullsecurity.org/passwords/phpbb.txt.bz2
bzip2 -d phpbb.txt.bz2

wget http://hashcat.net/files/hashcat-3.20.7z
7za x hashcat-3.20.7z
ln -s hashcat-3.20 hashcat
cd hashcat
ln -s hashcat64.bin hc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment