$ cat writeup.md…
$ cat writeup.md…
Hack.lu 2026
Task: cmus 2.12.0 remote protocol restricted to safe commands; goal is running SUID /readflag. Solution: URL fast-path track names smuggle shell lines into pl-export status, status_display_program=sh executes the planted script, and colorscheme traversal sources the result back to the client socket.
$ cat /etc/rate-limit
Rate limit reached (20 reads/hour per IP). Showing preview only — full content returns at the next hour roll-over.
Category: misc (logic exploitation) · Flag format: flag{...}
The challenge exposes cmus v2.12.0's remote-control protocol over TLS on port 443 (password is given in the task). TCP clients run with run_only_safe_commands = 1, which blocks every command flagged CMD_UNSAFE (bind, run, shell, source, w, win-remove, and save unless its argument is -). The goal is code execution to run the SUID-root helper /readflag, which demands exactly argc == 6 with argv[1..5] spelling please give me the flag.
version answers v2.12.0; the challenge ships the cmus 2.12.0 source.command_mode.c: only the commands above are CMD_UNSAFE; add, load, echo, set, cd, colorscheme, pl-export, pl-import, player-* remain available to remote clients.spawn() (spawn.c) double-forks, redirects the child's stdout/stderr to /dev/null, closes stdin and fds 3–29, then execvps — anything spawned cannot talk back directly, so exfiltration must go through files that cmus itself reads back into the protocol stream....
$ grep --similar