Bad Memories -v0.9- -recreation- May 2026
Category: Reverse Engineering / Forensics (Memory Analysis) Difficulty: Medium Author: CTF Player Tooling: strings , gdb / radare2 , Volatility 3 (or 2 ), hexdump , python 1. Challenge Description "We recovered a core dump from a suspicious process. The developer said it's 'just a game', but we saw unusual memory access patterns. Find the flag hidden in the bad memories." Provided file: core.dump (or bad_memories.v0.9.core ) 2. Initial Analysis First, identify the file type:
gdb -c core.dump Inside GDB:
Also found references to malloc , free , heap , and flag.txt . Since only the core dump was given (no original binary), we need to recreate the binary or at least its memory layout. Bad Memories -v0.9- -recreation-
Loading memory... [1] Allocate [2] Write [3] Read [4] Free [5] Exit A heap note manager – likely vulnerable to UAF (use-after-free) or double-free. Find the flag hidden in the bad memories
However, this core dump is process-only. Use elfutils : Loading memory
So a note was freed, then its print_func pointer was overwritten via another allocation (use-after-free write), pointing to the secret function. The core dump captured the program after the exploit but before the flag was printed. We can manually trigger the print:
Check with radare2 :