查壳:
拖入软件中发现是一个32位没有壳的软件,打开运行一下,发现是个游戏类型的。
逻辑:
拖入ida中查看逻辑,直接搜索函数main,进去之后一直往下翻直到代码为止。
if ( byte_532E28[0] == 1
&& byte_532E28[1] == 1
&& byte_532E28[2] == 1
&& byte_532E28[3] == 1
&& byte_532E28[4] == 1
&& byte_532E28[5] == 1
&& byte_532E28[6] == 1
&& byte_532E28[7] == 1 )
{
sub_457AB4();
知道了sub_457AB4()函数里面,是flag存放的位置,告诉了我们八个全为1的时候,就可以出现flag,咱们再一次打开游戏,要是想要flag,里面的But you should pay attention to one thing,if you change the state of the Nth lamp,the state of (N-1)th and (N+1)th will be changed too告诉了我们是什么逻辑。
如果想赢,那么就遵循这个逻辑,最后推到出来,是12345678即可。
flag是zsctf{T9is_tOpic_1s_v5ry_int7resting_b6t_others_are_n0t}