Lab 5 Password Cracking 2018 v5.10 Temple
Lab 5 Password Cracking 2018 v5.10 Temple
Install VirtualBox
IP Address Machine
192.168.55.100 Windows 10 VM
192.168.55.101 Kali Linux VM
I have configured the virtual machines in the class to be on the same virtual network so that they
have internet access and so that they can talk to one another. However, you must initialize the
VirtualBox network after you install VirtualBox.
If you haven’t already done with in connection with Lab 2, do the following:
You can test whether this step was successful by navigating to Virtuabox > File >
Preferences > Network, where you should see “infosec-net” in the list of networks. If you
don’t see that network, then you can manually create the network from this dialog prompt
by clicking the plus and using the following options.
Enable Network: “checked”
Network Name: “infosec-net” (case-sensitive!)
Network CIDR: “192.168.55.0/24”
Network Options:
Like this:
https://www.dropbox.com/s/r93i8o7ibs43yeq/Kali%20Lite
%20x64%202018.ova?dl=0
You can check how much RAM you have installed on your laptop
on Windows searching for and running the “System Information”
app, and look at how many gigabytes are listed next to “Installed
physical memory.”
On a Mac, you can check how much RAM you have installed on
your laptop by going to the menu, selecting “About this Mac,”
and look at how many gigabytes are listed next to “Memory.”
https://www.usenix.org/conference/usenixsecurity16/technical-
sessions/presentation/wheeler
Try out some passwords to see if they have already been compromised
in a data breach.
Question: What is the name of the service you set up for 2FA?
gunzip rockyou.txt.gz
Note: If you want, you can install Hashcat on your host computer,
where you'll get massive speed improvements. Hashcast needs to be
able to directly interface with the CPU/GPU in order to perform at a
high level—it can’t so as well in a virtualized environment.
Cracking in Hashcat
1. On your Kali machine, open up a terminal and navigate to your home directory (/root/).
2. Hashcat uses a command-line interface. To see available options and syntax, type:
hashcat --help
wget https://anthonyvance.com/files/hashcat.doc
wget https://anthonyvance.com/files/office2john.py
5. In the output you’ll see the name of the file followed by the type. The type is shown with
a $ at the beginning and end of it. You’ll need to copy the type and everything until “:::”.
For example, the hash looks like the following, all on one line:
$oldoffice$1*04477077758555626246182730342136*b1b72ff351e41a7c68f6b45c4e938bd6*0d95331895
e99f73ef8b6fbc4a78ac1a
Or alternatively, if you prefer to do it without making an input file, put the hash string
right in the terminal, surrounded by single quotes:
7. Refer to the benchmark output for a Brutalis. (Running benchmark on your own
machines is breaking on scrypt for some reason.). Units are expressed as (unit)H/s, or
hashes per second, thusly.
Question: How much slower is Hashcat in cracking .doc MS Office documents (option
9700, “<= 2003 $0|$1, MD5 + RC4”) compared to Office 2013 documents (option
9600)?
Question: How does an offline password attack compare with the online hydra attack
you attempted earlier?
Part 6. Cracking Linkedin Hashes Using Hashcat
In this section, you’ll see how many hashes you can recover from the 2016 LinkedIn password
breach. This breach of 177,500,189 unsalted SHA1 password hashes represents the data of all
LinkedIn users as of 2012. Among these passwords, only 61,829,207 are unique.
However, in interest of your time, this section will require you to crack only 500,000 of these
passwords. After you complete this lab, you’re welcome to crack all of the LinkedIn hashes. Ask
me for a copy.
1. Download a copy of the file LinkedIn_HalfMillionHashes.txt (also available here), all on
one line:
wget https://anthonyvance.com/files/LinkedIn_HalfMillionHashes.txt
2. Open a terminal. To get your feet wet, perform a straight dictionary attack using the
rockyou.txt wordlist again, as follows (one line):
Note: This command may take 5–10 minutes to run. To see the status of a running job in
Hashcat, press the “s” key (it might take up to 15 seconds for Hashcat to report its status).
Note: These commands use the --remove flag. This will remove cracked hashes from the
input file. So, if you run these commands more than once without changing anything, it
won't crack anything after the first time.
Hashcat will report how many passwords it “recovered” when it finishes. You can always
count the number of lines in your outfile (LinkedIn_cracked.txt) to see how many you’ve
cracked so far, total:
wc -l LinkedIn_cracked.txt
Or count the number of passwords left (it started with half a million):
wc -l LinkedIn_HalfMillionHashes.txt
To see hashes cracked in real time, in another terminal shell, type the command: tail -f
LinkedIn_cracked.txt. Type control+c to exit the tail command.
Question: How many passwords were you able to recover using this command?
3. Run another attack that uses a rules-based method (one line):
Rules apply common patterns to password dictionaries to crack even more hashes. You
can read about rules in Hashcat here: https://hashcat.net/wiki/doku.php?
id=rule_based_attack.
The “best64.rule” is one of the most effective sets of Hashcat rules. It is continually
refined using input and testing from the password cracking community. You can view the
contents of the best64.rule here:
https://github.com/hashcat/hashcat/blob/master/rules/best64.rule
You can read an explanation of these set of rules here:
http://kaoticcreations.blogspot.com/2011/09/explanation-of-hashcat-rules.html
Question: How many additional passwords were you able to recover using this rules-
based attack?
Optional: Experiment with other rules found in /usr/share/hashcast/rules.
4. Run another attack that uses a hybrid method that uses a dictionary attack combined with
a “mask,” which is a pattern that is appended to each password in the password
dictionary:
The “?d?d” at the end means to append two digits between 0–9 each at the end of each
password in the rockyou.txt password dictionary.
Question: How many passwords were you able to recover using this hybrid attack?
If you would like to try using a different character set for your mask, you can use the
following masks below. Note that each mask below is for one character. If you wanted to
test four digits at the end of each password, the mask would be: ?d?d?d?d.
?l = abcdefghijklmnopqrstuvwxyz
?u = ABCDEFGHIJKLMNOPQRSTUVWXYZ
?d = 0123456789
?s = !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
?a = ?l?u?d?s
?b = 0x00 - 0xff
Optional: Want even more practice? You can download the massive
Troy Hunt "Have I Benn Pwened" SHA1 password hash list on the
bottom of this page.
Imagine that you exfiltrated the following MD5 hash from a database
on neurosecurity.byu.edu:
cf4aff530715824c055892438a1ab6b2
Where:
“v” runs CeWL in verbose mode.
“d” is the depth to “spider” or crawl the website
“m” is the minimum word length
“w” “custom_dict.txt” is the name of your new custom wordlist
or dictionary.
wc -l custom_dict.txt
less custom_dict.txt
wc -l custom_dict.txt
6. Run Hashcat using custom_dict against the MD5 hash (all one
line):
Learn more:
Amazon: http://a.co/d/fTtI7DF
http://arstechnica.com/security/2013/03/how-i-became-a-
password-cracker/
Official Hashcat documentation: http://hashcat.net/wiki/