> For the complete documentation index, see [llms.txt](https://lookbook.cyberjungles.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lookbook.cyberjungles.com/things/hackthebox-lab-invite-code-write-up.md).

# HackTheBox Lab – Invite Code Write-Up

A friend showed me [this lab](https://www.hackthebox.eu/). I have just started solving the HTB Lab. And I will share the solvings step by step. The Lab has 20 machines that Linux and Windows. The registration that I had the most fun ever seen until now.

I will explain first challange: invite code.

First, you should invite yourself.

Actually, there is no one who sending the invite code. You should invite yourself. Search for inviting.<br>

> ![](http://46.101.86.88/wp-content/uploads/2017/07/invite-278x300.png)

I found a hint in the javascript console. A skull was waiting me.

![](http://46.101.86.88/wp-content/uploads/2017/07/skull.png)

I was review the js files. Specially /js/inviteapi.min.js<br>

![](http://46.101.86.88/wp-content/uploads/2017/07/jsfile.png)

1. I typed this function name in console. And SUPRISE!

![](http://46.101.86.88/wp-content/uploads/2017/07/invite1.png)

I decoded the data by base64.

\
![](http://46.101.86.88/wp-content/uploads/2017/07/base64decode.png)

1. I prepared a POST request to /api/invite/generate.

![](http://46.101.86.88/wp-content/uploads/2017/07/invite2.png)

I found a new code in JSON Response.

![](http://46.101.86.88/wp-content/uploads/2017/07/invite3.png)

I decoded the new code by base64.

![](http://46.101.86.88/wp-content/uploads/2017/07/invite-code.png)

![](http://46.101.86.88/wp-content/uploads/2017/07/dashboard.png)

Shall we begin! To be continued.<br>

-EOF-

July 5 2017
