Hack The Box or abbreviated as hackthebox, is an uncanny pentesting labs portal which allows everyone to collaborate, share and encourage people who are enthusiastic all about ethical hacking or pentesting. It offers an online platform to test and advance your skills in penetration testing and cyber security.
We can access this portal at https://www.hackthebox.eu/. Nevertheless, to get into this platform is not straightforward like others website which we can sign up easily. hackthebox made it a littlebit funny. Here we will explain to you how to get the invited code in order you can sign up and play the platform.
Firstly, open https://www.hackthebox.eu/invite. Then push F12 to open the inspect element view.
Point the cursor at the box “invited code”, then you will see at the inspect element windows, “/js/inviteapi.min.js”. Copy the link and open at the new tab.
The result of deobfuscated the script, we get the function for generating the invited code is “makeInvitedCode()”. Then, type the function through the inspect element windows.
Take a look the response after running the function below:
Hence, we get the encoded string which is the ROT13 encoded. So, we decode the string using the online tools like http://cryptii.com.
The message of the encoded string is we have to generate the invite code by making a POST request to http://hackthebox.eu/api/invite/generate like below:
The last, we decode the encoded string (base-64) to get the invited code.
For the tutorial video, you can check through this youtube channel.