ImaginaryCTF_2024 Writeups
Writeup for rev challenges in the event.
Overview
The CTF was fun. I had the chance to apply new skills to solve the challenges.
BF
- Given file:
BF.txt
- Description: Simple equations… but in BF?!!!
We are given a Brainfuck source code in text file. Luckily, my friend has a site to execute the code in continuation or one command at a time. I infer that the code take one character at a time, adds it with the number of pluses in the first part multiply with the number of pluses in the second parts then subtracts with the number of minuses in the third part. (I know the real logic is not like that but this is my way of inferring it)
We now do a bit of scripting:
|
|
ictf{1_h4t3_3s0l4ng5_7d4f3a1b}
watchdog
- Given file:
watchdog
- Description: The keepers of the Watchdog vault have forgotten their password. Can you help them retrieve it?
I heard that there is mathematical way to do it but I’m dumb. Time for some z3
|
|
ictf{i_l0ve_interp0lati0n_2ca38d6ef0a709e0}
unconditional
- Given file:
chal
- Description: Can you reverse this flag mangler? The output is b4,31,8e,02,af,1c,5d,23,98,7d,a3,1e,b0,3c,b3,c4,a6,06,58,28,19,7d,a3,c0,85,31,68,0a,bc,03,5d,3d,0b
The input only contains lowercase letters, numbers, underscore, and braces .
Analyzing the code in IDA, I see that each character in the input is processed and a value is print out idependently, further more the description said the input only contains lowercase letters, numbers, underscore, and braces. That means I should brute force it.
|
|
ictf{m0r3_than_1_ways_t0_c0n7r0l}
Absolute Flag Checker
- Given file:
absolute flag checker.exe
- Description: What’s easier way than verifying flag contents more times than required?
That’s a lot of code in main. The code perform many “If” by adding and multiplying 47 characters of the flag (v52 to v98). I personally don’t know any better ways to solve this. I just copy the whole logic and try to strip it “if” by “if” have z3 do the job.
|
|
ictf{that_is_a_lot_of_equations_n2u1iye21azl21}
SVM Revenge
- Given file:
svm_revenge
,output.bin
- Description: As foretold, the revenge of SVM from round 46 is here!
The code seem confusing at first but it really just pushing and poping two queues, with the queue containing flag segment being dumped out in output.bin. Z3 should do the magic.
|
|
ictf{S_d1dnt_5t4nd_f0r_5t4ck_b3c4u53_h3r3_I_us3d_4_L1nk3d_qu3u3}