Hack The Box: How to get invite code?

Hack the box is an online platform that helps you to test and develops your skills in penetration testing and cybersecurity.

Steps to Find Invite Code

1. Now if you get in there you see there is the Join Now option there. Now click on that. You see to sign up it needs an invitation code. But you don’t have an invitation code. How to get into hack the box.

2. Nowhere on the screen, Right-click on the page, and open inspect element. Otherwise, press Ctrl+Shift+I to open the Chrome Developers Tools.

3. Go through the Elements tab and you will eventually find a script with its source as /js/inviteapi.min.js.

4. Here right-click and click open in the new tab. With this new information, we go back to the previous site to try and find the contents of makeInviteCode.

5. Go to the Console tab and type makeInviteCode() and then press Enter. You will get a 200 Success status and data as shown below:
In my case, the encoding type of the data is ROT13. Hack The Box also uses BASE64; therefore don’t fret if our encoding types are different.

6. It’s time to decode the message we have. Copy the contents of data and search online for a ROT13 decoder. In my case, I personally used Google search results.
  • Paste the data on the text box.

In order to generate a valid Hack The Box Invite Code, we have to make a POST request to /api/invite/generate.

7. Here we need Linux. Fire up your terminal and make a POST request by typing:

8. We now have an invite code, but there’s a catch, it’s encoded. Let’s try decoding again. Copy the text from here.


9. Paste the code you got as a result of the POST request into the textbox. Finally, paste the Invite Code you got into the text box and click on Sign Up.

10. You can now easily register as a user of Hack the Box just by typing user name, email, and password. In the end, you have to verify.

  • Click the link on your email and you are getting into the hack the box.

Post a Comment

If you have any doubts or any queries you can specify here.

Previous Post Next Post