🚩 Challenge Overview
- Platform/Event: Google CTF 2025
- Difficulty: Easy
- Points: 110
- Solves: 541
- Category: Reversing
- Tags: ELF x64, Static Analysis, Equation Solving, Z3 Solver
📝 Description
A simple C++ binary that validates user input character-by-character using nested math equations. Extract the equations to calculate the flag.
💡 Solution / Approach
-
Open binary in IDA Pro. Locate the flag verification loop.
-
The code performs linear transformations:
(input[i] ^ key[i]) + 5 == target[i]. -
Extract arrays
keyandtargetfrom data section. -
Write a simple Python Z3 script to solve the equations and rebuild the flag.