SANS Holiday Hack 2026: Reversing Introduction
Walking through a 32-bit Linux binary from SANS Holiday Hack 2026: finding a hidden debug menu behind a modulo check and spotting an unsafe strcpy().
Contents
Challenge prompt: “A guided walk through a compiled Linux binary. Answer each question about how it works, including a hidden mode and an unsafe piece of code.”

Starting point
This challenge hands us a compiled Linux binary (./challenge_binary) and walks us through answering questions about what it does. The prompt tips us off to two specific things we want to track down:
- a hidden mode
- an unsafe piece of code
Running file gives us our first quick look:
ELF 32-bit LSB executable, Intel 80386
dynamically linked
for GNU/Linux 3.2.0
not stripped
That “not stripped” part is huge. Because the symbols are still intact, tools like strings, nm, objdump, and Ghidra give us real function names instead of anonymous offsets.
A quick strings pass immediately surfaces a useful map of the program:
func_choice
func_math_operation
func_debug
func_block_verification
strcpy
fgets
Just from that output, we can already see a menu flow, a hidden debug function, and the two functions involved in input handling (fgets and strcpy). Next, let’s trace how they fit together.
Build info and entry point
One of the compiler strings in the binary shows it was built with GCC 9.4.0 on Ubuntu. That doesn’t crack anything by itself, but it tells us the build environment and calling conventions to expect while reading the disassembly.
From there, following the main control flow lands us in the menu-handling function (func_choice). It reads the user’s selection and branches to the available features, so this is the right place to look for the hidden mode.
Tracing the hidden modulo gate
Inside the menu logic, the user’s input goes through a modulo operation against 0xa2 (162 in decimal) and gets compared to a secret number:
user_input % 162 == secret_number
Modulo gives the remainder after division, and here it acts as a hidden gate. Checking the comparison value shows it’s looking for 42.
Since 42 % 162 == 42, entering 42 (or any number congruent to 42 mod 162) drops us straight into the hidden branch instead of the normal menu options. Notice it’s checking for a remainder of 42, not 0.
Reaching the debug menu and vulnerable path
Passing that check sends execution into func_debug, an unlisted debug menu with extra options including program info and block verification.
Following block verification takes us into func_block_verification, which is where the unsafe code lives.
Safe input first, unsafe copy second
At first glance, func_block_verification looks careful: it allocates a 512-byte input buffer and reads user data with fgets, which bounds the read so you can’t overflow that initial buffer.
The bug happens right afterward when it passes that buffer to strcpy:
strcpy(destination, source);
strcpy has no idea how big destination is and keeps copying bytes until it hits a null terminator. While fgets protected the 512-byte source buffer, the destination stack buffer is only 132 bytes:
up to 512-byte input (fgets)
|
v
unbounded strcpy()
|
v
132-byte stack destination
Anything longer than 132 bytes spills past the destination buffer into adjacent stack memory, which can corrupt saved state or crash the process.
No full exploit needed here. The interesting part is that the bounded fgets call looks safe on its own, but the later strcpy can still overflow the smaller destination.