$ cat writeup.md…
$ cat writeup.md…
Hack.lu2026
Task: Flask hash-cracking service runs john under `mpirun -n 1`, exposing PRTE OOB listeners on 0.0.0.0. Solution: reach the HNP listener over the pod network, leak its name with a PROBE, skip IDENT auth, and inject a PRTE_PLM launch job over RML to run /readflag.
$ cat /etc/rate-limit
Rate limit reached (20 reads/hour per IP). Showing preview only — full content returns at the next hour roll-over.
Jenkins, Jira, Java: all good software starts with J
English summary: a Flask app exposes a single hash-cracking endpoint. POST with
hash=<h>&format=<descrypt|md5crypt|bcrypt> writes u:<hash>\n into
/var/www/jobs/<job>.hash and then runs, as uid 33 (http):
timeout 30 mpirun -n 1 john --format=<fmt> /var/www/jobs/<job>.hash > <job>.out 2>&1; touch <job>.done
GET /?job=<16hex> waits for <job>.done, then prints the first line of
<job>.out matching ^(.+?)\s+\(u\)\s*$ inside <pre>. Hash input is limited
to [./$A-Za-z0-9]{10,120} and format to an exact three-element list, so the
obvious injection surfaces are closed. The goal is code execution: /readflag
is mode 2555 root:1337 (world-executable, setgid 1337) and prints the flag,
while /flag.txt is 0040 root:1337 — so merely reading a file is not enough,
we need to run a program.
Category is misc with a pwn label. The task name is the pun: the "good
software" is John the Ripper, but the actual bug is not in John at all.
Everything a player controls (hash bytes, format, job id) is tightly validated:
format must be one of descrypt, md5crypt, bcrypt — an exact list, no
injection there.hash must match [./$A-Za-z0-9]{10,120} — no quotes, spaces, semicolons,
newlines, or $() expansion reachable through the argument itself (it is also
shlex.quoted).job is generated with secrets.token_hex(8).A very large amount of time was spent fuzzing John's hash parsers
(descrypt/md5crypt/bcrypt, ASan/UBSan/valgrind, differential ASan-vs-release,
MALLOC_CHECK_/MALLOC_PERTURB_ sweeps over the whole mpirun lifecycle). It is
clean — that is a dead end. The interesting word in the command is not
john, it is mpirun.
mpirun -n 1 is there...
$ grep --similar