How To Get Hack The Box Invite Code

Hack The Box is an online platform that allows you to test and advance your skills in Penetration Testing and Cyber security. This platform contains many challenges which are regular updated so that you can test your skills on new & advance security .



How To Join Hack The Box

To join HackTheBox , Visit https://www.hackthebox.eu/invite. You can see they are asking for invite code. Without entering correct invite code , Your account can't be registered there.


Wait - They are challenging us. 'Hack this page to get your invite code!'. NICE :)

Lets Start Hacking


Open Chrome’s Developer tools By Right Click -> Inspect Element or CTRL + Shift + I




Here is something interesting. The highlighted code indicated us that this might be invite code generation script. Open it by opening https://www.hackthebox.eu/js/inviteapi.min.js 



Here 'makeInviteCode' looks like this function is responsible for generation of invite codes. Go back to the HackTheBox Invite Code's Console , paste this code and execute it by pressing enter button
Note : This is function , so add () after makeInviteCode , the final code will be makeInviteCode()




As you can see , we got a data with some value and its encryption type is BASE64'. 
To decrypt the data , we need a tool / website that decrypt BASE64

Go to https://www.base64decode.org/ enter the data value , and click on decode button.



 
The decrypted text is 'In order to generate the invite code, make a POST request to /api/invite/generate'

So we need to pass 'POST' request to provided address.

You can pass this request in both Windows & Linux OS. I am going to pass it online by using some website.

Goto https://reqbin.com/ and enter https://www.hackthebox.eu/api/invite/generate in parsing testbox , choose request as POST using dropdown menu and click on Send button




So we got the code with status code 1 [success]. Copy this code & decode it from BASE64 decoder.


Here is our code. Enter this code in HackTheBox invite code textbox and signup




The code is correct & you can now signup.