Password cracking rigs are expensive and sometimes not utilized a lot. One way to be able to still crack passwords is to use AWS. This project utilizes terraform to spin up infrastructure quickly, crack the passwords, cat it out, and destroy the infrastructure.
Setup Password Bucket
In order to save time on getting the instance spun up we rely on an S3 bucket to store your password list(s). The module will create the S3 bucket based on your input, upload the files, create an IAM user/group, and generate bucket credentials to use in the instance. This module only needs to be ran once, it can be ran multiple times to upload different files. If you have an S3 bucket and IAM credentials you can skip this step.
- Place your files in the S3/files directory (I have included two as an example).
- Edit S3/modules/S3/files.tf to add each file in the above step.
- Edit S3/cloudbucket.tf, change bucket-name/directory-name to something unique
- Run terraform in the S3 directory, terraform apply
Once terraform is done, make note of the ID and secret in the terminal this is needed for the EC2 deployment.
Setup EC2 Password Cracker
Terraform will spin up the instance, install hashcat, copy over the password/fuse conf for the S3 bucket connection, place it in the correct directories, copy over the crackme, and run hashcat. Once hashcat is completed, the cracked.txt file will be cat to the terminal.
- Edit Cloud_crack/config/passwd-s3fs file, place the ID and secret from the S3 bucket section.
- Edit Cloud_crack/crack/crackme.txt
- Place SSH key or Generate one in ssh_keys directory. The private key needs to be named ec2_host_key and public key ec2_host_key.pub. There is a Powershell script that will generate a key in Cloud_crack\scripts\Gen-keys.ps1
- Edit Cloud/cloudcrack.tf file:
- Change instance if desired
- Change hash_op to hash cat options you are going to use or specify in the command line *if you forgot the options check Cloud_crack/README.md
- Change word_lists to the names of the files in your bucket
- Change bucket_name to the name of the bucket in the S3 module
- Run Terraform: terraform.exe apply -var "hash_op=-m 5600" & terraform.exe destroy