Steps to get Hack the Box Invite Code

If you are someone who is interested in penetration testing but don’t want to put yourself in risk then you should definitely try out HackTheBox. Hack The Box is an online platform which allows you to test your cyber security skills. The platform has different sets of challenges which you need to solve and its completely legal to hack. But to sign up into the platform you need an invite code. Getting Hack the box invite code is itself a challenge. As the platform as many different levels of challenges it helps in improving your skills. You should definitely check out the website.

In this article we will see steps to get Hack The Box invite code. But I would highly recommend you to first try it out yourself and if you fail only then check this guide . If you directly follow the steps mentioned in this post to get the invite code for Hack The Box then you won’t learn the process.

So with that disclaimer lets get started.

TIP : Click on the images to see it clearly.

Step 1 : Visit the official Hack The Box website and look for the join button and click on it

After clicking on the join button you will be redirected to . This is the box where you need to enter the invite code to signup.

Step 2 : Right click on the Invite Code box and choose Inspect Element option.

Step 3 : After clicking on the Inspect Elements option by default it will go to the Elements Tab. In the Elements Tab search for a script with its source as /js/inviteapi.min.js

Step 4 : Now visit and read the JS file.

Here we see MakeInviteCode and this one will be helpful to us.
Step 5 : Now go back to . Here we will try to find the content of makeInviteCode . To do this go to the console tab and type makeInviteCode() and press enter.

 After pressing enter you will get a 200 Success status and data.

In this case the encoding type of the data is BASE64. Sometimes it uses a different encoding too like ROT13.
Step 6 : Now use any online decoder to decode the data. Since in my case it is BASE64 so I’ll use a BASE64 decoder.

After decoding the BASE64 data we get to know what to do next.
Step 7 : Now to generate the Hack The Code Invite Code we need to make a POST request to /api/invite/generate.
If we simply put the URL in the browser we won’t be able to get the data as by default browser don’t make POST request. So in order to make a POST request you can either use CURL or any browser plugin.


In this example I have used a firefox extension called HTTP request maker .

Step 8 : Now open the extension and make a POST request to


Now we have the invite code but it is encoded. This time they have not said which encoding is being used so here we need to try one by one.


Step 9 : We will try different decoding techniques. In my case i tried BASE64 decoding. You can search in google as decode BASE64 online and you will get many tools.

 So finally we got the invite code that is needed to sign up in Hack The Box.


Step 10 : Now go back to and paste the invite code in the box and click on signup

Once you click on the sign up button you will get a registration form. Fill it up and click on sign up.
Inside the Hack The Box you will find various challenges which you can try. All the best ???


Some Must Try Hack The Box Machines

After you have signed up . You need to first connect  your machine using openVPN and once you are connected you can try out your skills on various machines. There are all types of machines which you can select. You can filter on the basis of OS type, difficulty etc.

Hack The Box Machines

Here are the list of some of the Hack the Box machines which you should definitely try out :

Windows Machines

  • Blue
  • Bounty
  • Devel
  • Jerry
  • Netmon
  • Optimum

Linux Machines

  • Poison
  • RedCross
  • Sunday
  • Canape
  • CronOS
  • FriendZone
  • Frolic
  • Haircut
  • Help
  • Jarvis
  • Lame
  • OpenAdmin