Cryptography: John the Ripper: The Basics (TryHackMe)

Cryptography: John the Ripper: The Basics (TryHackMe)

·

3 min read

In this article, I will write a write-up for John the Ripper: The Basics that the Basic Terms, Setting Up John on Your System, Cracking Basic Hashes, Cracking Windows Authentication Hashes, Cracking /etc/shadow Hashes, Single Crack Mode, Custom Rules, Cracking Password Protected Zip Files, Cracking Password Protected Zip Files, Cracking Password-Protected RAR Archives, and Cracking SSH Keys with John.

  1. What is the most popular extended version of John the Ripper? Jumbo John

  2. Which website’s breach was the rockyou.txt wordlist created from? rockyou.com

the image below shows how to achieve the next questions form 3 to 10.

  1. What type of hash is hash1.txt? md5

  2. What is the cracked value of hash1.txt? biscuit

  3. What type of hash is hash2.txt? sha1

  4. What is the cracked value of hash2.txt? kangeroo

  5. What type of hash is hash3.txt? sha256

  6. What is the cracked value of hash3.txt? microphone

  7. What type of hash is hash4.txt? whirlpool

to identify the hash I used the rainbow table, Crackstation then continued to use Johnriper to crack the value using the command john —-format=whirlpool —-wordlist=/usr/share/wordlists/rockyou.txt hash4.txt

  1. What is the cracked value of hash4.txt? colossal

  2. What do we need to set the --format flag to in order to crack this hash? nt

  3. What is the cracked value of this password? mushroom

  4. What is the root password? 1234

Example Usage:

  1. What is Joker’s password? Jok3r

    after finding the hash remember to edit the file with nano then add the name before the hash you’ve found Joker:{hash}

  2. What do custom rules allow us to exploit? Password complexity predictability

  3. What rule would we use to add all capital letters to the end of the word? Az"[A-Z]”

  4. What flag would we use to call a custom rule called THMRules? --rule=THMRules

  5. What is the password for the secure.zip file? pass123

  6. What is the contents of the flag inside the zip file? THM{w3ll_d0n3_h4sh_r0y4l}

  7. What is the password for the secure.rar file? password

  8. What are the contents of the flag inside the zip file? THM{r4r_4rch1ve5_th15_t1m3}

/opt/john/ssh2john.py id_rsa > id_rsa_hash.txt

Cracking

For the final time, we’re feeding the file we output from ssh2john, which in our example use case is called id_rsa_hash.txt and, as we did with rar2john, we can use this seamlessly with John: **`john --wordlist=/usr/share/wordlists/rockyou.txt id_rsa_hash.txt`**

Practical

Now, I’d like you to crack the hash of the **`id_rsa`** file relevant to this task! The file is located in **`~/John-the-Ripper-The-Basics/Task11/`**.

  1. What is the SSH private key password? mango

Thank you for reading my article. Please leave any questions or comments on improving my learning journey and the THM challenges. We can also connect more on LinkedIn or X.

Did you find this article valuable?

Support Sharon Jebitok by becoming a sponsor. Any amount is appreciated!