Hintru Propina ENES ← Todos los labs

Tanuki: Flashcard Backup Restore

EN medium CTF challenge XXEXML External Entityin-band exfiltrationJS bundle reconAPI enumerationDTD injectionarbitrary file read
Original

Tanuki is a flashcard web app with an XML-based deck export and a JSON-driven restore endpoint. The server secretly round-trips your JSON through an XML template with DTD processing enabled — giving you a path to read arbitrary files off the server without any out-of-band channel. Your goal is to exfiltrate the flag at /app/flag.txt entirely in-band.

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

Paso 6 · Identify the correct file path past the decoys

Objetivo: Enumerate the real path to the flag file by testing multiple candidates, recognizing that common paths (/etc/passwd, /proc/self/cmdline) return a deliberate decoy string.

Contexto: The app returns 'Flag is in a different file' for /etc/passwd and /proc/self/cmdline — these are intentional red herrings. Wrong paths (e.g. /flag.txt) leave the entity reference literal and unresolved. The flag lives at /app/flag.txt.

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

Common Linux file paths return misleading content here. Think about where a Node/Express app's working files would actually live inside a container.

Pista 2 — técnica / clase de vuln

Try paths like /app/flag.txt, /var/app/flag.txt, /home/node/flag.txt. A resolved but decoy result means the path exists but is a trap. An unresolved &xxe; means the path doesn't exist. Actual flag content means you found it.

Pista 3 — casi la solución

Use the dtd + name injection from the previous step but change the SYSTEM path. Try "file:///app/flag.txt" — a Node app deployed in Docker typically runs from /app. If name returns a bug{...} string, that is the flag.

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 ☕ ☕