# 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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lookbook.cyberjungles.com/things/hackthebox-lab-invite-code-write-up.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
