Page cover

πŸšͺCorridor CTF | TryHackMe

CTF Writeup / Walkthrough for Corridor | Can you escape the Corridor?

Can you escape the corridor?
IDOR
Web
Security

Let’s add the target IP to our host file, in /etc/host

I always make the IP as target.local in /etc/host so that I don’t have to type IP address all the time when engaging for example: in /etc/host I have the following

Initial Recon

We will use N-map and Directory enumeration to get an initial overview of the target

since we are doing a stealth scan we need to use sudo

Command Parameter’s Explanation :

The following should be the expected output

Let’s see if there are any UDP Ports that are available for us

If we visit target.local it seems that the website only consists of pictures with links, which looks very similar to hashes

A quick one-line bash command will give us the list of all hashes that are available in that particular page

Let’s Check what kind of hash is being used

Use this tool :

Hash Type Identifier - Identify unknown hashes

Attack Phase

Let's use John to crack the hash or you can use the online decrypter such as

https://hashes.com/en/decrypt/hash

Let’s find the missing number, we can use a simple python program that will allow us to generate a missing number from here

We have 14 as an output, let's convert it to an md5 hash :

Delivery Phase

Let’s use the hash in the URL

We seem to hit a dead end here 😞

dead end!

To solve this, let's use a hash of number 0 or -1, a common concept within the IDOR Vulnerability realm that the admin account id is mostly 0 or -1 or 1

let's encode 0 as an md5 hash

Exploitation

Now visit the URL you got: http://target.local/cfcd208495d565_redacted

We should now have the flag : REDACTED_FLAG

flag

Thanks for reading, hope you learned something new 😎

Last updated

Was this helpful?