Hack The Box: How to get invite code

About Hack The Box Pen-testing Labs

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. Click below to hack our invite challenge, then get started on one of our many live machines or challenges.

An online platform to test and advance your skills in penetration testing and cyber security.

STEP1:

GO to browser and open the website hackthebox.com

https://www.hackthebox.eu/

Step 2:

After opening the site you will get the site like this,and click right button on your mouse or press ctrl+shift+I to open the developer options and goto elements.

Step 3:

After going to the developer options you will go to elements and their are some java script in that code. So now, go to https://www.hackthebox.eu/js/inviteapi.min.js . You will see a JS file like this.

Step 4:

makeInviteCode looks interesting. So let’s go back to https://www.hackthebox.eu/invite and try to find its contents.

Step 5:

Again goto console tab in Chrome Developer Tools, and type makeInviteCode() and press ENTER. You will get a 200 Success status and data as shown below.

Step 6:

When you click the small arrow alongside data, you will see that the text is encrypted and the encoding type is ROT13

copy the encrypted code and decode the code by using ROT13 AND you will get the decode like :in order to generate the invite code , make a post request to /api/invite/generate.

Step 7:

So, as we can see in Decoded Text, in order to generate an invite code, we need to make a POST request to “https://www.hackthebox.eu/api/invite/generate”.

Step 8:

Fire up your terminal/ command-prompt. And make a POST request by typing: curl -XPOST https://www.hackthebox.eu/api/invite/generate

Step 9:

You will get a success message as:

{“success”:1,”data”:{“code”: “somerandomcharacters12345”, “format”: “encoded”}, “0”:200}

Step 10:

As you saw, we code a code. But this is not our invite code as it says format:encoded.

Lets’s try decoding it, by again using decoderBut this time, select type as Base64. Paste the code you got as the response of the POST request into the Encoded Text box and press Decode. Voila! You get your invite code.

You get your invite code (Don’t try using this invite code as it won’t work for you)

Step 11:

Now, finally go to https://www.hackthebox.eu/invite and paste the Invite Code you got in the textbox asking for the same.

Step 12:

You’re in! You can sign up on the site now and become a member.

THANKING YOU

FOLLOW