Hack The Box: Invite Code & Lab Setup Guide
Crack the Hack The Box Invitation Challenge
Classic HTB Challenge

Hack The Box historically requires aspiring penetration testers to solve an introductory reverse engineering & web API challenge in order to unlock an invitation code. Follow these 10 steps to generate yours:

1
Navigate to HTB Join Page

Visit Hack The Box and click on the Join Now button. The registration form prompts for an Invitation Code.

2
Open Browser Developer Tools

Right-click anywhere on the page and select Inspect, or press Ctrl+Shift+I (Mac: Cmd+Option+I) to open DevTools.

3
Inspect the Elements & Find the API Script

Switch to the Sources or Elements tab and search through the script tags. You will discover an external script loaded from: /js/inviteapi.min.js.

4
Inspect the Invite API Logic

Open /js/inviteapi.min.js in a new tab. Searching through the script reveals an exported function named makeInviteCode().

5
Execute makeInviteCode() in Console

Switch back to the Console tab in DevTools, execute the function, and press Enter:

makeInviteCode()

The API responds with a HTTP 200 JSON object containing encrypted data and an enctype (either ROT13 or BASE64).

6
Decode the Secret API Instruction

Copy the encoded ciphertext from the response and decode it according to its type:

# If ROT13 (in Linux terminal): echo "In order to generate..." | tr 'A-Za-z' 'N-ZA-Mn-za-m' # If Base64: echo "<base64_string>" | base64 -d

The decoded message reveals: "In order to generate the invite code, make a POST request to /api/invite/generate".

7
Send POST Request via cURL

Open your Linux or Kali terminal and send a POST request to generate the unique invitation token:

curl -XPOST https://www.hackthebox.eu/api/invite/generate
8
Decode Your Generated Invite Code

The endpoint responds with a JSON payload: {"success":1,"data":{"code":"...","format":"encoded"}}. Decode the code string from Base64:

echo "<PASTE_CODE_HERE>" | base64 -d
9
Paste Invite Code & Complete Registration

Return to the Hack The Box registration page, paste your decoded invitation code (formatted like XXXXX-XXXXX-XXXXX-XXXXX-XXXXX), and click Sign Up.

10
Verify Account & Access Starting Point

Fill in your chosen username, email, and password. Confirm the verification link sent to your inbox to immediately gain access to the official Starting Point laboratory!

Connect to the Hack The Box Starting Point VPN server using your downloaded .ovpn configuration file:

sudo openvpn starting_point_username.ovpn

Confirm your active VPN tunnel interface (tun0) and assigned 10.10.x.x address:

ip addr show dev tun0 | grep "inet "

Test ICMP connectivity to your spawned target lab instance:

ping -c 3 10.129.x.x

Perform an aggressive initial TCP port and service reconnaissance scan:

nmap -sV -sC -Pn -T4 -oN htb_initial.txt <target-ip>

Tier 0: Fundamentals & Common Services

Connect to target machines and exploit unauthenticated network protocols (Telnet, FTP, SMB, RDP).
4 Labs

Tier 1: Web Applications & Database Enumeration

Enumerate web dashboards, bypass login portals with SQL injection, and extract credentials from Redis & MySQL databases.
6 Labs

Tier 2: Foothold & Privilege Escalation

Multi-step exploitation chains: gain reverse shells, abuse SUID binaries, inject XXE/Log4j payloads, and escalate to root/Administrator.
7 Labs

No Hack The Box machines match your search.

Try searching for machine names like Meow, Archetype, Oopsie, or Vaccine.