HACKTHEBOX (taking invite code)

                                      POC OF HACKTHEBOX(how to take invite code)


Lab Environment


My Machine


Linux kali 4.13.0-kali1-amd64 #1 SMP Debian 4.13.10-1kali2 (2017-11-08) x86_64 GNU/Linux


Website Involved In The Process


https://www.hackthebox.eu


Steps involved


• Open the official website of hackthebox as mentioned above




• click on the join option which is present ont the top


• After clicking on join we will be asked to provide invite code which we dont have ,
  so just input random code and press enter .




• Then view the source of the page saying invalid code
• Just observe the source carefully you’ll see src =”/js/inviteapi.min.js”
• click on that link you’ll be redirected to a new page containing the code ,which is not easy to understand .




• We can see two things in the code i.e makeinvitecode (highlighted) and POST (in same line as of invite code)
• it clearly means that there is POST method .
• means we have to proceed using this code .
• Copy the code and open jsbeautifier.org
• paste the code in the provided field of jsbeautifier.org




• jsbeautifier has given me something really interesting i.e api/invite/how/to/generate
• when i tried to open the above url ,error page is displayed


• we already know that we have to use POST request, as there is involvement of post   method.
• So i fired up curl in terminal and used the following command to send a POST request to the given url (url:https://www.hackthebox.eu/api/invite/how/to/generate)
        curl command : curl -X POST https://www.hackthebox.eu/api/invite/how/to/generate
• got something with encryption type base 64 (encryption type revealed in terminal)




• Decoded that using online base 64 decoder.
        Result after decoding : In order to generate the invite code , make a POST request to                                      
      api/invite/generate


• so again i used curl to make a POST request on the url (url: https://www.hackthebox.eu/api/invite/generate)
        curl command : curl -X POST  https://www.hackthebox.eu/api/invite/generate
• again we got something encrypted .
• Again used base64 decoder as i know the encryption type .(google will directly let you know th e encryption type)


• After decoding i got the key




• Provided the key in the input method and finally got registration panel .



Popular posts from this blog

Calculat3 M3 | CTF Learn

TryHackme: Blue Walkthrough

HackTheBox-Traceback Walkthrough