0 XP · New Recruit

Guide · Beginner · Start to finish

Labs Guide — Read first, then solve

This guide explains all of Hack The Planet Labs in one place — from sign-up to Unit 04 and Labs 01–03. Come here as a beginner, read, understand, and then open the lab and solve it yourself. There is no video — it is written, so you can read at your own pace, come back, and re-read whatever you did not understand.

How to use this guide

Three steps — that is all

  1. Read the section. Before you solve a lab, read its section here first. Understand the concepts and the method.
  2. Open the lab and solve it yourself. Close the guide and go to the lab. Try it yourself — making mistakes is fine, that is how you learn.
  3. If you get stuck, come back. The hints are in this guide. Read a hint first, then try again. Copying the answer outright is not learning.

Remember: every lab has a quiz and a challenge. The quiz checks your concepts, the challenge proves you can do it by hand. Together they give 100 XP — and in the units, capturing the flag unlocks a free product.

1 · Sign up

How to create an account

You need an account to solve the labs — your XP and progress are saved to it. Signing up is simple:

  1. Click Sign up in the header. A dark modal opens — the Labs logo, a place to write your email, and a red Continue button below.
  2. Write your email and press Continue.
  3. A verification code arrives at your email. Enter that code in the modal — your account is created.
  4. Signing in works the same way: write your email, enter the code, and you are in.

Right now it is email + code only — there is no Google or Facebook login yet, that comes later. After you sign in, your name and avatar appear in the header. Click the avatar to open the menu: your email, Manage account and Sign out. Manage account opens Account/Security — there you can change your password and see your active devices.

Tip: if you press a lab's Start Lab button without signing in, the sign-in modal opens first — and after you sign in, the same lab you picked opens. You do not have to find it again.

Privacy: your email is only used when a new lab arrives — no spam. Your progress syncs with your account. If you do a lab while signed out, your progress is saved only on that device.

2 · Hub

What is on the hub

The hub (home page) has three things — Cyber-Range Units, Classic Labs, and Recon Bay. The telemetry bar at the top shows: Active Modules 04, Engine Client-WASM, and the Reward Vault (0/4 to 4/4).

Three steps — the flow of every unit

  1. Deploy Lab — open the lab and start the environment.
  2. Capture Flag — solve the challenge and find the flag (HTP{...}).
  3. Unlock Free Product — as soon as you submit the flag, a free product unlocks in the Reward Vault.

Cyber-Range Units (01–04)

These are the real hands-on units — every unit has a flag and a free product:

  • Unit 01 — Shadow Terminal Recon (Beginner, 20–30 min): recon from a real terminal inside the browser — enumerate the target, read banners, extract the flag.
  • Unit 02 — 3D Breach & PCAP Hunt (Intermediate, 30–45 min): see the breach in a 3D graph, then find the exfiltration in a packet capture.
  • Unit 03 — Isolated Linux Forensics (Intermediate, 30–45 min): a full Linux in the browser — disk image, logs, recover a deleted file.
  • Unit 04 — Cyber-Range Debian Sandbox (Intermediate, 35–50 min): your own disposable Debian box — break it, patch it, flag at the end of the chain.

Classic Labs (01–03)

These are the learning labs — every lab has lessons, a quiz and a practical challenge:

  • Lab 01 — HTTP Under the Hood (Beginner, 25–35 min): how the browser and the server talk — requests, responses, methods, status codes, cookies, HTTPS.
  • Lab 02 — DNS & Network Path (Beginner, 30–40 min): how a domain name becomes an IP — resolution, record types, TCP/UDP.
  • Lab 03 — Linux Field Operations (Beginner–Intermediate, 35–45 min): the command line, the filesystem, permissions, processes.

The XP system

In every Classic Lab: quiz pass = 30 XP, challenge = 50 XP, lab complete = 20 XP — 100 XP per lab in total. Ranks: 0 XP = New Recruit, 1+ = Rookie, 100+ = Explorer, 200+ = Operator, 300+ = Field Ready. There are achievements too: First Steps (complete Lab 01), Network Explorer (Lab 02), Terminal Operator (Lab 03), Knowledge Seeker (pass all three quizzes), Field Ready (complete all three labs).

How labs unlock

The Classic Labs unlock in sequence: Lab 01 is always open, Lab 02 opens when you complete Lab 01, Lab 03 opens when you complete Lab 02. If you open a locked lab's direct link, you get a "This lab is locked" notice. The Units (01–04) have no such sequence — all four are Online, you only need to sign in.

