Tactical LogHuntress CTF 2026 // team archive

Days / Day 30 / Web Exploitation / Queue the Confusion

DAY 30//LANE: WEB EXPLOITATION//STATUS: CORRECT x3

Queue the Confusion

Web Exploitation SSTTMM Modes reported CORRECT in this write-up

Queue the Confusion — Day 30 Web Exploitation

Modes CORRECT: Single Solve, Time Trial, Mastery (6 lane-sampler targets).

Prompt

Your job went into the queue with your name on it. Loosen the binding and watch somebody else's outcome come out wearing your stamp.

Single Solve / Time Trial — Pyramid queue owner-binding bypass

The live target is a Pyramid training app:

  1. GET /api/clues -> {feature_route, secondary_route, owner_directory_route, current_role: analyst}.
  2. GET /api/owners -> {caller: analyst, restricted_owner: executive}.
  3. POST <feature_route> with {"owner": "executive"} is accepted (server never checks the caller is allowed to queue a job for a different owner) and returns {ok, id, queued_owner: executive}.
  4. GET <secondary_route>?id=<id> audits the job. For a job whose caller != owner the audit returns the proof: {ok, effect: "queue_owner_binding_bypassed", evidence: "proof_..."}.

The vulnerability: the queue binding (which owner the job belongs to) is set from the client-supplied owner field without a server-side check against the current role. Submitting owner=<restricted_owner> from the analyst role bypasses the binding; the audit route confirms the mismatch and emits the proof.

Mastery — Lane Sampler (6 different vuln classes, one proof each)

Target 1 — Status Sprout (Node)

  • Comment in / hints review crawler policy.
  • /robots.txt discloses /snapshots-13fb4/.
  • Directory listing exposes deployment-notes-470ca9.json.bak whose JSON contains the proof under support_note.

Target 2 — Case Crate (session + IDOR)

  • GET / sets a case_session cookie; /api/history then returns a events[] log that references case_id: 17196 with owner: executive, visibility: reference_only.
  • GET /api/tickets/17196 with the session cookie returns the restricted ticket whose note field is the proof.

Target 3 — Search Party (boolean-blind SQLi)

  • /query?q= uses SELECT ... FROM articles WHERE title LIKE '%<q>%'-style concatenation (confirmed by schema extraction below).
  • UNION is suppressed, but boolean injection works: pivot on endpoint' OR (<expr>) OR '1'='1 (3 cards = TRUE, 1 card = FALSE).
  • Extracted CREATE TABLE articles (id INTEGER PRIMARY KEY, title TEXT, topic TEXT, summary TEXT, visibility TEXT) and found a 4th row with visibility='private'.
  • Extracted summary for the private row -> proof.

Target 4 — Runbook Nook (PHP LFI)

  • /reader.php?doc=<path> includes with base /var/www/html/pages/; php://filter prefixes get prepended, so direct wrapper abuse fails, but path traversal works.
  • ?doc=../../../run/huntress/objective.txt returns the proof (depth 3 traversal).

Target 5 — Form and Function (Django owner-binding bypass)

  • Only feature_route exposed (no secondary audit route).
  • POST /submit-<token> with {"owner": "executive"} returns directly {ok, effect: "framework_authorization_bypassed", evidence: "proof_..."}.

Target 6 — Object Queue (Pyramid, same shape as single/TT)

  • Same api/clues -> owners -> feature POST -> secondary audit chain as the Single, with its own route tokens; proof extracted from the audit evidence field.

Solvers

  • scripts/solve_queue.py — generic Pyramid queue-owner-binding handler (SS, TT, T6).
  • scripts/run_timed.py — opens the timed window (timed_start_authorised(1)), reads live targets from GM status, dispatches per family, submits.
  • scripts/t3_blind.py — boolean-blind SQLi extractor keyed on the 3-vs-1 card oracle, binary-searches char codes 32..126.

Lessons + D+1

  • The three Pyramid/Django "owner-binding bypass" targets (SS, TT, Target 5, Target 6) are a single family: GET /api/clues to learn routes, then POST the restricted owner. Target 5 (Django) returned the proof directly from the feature route; Pyramid variants split into feature + secondary audit. The Mastery lane-sampler also pulls in robots-backup, session-cookie IDOR via /api/history, PHP LFI with a leading directory prefix, and a boolean-blind-only SQLi (UNION blocked). Keep the solver banked under web_wip.py plus a per-family dispatcher.
  • Stall time: ~15 min, almost entirely on Target 3 (missed that UNION was silently filtered; iterated through MANY union variants before switching to the 3-vs-1 boolean oracle). Lesson: the moment UNION returns zero rows across every column count AND a boolean oracle is already proven, go straight to boolean-blind. The oracle pivot' OR (<expr>) OR '1'='1 with the "3 cards = TRUE, 1 card = FALSE" count is cheap and extremely stable.
  • Keep in clone: solve_queue.compute is generic enough across Pyramid/Django queue variants; the Target 3 blind extractor is also reusable for any "/query?q=" style SQLi that has a stable row-count oracle.
  • Port to shared: generic 3-vs-N boolean oracle helper and a union_or_blind dispatcher (if UNION returns no rows, auto-fall-back to boolean binary search on substr/unicode).

Flag

<REDACTED_TOKEN>

Commander follow-ups (READ THESE)

Three notes dropped in this same folder for the Commander to action BEFORE the next day's release — they are not optional. The Day-30 wall-clock would have been <2 min with these in place; most of the fixes benefit every lane, not just web.

  • COMMANDER_NOTES.md — web-lane-specific gaps this challenge exposed (silent "autosolve FINISHED" with zero work, opaque timed_start_authorised gate, missing lane-sampler banner, seven family handlers to bank in kb/web_exploit_families.json, boolean-blind extractor to lift into _lib/web_kit.py, is_valid_web_proof enforcement).
  • SPEEDUP_PARALLELISM.md — fan-out / recognize-dispatch / adversarial-fork patterns that apply to every lane. assignment_runner.py --fanout N + item_runner.py worker + "AUTO-FANOUT" claim banner. Est. 10x on Mastery.
  • SUPERFAST_IMPROVEMENTS.md — the broader list (prebrief forks, recognise- in-claim, three-tier model routing, nightly dispatcher regression, handler contract, wall-clock instrumentation, workflow-for-a-day, HELD residue schema, snapshot staleness enforcement). Priority order at the bottom.

Canonical copies also live at docs/commander/SPEEDUP_PARALLELISM.md and docs/commander/SUPERFAST_IMPROVEMENTS.md.