$ cat writeup.md…
$ cat writeup.md…
securinets2026
Task: PIE heap pwn, two-slot secrets manager with UAF read, double free and no NULL-out; bundled libc is custom glibc 2.43 with tcache/fastbins compiled out. Solution: libc leak, merge-overlap, smallbin poison via binmap-loop unlink for an arbitrary libc write, then House of Apple 2 via _IO_list_all on exit(0).
$ cat /etc/rate-limit
Rate limit reached (20 reads/hour per IP). Showing preview only — full content returns at the next hour roll-over.
House of ekko
English summary: a 64-bit PIE binary implements a tiny "secrets" manager with a
global array of two slots (secrets[2]). alloc mallocs and reads a string,
delete frees, show prints. delete never nulls the slot, so it exposes a UAF
read and a double-free. The bundled libc is a custom glibc 2.43 built with
USE_TCACHE=0 — tcache and fastbins are compiled out. The goal is code
execution through the heap and a glibc FSOP (FILE-stream oriented programming)
attack, then read the flag on the remote instance.
checksec / ELF properties:
secrets array (2 pointers) at 0x4060; an unused rand_fd at 0x4070.main offers a 4-entry menu: 1 alloc, 2 delete, 3 show, 4 exit (exit(0)).Pseudo-code of the handlers:
void alloc(int idx, long size) { // idx in [0,2), size > 0, no upper bound if (idx < 0 || idx > 1 || size <= 0) return; secrets[idx] = malloc(size); fgets(secrets[idx], size, stdin); // size passed as 32-bit } void delete(int idx) { if (idx < 0 || idx > 1) return; free(secrets[idx]); // <-- no secrets[idx] = NULL } void show(int idx) { puts(secrets[idx]); } // UAF read
delete() frees the chunk but leaves the dangling pointer in secrets[idx].
This yields:
show on a freed slot (leaks fd/bk of freed chunks)....
$ grep --similar