$ cat writeup.md…
$ cat writeup.md…
hackthebox
Task: Navigate a 3D maze in an ELF binary with remote server interaction. Solution: Used DFS with backtracking to dynamically explore the unknown server-side maze, as the binary contained different test data.
$ cat /etc/rate-limit
Rate limit reached (20 reads/hour per IP). Showing preview only — full content returns at the next hour roll-over.
"Within Vault 8707 are located master keys used to access any vault in the country. Unfortunately, the entrance was caved in long ago. There are decades old rumors that the few survivors managed to tunnel out deep underground and make their way to safety. Can you uncover their tunnel and break back into the vault?"
The challenge provided:
nc 83.136.248.107 38062Downloaded and extracted the challenge files. Found an ELF 64-bit binary called tunnel.
$ file tunnel tunnel: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked...
Found interesting strings that reveal the challenge mechanics:
$ strings tunnel | grep -E "(Direction|Cannot|flag|vault)" Direction (L/R/F/B/U/D/Q)? Cannot move that way /flag.txt HTB{fake_flag_for_testing} You break into the vault and read the secrets within...
Key findings:
Using objdump to identify key functions:
$ objdump -t tunnel | grep -E "(main|get_cell|prompt|flag)"
Key functions identified:
main — Main game loopget_cell — Calculate cell position in 3D mazeprompt_and_update_pos — Handle movement inputget_flag — Read and print flag on successFrom disassembly of get_cell:
// Pseudo-code reconstruction struct Cell { int x, y, z; // Coordinates int type; // 0=start, 1=path, 2=wall, 3=goal }; ...
$ grep --similar