Signalization Two
Signalization Two
Platform: CUSTOM | Category: Reversing | Type: Challenge | Difficulty: Easy | OS: N/A | **Author: XESXOR Techniques: signal_handler_analysis, stack_string_reconstruction, static_analysis
Summary
Walkthrough of the CUSTOM Reversing Signalization Two. Task: a 64-bit Linux ELF registers a signal handler and then waits for input, hiding the flag path behind SIGINT. Solution: identify signal 2 as SIGINT, inspect the handler, and reconstruct the stack
Description
ELF64 Linux binary from rev-kids20 that reacts to a signal instead of normal input.
The challenge binary does not reveal the flag through the regular input path. Instead, the useful logic is hidden in a signal handler that runs only when the process receives the correct signal.
Summary
The binary calls signal(2, handler) in main, then blocks in fgets(). On Linux, signal number 2 is SIGINT, so pressing Ctrl+C triggers the handler, which builds a flag-like string on the stack and prints it with puts(). Static analysis shows the template Flag{This Is Simple} is intentionally modified at three positions, producing the real output Flag{REDACTED}.
Analysis
The important control flow is very small:
mainregisters a handler withsignal(2, handler).- The program then waits in
fgets(). - While it is blocked, sending
SIGINTruns the custom handler.
On Linux, signal number 2 is SIGINT, which is exactly what Ctrl+C sends to a foreground terminal process. That makes this a signal-triggered flag reveal instead of a normal input-validation task.
Inside the handler, the binary constructs a string on the stack and prints it via puts(). The base string is clearly:
text read-only • copy allowedFlag{This Is Simple}
But three bytes are overwritten before printing:
h→*I→1s→4
Applying those changes gives the final printed string:
text read-only • copy allowedFlag{REDACTED}
Solution
Dynamic idea
On a Linux machine, the intended behavior can be reproduced directly:
bash read-only • copy allowedchmod +x signalization2.elf ./signalization2.elf # press Ctrl+C
Because the program is waiting in fgets(), Ctrl+C delivers SIGINT and transfers execution into the registered handler, which prints the flag.
Static solution path
If you solve it statically:
- Open
mainin a disassembler. - Notice the call to
signal(2, handler). - Map signal
2toSIGINTon Linux. - Inspect
handlerand reconstruct the stack string. - Account for the three byte overwrites.
Minimal reconstruction script:
python read-only • copy allowed#!/usr/bin/env python3 flag = list("Flag{This Is Simple}") flag[6] = '*' # h -> * flag[10] = '1' # I -> 1 flag[11] = '4' # s -> 4 print(''.join(flag))
Key Takeaways / Lessons
- Mastering signal_handler_analysis, stack_string_reconstruction, static_analysis was key to this challenge.
- Always check for common misconfigurations and verify assumptions.
Crafted by XESXOR Research • 2026-03-26 • CUSTOM • Signalization Two • Difficulty: Easy