TryHackMe: Authentication Bypass a Walkthrough

Jasmine Parks
6 min readMar 26, 2022

This is a step-by-step walkthrough of TryHackMe’s Authentication Bypass room, with screenshots.

Task 1: Brief

Question 1: No answer needed

TryHackMe Screenshot

Task 2: Username Enumeration

Question 2: What is the username starting with si***
Per THM: simon

Make sure to make the file valid_usernames.txt (here I used usernames.txt, but it will work either way).

TryHackMe Screenshot

Use cat usernames.txt (or valid_usernames.txt) to reveal the usernames associated with this site.

TryHackMe Screenshot

The screenshot below is what this file looks like in nano. As you can see there is a lot of extra information. We are going to have to account for this in the next task.

TryHackMe Screenshot
TryHackMe Screenshot

Question 3: What is the username starting with st***?
Per THM: steve

TryHackMe Screenshot

Question 4: What is the username starting with ro****?
Per THM: robert

TryHackMe Screenshot

Task 3: Brute Force

For the following question, I had a lot of problems figuring it out. After researching in the forum, I found that some adjustments needed to be made to the usernames.txt file to make the ffuf command work.

TryHackMe Forum Screenshot

First, I deleted my original usernames.txt file (or in your case, it might be the valid_usernames.txt file). I used nano to create a new usernames.txt file and added the names: admin, steve, simon, and robert into it.

TryHackMe Screenshot
TryHackMe Screenshot

Then, I ran the code to brute force the passwords combined with the known usernames, using this command:

ffuf -w usernames.txt:W1,/usr/share/wordlists/SecLists/Passwords/Common-Credentials/10-million-password-list-top-100.txt:W2 -X POST -d “username=W1&password=W2” -H “Content-Type: application/x-www-form-urlencoded” -u http://[machine_IP_address]/customers/login -fc 200

TryHackMe Screenshot

With the altered file, I was able to finally find the working password and username.

TryHackMe Screenshot

Question 5: What is the valid username and password (format: username/password)?
Per THM: steve/thunder

TryHackMe Screenshot

Task 4: Logic Flaw

Open up the Acme IT site at: http://[MachineIP]/customers/reset

TryHackMe Screenshot

Enter the email address robert@acmeitsupport.thm into the email field and click “Check Email”. This will send the reset request.

TryHackMe Screenshot

Copy and paste the first curl command into the command line in your terminal.

TryHackMe Screenshot

Create an account, per the instructions. Then run the second curl command, using your created email address:

TryHackMe Screenshot

You will want to replace {username} with the username you created.

TryHackMe Screenshot
TryHackMe Screenshot

Then log in using your new credentials.

TryHackMe Screenshot

Once logged in, click on Support Tickets, where you will see an open ticket. Click on the 3 to open the ticket.

TryHackMe Screenshot

You will see a reset link to reset Robert’s password.

TryHackMe Screenshot

Copy and paste that link into the browser’s URL bar, which will take you to the page below.

TryHackMe Screenshot

Click on Support Tickets. This will show one open ticket, click on the “1” to view the ticket.

TryHackMe Screenshot

This will reveal the flag.

TryHackMe Screenshot

Question 6: What is the flag from Robert’s support ticket?

TryHackMe Screenshot

Task 5: Cookie Tampering

Question 7: What is the flag from changing the plain text cookie values?

Copy and paste the first curl command into the command line. This will render the result: Not Logged In.

TryHackMe Screenshot

Copy and paste te second curl command into the command line.

TryHackMe Screenshot

This will log you in as a user.

TryHackMe Screenshot

Next, use the curl command in the screenshot below

TryHackMe Screenshot

This will log you in as an admin and reveal the flag.

TryHackMe Screenshot
TryHackMe Screenshot

Question 8: What is the value of the md5 hash 3b2a1053e3270077456a79192070aa78 ?

You can navigate to crackstation.net and enter the hash. Click the “I’m not a robot” box. Click “Crack Hashes”. This will give you the value of the hash.

TryHackMe Screenshot
TryHackMe Screenshot

Question 9: What is the base64 decoded value of VEhNe0JBU0U2NF9FTkNPRElOR30= ?

For this, I went to CyberChef and entered the base64 code. This will reveal the flag. Note: there are many ways to go about decoding this.

You can also create a file with nano and enter the base64 code into it.

Then use base64 -d [name of file containing base64 code]

TryHackMe Screenshot
TryHackMe Screenshot

Question 10: Encode the following value using base64 {“id”:1,”admin”:true}

For this, I googled a way to decode base64. I entered the above string and click encode.

TryHackMe Screenshot
TryHackMe Screenshot

Thank you for reading. If you think I bring you value, please clap and subscribe for more content.

--

--