Hintru ENES ← Todos los labs

MesaNet Portal — Rail Broadcasts

EN hard CTF challenge Stored XSSXSS botCSRFconfused deputyinnerHTML sinkheadless browsersession hijackAPI abuse

The MesaNet Portal hosts a "Rail Broadcasts" application accessible through a JSON gateway API. A low-privilege operator account can interact with several broadcast endpoints, but a confidential note owned by a privileged automated user sits just out of reach. The challenge requires chaining the broadcast creation pipeline with the automated oversight system to escalate access without ever touching the privileged session directly.

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

Paso 5 · Craft the exfiltration payload

Objetivo: Build a JavaScript payload that, when executed in the bot's browser, fetches note 6 using the bot's own session and then publishes the note's contents as a new public broadcast.

Contexto: You have confirmed stored XSS via the `message` field. The bot visits the rail viewer with its own privileged `sysbot` session. Your goal is to write JavaScript that: (1) calls `/gateway` → `/api/notes/get` with `id:6` using `credentials:"include"` so the bot's cookies are sent, and (2) takes the response and publishes it via `/gateway` → `/api/rail/create` so you can read it back as an announcement. The payload must fit inside an HTML attribute (avoid `<script>` — it's stripped by innerHTML).

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 how to make two sequential `fetch()` calls in the bot's browser: first to read the note (using the bot's session cookie automatically via `credentials: 'include'`), then to write the result somewhere you can read. What HTML tag and attribute let you embed JS without a `<script>` block?

Pista 2 — técnica / clase de vuln

Use an `<img src=x onerror='...'>` wrapper. Inside `onerror`, chain two `fetch('/gateway', ...)` calls — the first with `endpoint: "/api/notes/get"` and `data:{id:6}`, the second (in `.then()`) with `endpoint: "/api/rail/create"` to publish the note body as a new announcement message. Use `credentials:"include"` on both calls.

Pista 3 — casi la solución

Because the attribute uses single quotes, your JS body can freely use double quotes for JSON strings. Embed the note JSON in the `message` field of the second `create` call with a recognisable prefix like `"PWN_"` so you can spot it later in the announcements list. Keep the note body slice short enough to stay under any field-length limit.

Tu intento