How to start with HTB…{Part 1: Invite Code}

Ashish Ranjan
3 min readFeb 13, 2019

I divided this series on to parts:-

  1. how to crack an invite code.
  2. Basic tools for HTB.

what is HTB?

Hack The Box is an online platform allowing you to test your penetration testing skills and exchange ideas and methodologies with other members of similar interests. It contains several challenges that are constantly updated. Some of them simulating real-world scenarios and some of them leaning more towards a CTF style of challenge. As an individual, you can complete a simple challenge to prove your skills and then create an account, allowing you to connect to our private network where several machines await for you to hack them. By hacking machines you get points that help you advance in the rankings.

Crack invite code:

If you are new in the HTB then you have to firstly crack invite code which is the simple test of your knowledge on the web hacking and your understanding of the javascript and php.

above link is the direct link for creating your account on HTB.

After clicking above link you will get this login page where you have to give an invite code for the new account registration. So what is the invite code??

After doing some inspecting on the invite page, you will understand that the there is a function which is called by the invite page for generating the invite code.

If you noticed the web page then you have an idea that something is there in the /js/inviteapi.min.js page.

after clicking on the link you will get a messy javascript file, In my scenario, I used online javascript beautifier.

After changing the URL in the makeInviteCode function from ‘/api/invite/how/to/generate’ to ‘/api/invite/generate’ and copy this code and paste on the invite page console.

After calling the makeInviteCode() on the console you will get a code which will be encoded on base64 after decoding this code you will get your invite code.

Congratulations you crack the invite code for the HackTheBox. Now you can register yourself on the HackTheBox site. Now Hacking Begins.

--

--

Ashish Ranjan
Ashish Ranjan

Written by Ashish Ranjan

Building Highly scalable and reliable Infrastructure

No responses yet