maybe
Category: Rev
Description
is this an easy rev challenge?? maybe .... just maybe ...
Attachments: chall
Write-up
The following code snippet is the pseudocode of main()
in the chall
binary generated by Ghidra:
From the provided code, it is evident that the program prompts the user to enter a flag, which can be up to 64
bytes in length, storing the input in the local_68
buffer. However, subsequent conditions check if the length of the user input is exactly 33
. If it is not, the program terminates.
When the user input has a length of 33
, the program iterates over each character using local_6c
as the iterator, starting from the fourth index of the input. The program proceeds to the next iteration only if the following condition is satisfied:
Text Only | |
---|---|
The flag buffer is defined as follows:
Text Only | |
---|---|
To obtain the flag, we can utilize the Z3 theorem prover to define the constraints of our problem and solve for the input that satisfies these constraints.
You can find the Python script that utilizes constraint solving with Z3 here.
Upon running the script, we obtain the flag:
Flag: tjctf{cam3_saw_c0nqu3r3d98A24B5}