Tactical LogHuntress CTF 2026 // team archive

Days / Day 26 / Web Exploitation / Trust the Webhook

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

Trust the Webhook

Web Exploitation SSTTMM Modes reported CORRECT in this write-up

Status: unresolved. This is an evidence handoff, not a solved writeup. No proof was recovered or submitted, and none of the three modes is marked complete by the Game Master.

Challenge

The app believes every event it's told about. Tell it a convincing enough story and watch it act on your forged news.

Category: Web Exploitation. The GM answer is exact text in the form proof-1 for Single Solve and Time Trial, and proof-1 through proof-4 for Mastery. The assigned target is live and attempt-specific, so always use the URL in the latest GM start response.

How it was solved

This section is the solve itself, recorded from the run on our Homebase VM. The sections after it are the working notes from the earlier live attempt, kept as written; the blocker they describe was resolved by the method here. Game Master ID: web-exploitation-day-19-trust-the-webhook Modes: Single Solve, Time Trial, Mastery

Core solve

The app treated an event sent to its webhook route as trusted. Start with the Game Master assigned target, load its home page to establish the session, then read /api/clues. The clues provide the current attempt's feature_route, event_type, owner_scope, and role. Send a JSON event to that disclosed route, filling its event and trust fields from those clues. The response's evidence field contains the exact proof_<32 hex> to submit.

The working payload includes redundant event aliases and trust assertions. The successful run did not isolate which individual field the app relied on, so preserve the known payload shape while deriving the route and values anew from each assigned target. Never reuse an old proof, route, scope, or event value.

Mastery target families

Mastery can mix several unrelated web apps in one bundle. The completed bundle used four different techniques:

  1. robots.txt disclosed an archive directory. Querying its listing with the observed file selector exposed a linked backup containing the proof.
  2. A history event marked a case reference_only; fetching that case through the corresponding API returned its proof.
  3. A search form accepted a boolean tautology and returned a restricted record.
  4. The webhook target exposed its route and event details through /api/clues, then returned proof evidence after the forged event.

The solver classifies targets independently and maps each result to the Game-Master-provided question whose artifact field names that target. It submits only exact proof strings recovered from target responses. The previous Single Solve, Time Trial, and Mastery runs completed successfully.

Script

The challenge-specific copy is scripts/solve.py; reusable helpers are in challenges/_lib/web_exploit_kit.

From the repository root, Single Solve:

python3 'challenges/Day 19/Trust the Webhook/scripts/solve.py' \
  web-exploitation-day-19-trust-the-webhook single

Time Trial and Mastery request ranked timed attempts by default. Use --practice for untimed practice, or omit it only when you intend to start the timed attempt. The runner uses the Homebase Game Master proxy, waits on the same attempt while targets prepare, and refuses --retry-expired unless the Game Master status says the attempt is expired.

Scope and evidence handling

The client uses only target URLs assigned by the Game Master, keeps cookies in memory, refuses routes outside the target origin, and does not follow redirects. Unknown target families remain unsubmitted for manual investigation. No proof values or session cookies are stored in this writeup.

Current GM state

  • Single Solve has an active attempt with no deadline and no accepted answers.
  • Time Trial and Mastery remain open and have not been started.
  • The route advertises run_for_time_supported=true for Time Trial and Mastery. The timed modes can be completed with ordinary untimed regular starts; do not request run_for_time:true unless ranked play is explicitly wanted.
  • No GM submission has been attempted. There is no validated proof candidate.

Evidence gathered

The active target's landing page identifies a Starlette analyst workspace. GET /api/clues returned:

{"framework":"Starlette","feature_route":"/dispatch-3940be","current_role":"analyst","event_type":"case.promoted","owner_scope":"executive"}

GET /dispatch-3940be returns 405, consistent with a POST-only handler. POST requests with JSON dictionaries reached a signature/trust check and returned the same 403 {"error":"webhook_rejected"} response across the previously tested bodies and headers. Non-dictionary JSON behaved differently, indicating parsing occurs before the handler's check. The attempt-specific route supplied by GM returned 404 to both GET and POST in the checks recorded for this attempt.