The right order: do Lab 01 → Lab 02 → Lab 03 first (they teach the concepts), then Units 01 → 02 → 03 → 04 (they put the concepts to work). That way a beginner does not get stuck — learn first, then fight.

3 · Lab 01 — Beginner · 25–35 min

HTTP Under the Hood

Mission: understand how a browser and a web server talk over HTTP — well enough to read a real request and explain every part of it.

Understand this first — the concepts

  • Client and Server: the browser is the client (it asks), the machine holding the website is the server (it answers). Think of a restaurant: you are the customer, the waiter is the server — you place an order (request), the waiter brings the food (response).
  • Parts of a request: Method (what to do — GET means "send me this"), Path (what you want — /search?q=cybersecurity), Version (HTTP/1.1), Host (which website — training.local), Headers (extra facts — who is asking, which format you accept, cookies), Body (data sent with the request — a GET has no body, a POST carries its data here).
  • Methods: GET — retrieve something (safe, it changes nothing on the server); POST — submit data (login, comment, upload); PUT — replace a resource entirely; PATCH — change part of a resource; DELETE — remove a resource.
  • Status codes: 2xx = success (200 OK), 3xx = redirection, go elsewhere (301/302), 4xx = the client did something wrong (404 not found, 403 forbidden, 401 unauthorized), 5xx = the server failed (500 server error). When a site breaks, check the status code first — it tells you which side of the conversation went wrong.
  • Cookies and Sessions: HTTP forgets everything — every request is a fresh conversation. A cookie reminds the server that you are logged in. When you log in, the server gives you a session cookie, the browser saves it, and it is sent automatically with every next request. A Secure cookie is only sent over HTTPS, an HttpOnly cookie cannot be read by JavaScript (so it cannot be stolen that way).
  • HTTP vs HTTPS: HTTP is port 80 — everything in plain text, anyone can read it. HTTPS is port 443 — the whole conversation is encrypted, nobody in the middle can read or change it. But remember: HTTPS does not mean the site is honest — a scam site can have HTTPS too. HTTPS makes the connection private, not the destination trustworthy.

The challenge — HTTP Request Inspector

A training browser sent this request to a fictional server. Identify the five parts: the method, the path, the host, the user-agent and the cookie. Click a part of the request, then click the label that matches it.

The method: read the request line by line. In the first line, the first word is the method, then comes the path, and the version is at the end. The first word of every next line tells you what it is — the Host: line is the host, the User-Agent: line is the user-agent, the Cookie: line is the cookie.

Worked example — look at this first: in the lab's Module 2 request, GET /search?q=cybersecurity HTTP/1.1 — here GET is the method, /search?q=cybersecurity is the path, Host: training.local is the host, User-Agent: HTP-Lab-Browser/1.0 is the user-agent, and Cookie: session=demo_session is the cookie. The challenge request follows exactly the same pattern, only the values are different. Learn the pattern, then solve the challenge yourself.

Preparing for the quiz

The quiz has 6 questions, you need 4 correct to pass (30 XP). It checks: the difference between GET and POST, the status code groups (2xx/3xx/4xx/5xx), what a cookie does, and how HTTPS differs from HTTP. If you read the concepts above, the quiz is easy.

Common mistakes

  • Thinking GET changes data — GET only retrieves, it never changes anything. POST/PUT/PATCH change data.
  • Mixing up 404 and 500 — 404 means the thing was not found (client side), 500 means the server broke (server side).
  • Thinking a cookie is a password — a cookie is not a password, it is proof of login. But anyone who steals it can use the site as you — that is why Secure and HttpOnly exist.

4 · Lab 02 — Beginner · 30–40 min

DNS & Network Path

Mission: learn how a domain name becomes an IP address — and trace the whole lookup from the browser to the server. By the end you will understand what happens behind a name you type, and where to look first when a site does not open.

Understand this first — the concepts

  • Names and IP Addresses: machines only understand numbers (IP), humans remember names. DNS connects a name to a number — like a phone book connects a name to a number.
  • DNS Resolution: a lookup is a chain — cache → resolver → root → TLD → authoritative. The browser never talks to the root server directly — it asks the resolver, the resolver walks down the hierarchy, and the answer comes back up.
  • DNS Records: every record answers a different question — A (IPv4), AAAA (IPv6), CNAME (alias — one name pointing to another), MX (mail server), TXT (text/SPF), NS (nameserver).
  • Ports and Protocols: the IP finds the machine, the port finds the service on that machine — 80 HTTP, 443 HTTPS, 22 SSH, 53 DNS. TCP is reliable (every packet is guaranteed to arrive), UDP is fast (no guarantee).
  • The Network Journey: one visit is a 6-stage journey — DNS → IP → TCP → TLS → HTTP → render. If DNS fails, nothing starts.

