Wednesday, 28 September 2022

How To Get An INVITE code from HTB(hack the box)

 how to get an invite code from HTB?

warning- spoilers ahead if you wanna hack it yourself don’t go down.

you might be on this page  https://www.hackthebox.eu/invite and wondering that how will you get an invite code? as you can see that there is something written over input.

like this:

it means, we have to hack the website to get the code:

step 1

go to the inspect elements by pressing CTRL+SHIFT+I. you can see js/inviteapi.min.js parameter that seems interesting.

step 2

go to the https://www.hackthebox.eu/js/inviteapi.min.js and look if there is anything to do with. you will see that there is makeInviteCode. we will use it in invite page console.

step 3

go back to invite page and open inspect elements and go to the console and just write makeInviteCode there and hit ENTER. you will see some kinda encoded code.

step 4

it is base64 encoded. go to https://www.base64decode.org/

and decode it easily. it will give you some parameter that will give you invite code.

step 5

you can’t get anything by make get a request to https://www.hackthebox.eu/api/invite/generate. so we will make a post request using curl.

type this command in your terminal

curl -XPOST <https://www.hackthebox.eu/api/invite/generate>

and you will get the invite code. but remember, a particular invite-code will work only for a particular IP. so you won’t be able to use anyone’s code.

 

 

thanks for visiting

No comments:

Post a Comment