Hello folks! So before we get started, I hope you know sufficient stuff about Hack the Box. If not, then I’ll tell you along the way. So let’s begin!
Hack the box, what is it?
Basically, Hack the box is an online platform where you can test and advance your penetration testing skills. It contains constantly updating challenges and some other exciting stuff. If you really have interest in network security or information security, then you should definitely try this out.
So let’s hack our way in, shall we?
So first step you have to do is visit the hack the box site https://www.hackthebox.eu which looks like this:

The site, just like the stuff inside, is awesome and pretty attractive.
So, when you click “join now”, hack the box has a welcome challenge ready for you. You just have to hack your way in! Anyways, you’ll find something like this:

So, this page asks you for invite code to signup to the site. So how do we do this? Let’s find out!
So, most of you will be familiar with the chrome developer tools. Just press shift+ctrl+i and go to the console. Hack this site has something special for you. You’ll find something like this:

Now, go through the elements tab and you’ll find a script with the source as /js/inviteapi.min.js

So now, go to https://www.hackthebox.eu/js/inviteapi.min.js . You will see a JS file like this:

So, now you have made this far you will notice that there is a function named makeInvitecode which captures our interest. So, go to the console and type makeInviteCode() and press enter. you will find an encrypted message and when you click the small arrow alongside data, you’ll also find the encryption algorithm like this:

In my case, it is encrypted using BASE64. So let’s decrypt it using an online decrypt tool. I’m using https://www.base64decode.org/ .However, in your case, the encryption algorithm might be different like ROT13, etc.
So on decrypting, you’ll find something like this:

So, the decrypted message is “In order to generate the invite code, make a POST request to https:www.hackthebox.eu/api/invite/generate.
So keep calm and fire up the terminal and type in :
curl https://www.hackthebox.eu/api/invite/generate -XPOST
So, let’s look at the result:

So now successfully found the second code. Let’s again decrypt it using the BASE64 decrypt tool we used before

Voila! the decrypted message is your invite code. Submit it and sign up.

Now that you’ve successfully hacked your way in, it’s time you test your hacking skills on some real life scenarios simulations.
If you face any problem in hacking your way in, let me know. Also you can contact me on the links provided at the end.