NahamCTF 2024 writeups for Ring Cycle 2
文章目录
Start
Like the first one, the program also need us to input the correct passphrase to get the flag.
|
|
Code Content
Load it into IDA, we could quickly get of this, which almost as the first one in main function:
|
|
So let’s check the check()
function.
|
|
In here, the logic also very clear, according to man 3 strtol
, we could get that the seed
variable is 0
. so we could make
the function logic more clear like follow:
|
|
Solution
This logic is clearer than the first level. The only thing to pay attention to is we need reverse the swap order.
|
|
use the correct passphrase to get the flag:
|
|
文章作者 curtainp
上次更新 2024-05-28 (8ae03f7)