The local investigation already covered these branches:

  • privilege/trust booleans, role and scope claims, common proxy/source-IP headers, and common webhook signature headers;
  • JWT alg=none, weak secrets, standard raw-body or field-based HMAC candidates, clue/host/attempt-derived keys, common canonical JSON serializations, Stripe, and Standard Webhooks/Svix layouts;
  • common source/config disclosure paths, static assets, traversal forms, debug endpoints, and likely route names;
  • request path/Host variations associated with Starlette URL handling, which were rejected or blocked at the edge;
  • JSON field types, alternate event envelopes, content types, and header/body placements.

These negative results lower the value of repeating broad signature/header/path fuzzing. They do not prove that every signature scheme or application flaw was ruled out.

Starlette vulnerability triage

The most relevant additional known issue is CVE-2026-48817 (GHSA-x746-7m8f-x49c). In affected Starlette versions, HTTPEndpoint can lowercase an arbitrary HTTP method and use it as an attribute name. If the route does not constrain methods, a non-standard method can invoke an endpoint helper that accepts a Request and returns a response. The advisory's prerequisites matter: Starlette must use HTTPEndpoint, the route must not restrict methods, the class must expose a suitable helper, and the network path must pass the custom method through.

I tested selected helper-like method names against the active /dispatch-3940be route over both HTTP/1.1 and HTTP/2. Every custom method returned HTTP 501 at Cloudflare with cfOrigin;dur=0 and no cfWorker timing, so those requests were rejected before the challenge application. Ordinary OPTIONS, PUT, PATCH, and DELETE reached the Worker and returned 405 with Allow: POST, GET, HEAD. Three method-override headers left POST at the same 403 signature rejection. These observations make the CVE a useful explanation for what to check, but not a demonstrated exploit here. The advertised Allow list could come from the application route or endpoint; without source it does not prove the exact Starlette registration. The next useful evidence would be an alternate authorized access path that reaches the app with custom methods, or source/version/method clues showing an exposed helper. Existing probe scripts under challenges/_tmp/tw_method.py and tw_method2.py already cover many common methods, so repeating that list is unlikely to help.

A separate one-time check generated Starlette-format signed session cookies using the common development secret secret and three executive-role claim shapes. Each still returned 403. The landing page did not set a session cookie, so this did not support a session-based bypass. This is a narrow negative result, not proof that every possible session secret or schema is absent.

Reopened target and additional checks

After the original Single Solve target stopped, a normal GM start resumed the same attempt ID and assigned a new target host. The new /api/clues values matched the earlier target. I did not reuse stale host data: the current target was queried dynamically from GM status. HMAC-SHA256 using the current full hostname or its random hostname label, with spaced/compact JSON and common header/body placements, still returned the same 403. Host-poisoning strings in X-Forwarded-Host and Forwarded likewise reached the Worker and returned the same rejection. A short timing screen over eight equal-length signatures showed worker durations between 95 and 151 ms without a repeatable signal.

These checks did not identify a signing key or a Starlette bypass. No answer was submitted. The active Single Solve target should be checked in GM status before any further requests because web targets expire after inactivity.

The user proposed creating a separate webhook. I checked eight likely in-app registration/subscription paths with POST; all returned 404 not_found from the Worker. The visible app and /api/clues expose only the dispatch feature route, so there is currently no evidence of an in-app webhook creation flow.

I also checked four nested registration paths with a same-target callback URL; all were 404. The current target host, route token, and GM attempt UUID, interpreted as decoded bytes rather than their visible text, also failed as HMAC-SHA256 keys across the two common JSON encodings and common signature placements. No registration or signature candidate was accepted.

The user observed that Host: <assigned-host>. returns 404. I reproduced this against the current GM target and compared the assigned Host with the trailing-dot version on /, /api/clues, and /dispatch-3940be: the assigned Host served the app and clues, and dispatch returned 403 webhook_rejected; the trailing-dot Host returned 404 not_found on all three paths with 0–1 ms of cfWorker time. Host values containing /, ?, or # were rejected by Cloudflare with 400 before Worker timing. A small forwarded-client and forwarded-host matrix (X-Forwarded-For loopback, two-value chains in both orders, unknown, Forwarded: for=127.0.0.1, and both forwarded-host headers set to the dotted assigned hostname) remained 403 webhook_rejected.

This is useful evidence of host-based target mapping: the trailing dot changes the host route before the challenge app serves any path. It does not reach the protected dispatch handler, so it cannot currently pass as a trusted webhook. It is also not evidence that Starlette accepted the request and reconstructed a different request.url.path. The known BadHost advisory requires URL delimiters such as /, ?, or # in Host; the fronting edge rejects those forms. The bounded tests are reproducible in scripts/malformed_host_probe.py and scripts/proxy_chain_probe.py.