The challenge — DNS Resolution Simulator

The browser wants to open shop.example.test. The 8 steps of the lookup are given out of order — you have to click them in the right order.

The method: always think from the start. First the browser checks its own memory (cache). Then it asks the resolver. Then the hierarchy walks down — root, then TLD, then the authoritative server. Then the answer comes back up, and finally the browser connects.

Hints: (1) Every lookup starts in the browser's own memory (cache). (2) The browser never talks to the root server — it asks the resolver first. (3) Every step depends on the previous one — you can only ask the TLD after the root points the way, and you only get the IP after reaching the authoritative server.

Preparing for the quiz

The quiz has 6 scenario-based questions, you need 4 correct to pass (30 XP). It checks: the order of the resolution chain, what the record types mean, and what ports do.

Common mistakes

  • "The browser asks the root" — wrong. The resolver asks, the browser only talks to the resolver.
  • "DNS is one big server" — wrong. It is a hierarchy of thousands of servers.
  • "DNS makes the connection private" — wrong. TLS makes it private; DNS is plain text.
  • "Clearing history will fix the old site" — wrong. The DNS cache is separate — wait for the TTL to expire.

5 · Lab 03 — Beginner–Intermediate · 35–45 min

Linux Field Operations

Mission: learn the Linux command line — move around the system, inspect it, and lock a folder with permissions — then prove it all in a simulated terminal mission.

Understand this first — the concepts

  • The Linux Environment: the terminal is just a window, the shell (bash) runs the commands, the kernel is the real OS. Linux means the kernel.
  • Filesystem Navigation: the whole system is one tree starting at / (root). pwd — where you are, ls — what is inside, cd — go somewhere. An absolute path starts with /, a relative path starts from the current folder.
  • File Operations: every command is a verb — cat read, touch/mkdir create, cp copy, mv move/rename, rm delete (permanent — there is no recycle bin).
  • System Inspection: look before you change — whoami/id (who you are), uname (which system), ps/top (what is running).
  • Linux Permissions: owner/group/others × read (4) / write (2) / execute (1). The numbers add up to a mode — 755 for a folder, 644 for a file, 700 for a private folder, 600 for a private file. Change them with chmod. Never use 777 — it gives everyone everything and kills security.
  • Command-Line Thinking: every command has the same shape — command + option + argument. Real work is a chain of small steps.

The challenge — Simulated Terminal Mission

You are the user learner, starting in /home/learner. 7 objectives, in this order:

  1. pwd — confirm where you are.
  2. cd mission — go into the mission folder.
  3. ls — find flag.txt.
  4. cat flag.txt — read the file.
  5. mkdir vault — create a folder.
  6. chmod 700 vault — lock it to owner-only.
  7. ls -l — verify that vault shows drwx------.

The method: check after every step — first confirm your location, then move, then read, then create, then lock, and finally verify.

Hints: (1) If you get "No such file", run pwd first — you are in the wrong folder. (2) Not cd /mission, but cd mission — the leading slash takes you to the root, where mission does not exist. (3) mkdir first, then chmod — you cannot change the permissions of a folder that does not exist yet; and do not call it done without verifying with ls -l.

Preparing for the quiz

The quiz has 6 questions, you need 4 correct to pass (30 XP). It checks: navigation commands, file operations, and the permission numbers (755/644/700/600).

Common mistakes

  • Typing cd /mission — you need a relative path, not an absolute one.
  • Running cat flag.txt from the wrong folder — confirm your location with pwd first.
  • Doing chmod before mkdir — create first, then lock.
  • The biggest trap — "fixing" a permission error with chmod 777, which destroys security.

6 · Unit 01 — Beginner · 20–30 min

Shadow Terminal Recon

Mission: get inside a hacked web server (10.0.0.10) and find its leak. By the end you will understand how to read files and logs from a Linux terminal, and how to pull a leaked API key out of server logs.

How this unit works

A terminal like a real one (xterm.js) opens inside the browser — the prompt is agent@htp-node01:~$. You type Linux commands: ls, cd, pwd, cat, grep, find, echo, whoami, scan, clear, help. Up/Down arrows bring back old commands. The server's whole filesystem is simulated: /var/www/html (website files), /var/log/apache2/ (access.log and error.log), /home/agent/ (notes.txt, todo.txt), /etc/ and /tmp/. The scan command runs an nmap-style scan — it shows open ports 22 (ssh), 80 (http), 443 (https).

