hack the box

How to Get Hack The Box Invite Code 

What is Hack The Box

Hack The Box is an online platform allowing you to test your penetration testing skills and exchange ideas and methodologies with thousands of people in the security field.

But, a limitation of this site you need to invite code for make a account on HTB or Hack The Box.

How to do this?????? You need to Hack the Site and find Invite Code.

Step – 1

First Visit the Hack The Box official site https://www.hackthebox.eu/  and read content of this site you will find JOIN link, click them.

Click on JOIN NOW,

Now, it will ask Invite code for Sign Up. Don’t worry I will Help you , follow given steps one by one.

Step – 2

Right click and open Inspect Element or Press ‘Ctrl + Shift + I’ in Chrome or Firefox both are same shortcut.

Click on element tab and find a line like this ‘<script defer=”” src=”/js/inviteapi.min.js”></script>’

Step – 3

Now, go to https://www.hackthebox.eu/js/inviteapi.min.js  you will see a js like this.

Unreadable words, you will see there something interesting word ‘makeInviteCode’ 

Again go to invite code page in step 2 and inspect element , click on console and type makeInviteCode as a function ‘makeInviteCode()’ press enter

You will get a success message. 

Step – 4

Now, click on arrow you will get some data in encrypted form that is ‘BASE64’ 

Let’s decode the message 

https://www.base64decode.org/

Step – 5

So. We can see in decoded output ‘In order to generate the invite code, make a POST request to /api/invite/generate’

Open  command prompt and make a POST request by type this command

curl -XPOST https://www.hackthebox.eu/api/invite/generate

you will get success message like this, 

{“success”:1,”data”:{“code”:”TFBKUEUtUUxYQkgtV0hUWUQtTFpTTE0tTVpJQ0k=”,”format”:”encoded”},”0″:200}

We get a code but it is not our invite code because it again in Encrypted form as the type of BASE64

Let’s decrypt the code 

Great , we found a code Let’s check , copy it and type in place of invite code for check is it invite code or not.

Great, 

Congratulation, I Successfully get a invite code. 

Now, fill up your details and ENJOY!!!!!!

By Himanshu Saraswat

Leave a Reply

Your email address will not be published. Required fields are marked *