HackTheBox (HTB): Feel free to hack your way in :)

3 min readOct 20, 2019
  1. Go to hackthebox website https://www.hackthebox.eu/

2. On the middle of the hackthebox website click the “Join”

3. You will be redirected to the Invite Code

4. You can see a text box asking you for the invite code. Right click the website page and select the “inspect element”. Go to the Elements tab if you are using Google Chrome Browser and Inspector if you are using a Firefox Browser

5. Read the source code and you will find a script “src=”/js/inviteapi.min.js”

6. Go to the “https://www.hackthebox.eu/js/inviteapi.min.js”. You will be able to find a function named “makeInviteCode”

7. Go to the Console of your browser. The function generates your required invite code. Type to the console “makeInviteCode()”. Why does it have “()”, well it is a javascript function. Once you hit enter. You will get a 200 Success status and data shown.

8. Copy the data that are shown on the number 7 screenshot. The enctype is Base64, Technically, it will depend what will you get it can be Base64 or ROT13 (Got a Base64). Go to the “https://www.base64decode.org/” to decode the Base64.

9. Go to any Linux Distribution/s to make a Post Method Request. In my case, I used Kali Linux type the “curl -XPOST https://www.hackthebox.eu/api/invite/generate

10. Once again, go to the website “https://www.base64decode.org/” to decode the Base64. Copy the decoded Base64.

11. Paste it on the text box

12. Congratulations