The challenge — how to get the flag

  1. Run ls -la to see the home directory, then cat notes.txt — the notes say there was a probe on /admin-9f2/ and the leak is in the Apache access log.
  2. cd /var/log/apache2/ then cat access.log — or run grep -r 'HTP{' /var/log/apache2/ directly.
  3. Find the log line with GET /api/v1/keys?leak=1 — the leaked API key (the flag, in HTP{...} format) is written in that same line.
  4. Copy the flag into the VERIFY FLAG box at the bottom of the page and press VERIFY FLAG — the check runs in the browser with SHA-256, nothing is sent to a server.

Hints: (1) Hidden files start with a dot — ls does not show them, ls -la is essential. (2) The logs are in /var/log/apache2/ — grep is the fastest way. (3) grep -r 'HTP{' /var/log/apache2/ takes you straight to the leak.

Common mistakes and traps

  • ls does not show hidden files — a beginner thinks the directory is empty. Always use ls -la.
  • grep on a directory without -r gives an "Is a directory" error — forgetting -r is a common mistake.
  • Decoy files waste your time: every token in tokens.txt is revoked, the password in config.php is REDACTED, .config/session is expired — the real leak is only in access.log.
  • While scan runs, the terminal takes no input (only Ctrl+C cancels it) — it looks like the terminal hung, but the scan is running.

Reward: the correct flag unlocks Free Product #1 and the Reward Vault count goes up (0/4 to 1/4).

7 · Unit 02 — Intermediate · 30–45 min

3D Breach & PCAP Hunt

Mission: a rogue node is hiding in the company network, quietly sending data out. By the end you will understand how to read an attack path from a 3D network map and how to pull exfiltrated data out of a packet capture (pcap).

How this unit works

There are two tabs. Topology: a 3D graph with 7 nodes — Firewall (10.0.0.1), Web Server (10.0.0.10), Mail Server, DNS Server, Database (10.0.0.20), Admin PC (10.0.0.24) and a red Rogue Exfil Node (185.220.101.47). The red lines are the attack path: Firewall → Web → Database → Rogue, and Admin PC → Rogue. Click a node to open its logs in the side panel. The graph keeps rotating (orbit) — drag to rotate, scroll to zoom, click to stop the rotation. Packet Hunt: a table of a real pcap file — every packet's Time, Source, Destination, Protocol, Length and Info. There is a filter bar at the top (All / TCP / DNS / HTTP / Rogue IP chips) and a search box. Rows with the rogue IP are highlighted red. Click a packet to open a drawer with the HTTP payload (text) and a hex dump.

The challenge — how to get the flag

  1. Follow the red attack path in the Topology — click the Rogue Exfil Node and note its IP (185.220.101.47).
  2. In the Packet Hunt tab, press the Rogue IP chip — only that IP's packets remain.
  3. Find the HTTP POST packet among them (from Admin PC 10.0.0.24 to the rogue IP, the 09:31:12 one) and click it.
  4. Read the HTTP payload in the drawer — the line with the flag is highlighted red. Copy the flag into the VERIFY FLAG box.

Hints: (1) Follow the red path — the node with traffic to an unknown outside IP is the rogue one. (2) Do not scroll the whole packet table — filter by Rogue IP first, then open the HTTP POST. (3) The Admin PC logs say "smoking gun" — that POST packet is the real answer.

Common mistakes

  • The graph keeps rotating, so a beginner cannot look at the rogue node properly — learn to stop the rotation with drag/click.
  • Scrolling the whole packet table without a filter — the DNS packets are just noise, the real thing is the HTTP POST.
  • Looking for the flag in the wrong place: the earlier probe/403 traffic and the Database read burst are only clues, the flag is only in the exfiltration POST's payload.
  • Getting lost in the hex dump — the flag is highlighted red in the HTTP payload text, not in the hex.

Reward: the correct flag unlocks Free Product #2 and the Reward Vault count goes up.

8 · Unit 03 — Intermediate · 30–45 min

Isolated Linux Forensics

Mission: a Linux machine was hacked and the attacker tried to hide their tracks. Boot the machine and find the evidence — a suspicious process, a scheduled job, and a hidden root-level artifact.

How this unit works

