$ cat writeup.md…
$ cat writeup.md…
Hack.lu CTF 2026
Task: Spring Boot + jOOQ app with a Postgres system DB, a SELECT-only MariaDB playground and a Redisson-backed Redis executor. Solution: raw jOOQ identifier SQLi to shadow app_user in pg_temp, MariaDB redirect_url to a rogue server for a synthetic extdb row, LDAP-bind Redis command injection, then Redis replication to deliver a Redisson classBody RCE that runs /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.
how2database — Do you know how to database? Prove it!
English summary: a Spring Boot 3.3.5 (Java 17) "SQL lessons / playground" web app sits in
front of three backing stores: a PostgreSQL "system" database (login + lesson content)
accessed through jOOQ, a MariaDB "playground" database accessed as the low-privileged
readonly user (SELECT only), and a Redisson-backed Redis/Valkey distributed executor.
The flag lives at /flag.txt (root:root 400) in the app container, with a setuid
/readflag helper available only there. The goal is arbitrary code execution inside the
app JVM to read it.
GET /lessons?q=&order= — jOOQ query; order is a user-controlled field name.GET /lessons/{id}POST /login, POST /logout, GET /mePOST /playground/query — text/plain SQL body, executed against MariaDB (auth required).POST /playground/ext/{id} — text/plain LDAP DN body; looks up extdb in MariaDB and
performs a JNDI LDAP query (auth required).Backing versions: Spring Boot 3.3.5, Java 17, jOOQ 3.19.14, pgjdbc 42.7.4, mariadb-java-client 3.5.0, redisson 4.6.1, HikariCP 5.1.0, PostgreSQL 18.6, MariaDB 12.3.3, Valkey/Redis 9.1.2.
...
$ grep --similar