Other current Starlette advisories fit poorly: CVE-2026-48710 and CVE-2026-54282 involve URL reconstruction and path/host trust (already tested here); CVE-2026-54283 concerns form parser resource limits and is a DoS issue; CVE-2026-48818 concerns Windows StaticFiles UNC handling; and the older multipart issues are unrelated to the observed JSON signature gate. The official advisory list and descriptions are at Starlette's security advisories.

Blocker and resumption criteria

The strongest current interpretation is that the gate expects a signature based on a key or canonicalization method that the exposed GM prompt and target clues do not reveal. This is an inference, not a fact about the intended solution. The missing discriminator is an official signing-key/format hint or new response behavior that narrows the verification algorithm. Resume by reading GM status first, then test only the newly supported hypothesis against the currently assigned target. Do not submit a guess.

Reproducible recon

The small in-scope GET recon script is scripts/recon.py. Run it from the repository root under WSL:

wsl --cd [local path] python3 challenges/Trust_the_Webhook/scripts/recon.py

The script currently records the assigned target URL in its source because it was written against this active attempt. Replace that URL with the latest GM-assigned target before reuse. It is reconnaissance only; it does not recover or submit a proof.

Lessons for solving web-exploitation lane challenges faster

The reliable speedup comes from reducing uncertainty early and automating only evidence-backed recognition. A 100x improvement is a target, not a measured result for this challenge.

  1. Read the GM contract before starting. Record lane, mode, answer IDs, answer formats, deadline behavior, and run_for_time_supported. For a web challenge, each started mode supplies fresh target URLs; never assume targets or secrets carry across modes.
  2. Make one compact first-contact capture. Save the exact response bytes for /, every linked asset, /robots.txt, and the advertised clue/feature routes. Record status, content type, Allow, redirects, relevant headers, and response body. Fingerprint the page and clues locally instead of re-reading them by hand.
  3. Turn page clues into a small route map. Extract routes, methods, roles, event types, scopes, and identifiers. Test the advertised route's method behavior once. Do not spend the first minutes guessing unrelated framework endpoints.
  4. Use differential probes with a stated question. For each request, vary one property and compare status, body, headers, and timing. A response invariant across a broad input set is evidence to stop that branch, not a reason to expand the wordlist.
  5. Separate parse gates from trust gates. First establish accepted media type and body shape. Then identify the signature/trust check. If all valid dictionaries converge on one rejection response, preserve that as the current gate and pivot to a supported clue about key source, canonicalization, route handling, or a confirmed framework issue.
  6. Use a deterministic extractor as soon as the family is known. A reusable solver should take the current GM start object, map each question's artifact to its target URL, call the correct fingerprint/exploit recipe, validate the exact proof syntax, and build a complete {answer_id: proof} object before one batched submission.
  7. Keep an explicit coverage matrix. Track which modes, target variants, methods, and answer IDs are solved. On Mastery, parallelize only independent targets after confirming the exploit recipe; validate every returned proof and submit once with the exact IDs.
  8. Protect timed windows with the untimed solve. Establish the exploit and test it on Single Solve first. Then run a normal untimed Time Trial/Mastery attempt if regular scoring is desired; only request a ranked timer after the complete extractor is ready and authorized.
  9. Stop after two low-signal branches. Record meaningful negatives and a retry condition. Do not repeat generic source-disclosure, signature-header, or path lists without new evidence.
  10. Measure the real bottleneck. Capture release-to-first-request, target readiness, exploit runtime, submission runtime, and accepted status. Automate the portion that dominates measured elapsed time; don't optimize guesses or documentation overhead while the exploit itself remains unknown.

Suggested reusable web lane runner

For future challenges, prebuild one runner with these deterministic stages: read-only GM list/status; normal start/resume; save the returned JSON and exact targets; parallel per-target fingerprinting; family-specific extractor; exact answer-ID/format gate; single batched submission; status confirmation. Put reusable recipes in the existing challenges/_lib web capability store, keep challenge-specific helpers under challenges/<ChallengeName>/scripts/, and add a sanitized regression fixture for each promoted recipe. This challenge currently lacks the confirmed family-specific extractor, so no runner should submit an answer for it yet.