← Information Disclosure lesson
FoundationsInformation DisclosureFoundation20 min+100 XP

The Debug Console Left On

The Status Portal left a diagnostic route exposed on the public web root. Enumerate the surface and retrieve the secret.

“The site looked clean. The deployment left its diary in the web root.”

CWE-200OWASP Top 10 A01:2021OWASP ASVS 7.1
The story
Think like an operator, not a user: what did the deploy leave behind? Debug routes, environment files, backups, repository metadata, logs and headers are part of the attack surface.

A diagnostic route is shipped to production, a backup is placed in the web root, or a framework exposes an actuator. The route is not linked in the UI, but it is reachable and may return secrets.

Your objective
  • Inspect robots.txt and common deployment paths
  • Find the unauthenticated diagnostic route
  • Read the exposed secret and capture the flag
Boundary under test

Production to debug surface

Field guide · request anatomy

Where to look before you type a payload

01Request

An attacker sends malformed input, probes hidden paths or inspects normal responses.

02Leak

The server returns a stack trace, header, build artifact or differential message that was never meant for the client.

03Learn

The attacker maps versions, frameworks, internal hosts, file paths, user existence and secret formats.

04Chain

The leaked detail enables a more precise attack, such as a known CVE or a targeted password reset.

Progressive hints

Open one hint at a time. The first two build the model; the last two point at the boundary.

Hint 1

Read robots.txt and the site's well-known metadata; they often list paths the team wanted crawlers to ignore.

Hint 2

Treat each listed path as a hypothesis, not a finding: request it directly and compare its status, content type and body with a normal 404.

Hint 3

robots.txt points to /debug. Open it directly.

Hint 4 · near the answer

Capture the status, headers and exact secret or internal detail returned, then name the control that should have protected the route.

Guided workbench

Observe → Hypothesize → Test → Prove → Explain

This is the same loop a reviewer expects in a report. Your draft stays in this browser; nothing is submitted until you choose to export it.

0/15steps complete
Observe0/3
Hypothesize0/3
Test0/3
Prove0/3
Explain0/3

Evidence log

Write for a reviewer who was not in the room. Every claim needs a request, response or state change behind it.

Preview the evidence report
# Lab evidence report — The Debug Console Left On

- Family: Information Disclosure
- Lab ID: web-infodisc-debug
- Date: 2026-12-05

## Workflow

### Observe

- [ ] Open "The Debug Console Left On" and record /debug, the HTTP method and the role you are given.
- [ ] List every parameter, header, cookie and object identifier the normal flow exposes.
- [ ] Save a baseline response: status, body shape, timing and the fields that change by user.

### Hypothesize

- [ ] Name the server decision that protects /debug, and the evidence it should use.
- [ ] Use the clue as a constraint, not an answer: Check robots.txt, then try common diagnostic paths such as /debug, /.env, /backup.zip or /actuator/env.
- [ ] Predict the exact status, body or state change that would prove the decision is missing.

### Test

- [ ] Start from the baseline and change one value: the /debug diagnostic route.
- [ ] Keep the request replayable; vary encoding, method or identifier location only after the first result.
- [ ] Capture the full request and response for the winning attempt, including the flag.

### Prove

- [ ] Capture the flag and name the exact foreign object, role or state change it proves.
- [ ] Repeat from a clean session and confirm the result is not cached or stale.
- [ ] State impact precisely: what data or action did you actually obtain?

### Explain

- [ ] State the root cause without naming the payload: which decision failed?
- [ ] Name the control that prevents recurrence and the layer where it belongs.
- [ ] Write one regression test that fails before the fix and passes after it.

## Evidence

### Target and baseline

_Not recorded._

### Hypothesis

_Not recorded._

### Winning request

_Not recorded._

### Proof

_Not recorded._

### Root cause

_Not recorded._

### Control and regression test

_Not recorded._

## Analyst conclusion

The proof demonstrates the missing control above. The regression test should fail against the vulnerable behavior and pass after remediation.
Solution and debrief
Locked until you capture the flag.

The full request, the reasoning and the debrief unlock after a successful capture. That is deliberate: struggle first, then consolidate.

What a reviewer will ask

False positives to rule out

  • A version header is present but no known vulnerable component uses it: still reduce fingerprinting, but do not call it a breach by itself.
  • A 404 page looks custom: inspect the body, timing and headers for differences.
  • Source maps return 200 but contain only public code: verify whether internal routes or secrets are present before rating impact.

Regression tests to name

  • Error boundary: No stack trace, SQL, file path or environment value appears
  • Dotfile and map: The edge returns 404 and no artifact body
  • User enumeration: The public response and timing are indistinguishable
The defender's move
  • Remove debug routes and artifacts from production images.
  • Block dotfiles and backup extensions at the edge.
  • Use deployment checklists and automated exposure scanning.
See the secure-code pattern and all 4 regression tests →
الخلاصة

أسرار كثيرة تُكشف من مخلفات النشر، لا من الثغرات.