This is a REAL Linux running inside your browser — the v86 emulator (WebAssembly) boots Buildroot Linux. The screen shows an old-style VGA terminal; click the screen first so the keyboard focuses, then you are straight in the Linux shell (the /root% prompt). The useful commands are crontab -l, ps, ls -l and cat. The telemetry strip at the top shows STATE, ARCH (x86), GUEST (Buildroot Linux) and ARTIFACTS; there are RESET VM and SAVE SNAPSHOT buttons too.

The challenge — how to get the flag

  1. Run crontab -l — one job runs every 5 minutes and points to /usr/local/bin/syscheck.sh.
  2. Run ps to see what processes are running — the same script shows up in the background too.
  3. ls -l /usr/local/bin/syscheck.sh — its permissions are 777 (everyone allowed everything — that loose permission is the weakness).
  4. cat /usr/local/bin/syscheck.sh — read what the script does.
  5. The flag is hidden in a hidden file in root's home — find it with ls -la /root/.cache/, then read it with cat.
  6. Copy the flag into the VERIFY FLAG box — this is MANUAL, you have to paste it yourself. If it is right, you get "Correct — flag accepted" and the Reward Vault opens.

Hints: (1) Something is running on a schedule — check cron and running processes. (2) Root-owned files with loose permissions often hide things in "plain sight". (3) Hidden files do not show with ls — use ls -la.

Common mistakes

  • The first boot can take up to 3 minutes — the guest image (~6 MB) loads the first time; do not panic at the spinner, wait.
  • The prompt is not #, it is /root% — a % prompt means the shell is live.
  • The keyboard does nothing until you click the screen — click the screen first.
  • If the artifacts show "PARTIAL", reload the page and boot again.

Reward: the correct flag unlocks Free Product #3 and the Reward Vault count goes up.

9 · Unit 04 — Intermediate · 35–50 min

Cyber-Range Debian Sandbox

Mission: a vulnerable local script sits in a Debian sandbox — app.py. Read it line by line, find the logic flaw in its input check, and give it an input that makes the script print the verification token itself.

How this unit works

This is also REAL Debian — it runs in the browser through CheerpX (WebVM). The 6 boot stages show in the sidebar (engine load → disk backend → image hydrate → filesystem mount → writing the script → shell start). The terminal is xterm.js — drag the handle at the bottom to resize it, use the button at the top for fullscreen (Esc to exit). The shell is bash, the user is user (uid 1000), home is /home/user. app.py is there — copied from /data/app.py. Useful commands: pwd, ls, cat app.py, python3 app.py ....

The challenge — how to get the flag

  1. cat app.py — read the whole script. It is an access-check script: it takes one argument and checks whether the input starts with an expected prefix.
  2. The flaw: the script only checks the START (prefix) of the input — the full passphrase is never checked at all. So if the prefix is right, the rest can be anything and you still get access.
  3. Run python3 app.py HTP-ACCESS-anything — write anything after the prefix, it works.
  4. The script prints ACCESS GRANTED and below it a verification token:.
  5. Copy that token and paste it MANUALLY into the VERIFY FLAG box — there is no auto-capture. If it is right, the SHA-256 check passes, you get "Correct — flag accepted" and the Reward Vault opens.

Hints: (1) The flaw is in the input check — read the script line by line, understand every if. (2) When you give the right input, the script prints the token itself — there is no need to look for the token anywhere else. (3) The footer has a hint too: first cat app.py, then try the input with the prefix.

Common mistakes

  • The first boot takes ~2.5 minutes — the Debian disk image streams from the network the first time. A repeat boot in the same browser takes under 20 seconds (IndexedDB cache).
  • The shell sometimes stalls — you type, the letters appear, but the command does not run (not even builtins). This is not lab code, it is a transient CheerpX/disk stall — reload the page and boot again, it fixes itself.
  • The long output of cat app.py may need scrolling down — the terminal auto-scrolls, but if the last lines are not visible, scroll down with the mouse.

Reward: the correct flag unlocks Free Product #4 and the Reward Vault count goes up.

10 · Recon Bay

Recon Bay — no sign-in needed

Recon Bay is Live on the hub and open without sign-in. Write a domain, pick a record type, and a DNS-over-HTTPS lookup runs (dns.google, fallback Cloudflare) — DNS records are shown, and if the name does not exist you get NXDOMAIN. There is no server-side scanning and no data is stored.

How to use it: write a domain name (for example example.com), pick a record type (A, AAAA, MX, TXT, NS), and press lookup. The records that are found are shown. This is how you see the DNS records from Lab 02 in the real world.