✅ Password cracking

Learn different techniques to create custom wordlists from the content of a website and how to use John the Ripper or Hashcat to crack Windows or Linux passwords.

Create tailored wordlists

cewl www.example.com -m 6 -w example-cewl.txt
vim /etc/john/john.conf
Try the second half of split passwords
-s x**
-s-c x** M l Q
# Add two numbers at the end of each password
# Add two numbers at the end of each password and a special character such as $!./?

As root:

john --wordlist=example-cewl.txt --rules --stdout > example-cewl-john.txt
crunch 6 6 0123456789ABCDEF -o crunch.txt
crunch 4 4 -f /usr/share/crunch/charset.lst mixalpha
crunch 8 8 -t ,@@^^%%%
crunch <min lengh> <max length> <alphabet>

Cracking Windows passwords

john --wordlist=/usr/share/wordlists/rockyou.txt
john --rules --wordlist=/usr/share/wordlists/rockyou.txt

Cracking Linux passwords

/etc/shadow syntax:

  • $1 = MD5
  • $2, $2a, $2x, $2y, $2b = Blowfish
  • $5 = SHA-256
  • $6 = SHA-512

Using John the Ripper (as root)

unshadow passwd.txt shadow.txt > unshadowed.txt
john --rules --wordlist=/usr/share/wordlists/rockyou.txt unshadowed.txt

Using Hashcat (as root)

Straight attack for MD5:

hashcat -m 0 -a 0 /root/hashes.txt /usr/share/wordlists/rockyou.txt

Combination attack for MD5:

hashcat -m 0 -a 0 /root/hashes.txt /usr/share/wordlists/rockyou.txt

How useful was this post?

Click on a star to rate it!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?