How to get the invite code: Hack the Box

Hi , i will show you how to get the invite code for Hack the Box.Hack the box is a free platform for testing and developing your hacking skills by simulating almost real situations. More usefull things will apear on my blog. Now let’s start hacking.

  1. First of all you have to visit the site hack the box.
  2. Now you need to scroll down the page and press join or just press here.
  3. On this page you can see a text box asking you for an invite code.
  4. Right click on the page, and open inspect element or press Ctrl+Shift+I to open the Chrome Developers Tools.
  5. Look at the elements tab and find the script with source as: /js/inviteapi.min.js

6.  Now go to https://www.hackthebox.eu/js/inviteapi.min.js and you must find a JS file like this one:

7. makeInviteCode is what we need, we must https://www.hackthebox.eu/invite and try to find its contents.

8.Go to console tab in Chrome Tools, you must type makeInviteCode() and press ENTER , then you will obtain a 200 Success status and data as shown below.

9.Now press the arrow alongside the data and you will see the encoding type to be Base64 or ROT13.

10.So let’s decode the content. Copy the contents of data. And search online for a Base64 Decryptor or ROT13 Decryptor.

11. Now paste the copied data into the text box and click DECODE , you will get the encoded content.

12. So, in order to generate an invite code, we need to make a POST request to hackthebox.eu/api/invite/generate .

13.Now start your terminal (cmd for windows and terminal for MAC OS) and make a POST request by typing:

14.You will obtain a succes message with conotent as below :

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

15.We are about to finish , but not yet. We must go to Base64 again and we need to code a code.

16. Paste the code you got as the response of the POST request into the textbox and finally you get your invite code.

17. Now finally by pasting the code that you get into the textbox you can sign in.

SUCCESEFUL HACKING