2017第二届广东省强网杯线上赛nonstandard

https://kabeor.cn/https://kabeor.cn/https://kabeor.cn/https://kabeor.cn/https://kabeor.cn/https://kabeor.cn/https://kabeor.cn/https://kabeor.cn/https://kabeor.cn/https://kabeor.cn/https://kabeor.cn/https://kabeor.cn/

OD分析

先运行一下,输入错误的话直接退出
mark
查壳发现无壳,VC++2013写的

拖进OD,先搜索字符串,非常明显
mark
在Please Input Flag后面和yes前的cmp判断下断点
运行起来跟一下,发现call Nonstand.00401480是对我们输入的字符串做变换,看来又是个算法题了,IDA-F5吧

IDA分析

找到提示所在位置,F5
mark
看起来非常简单啊
我们只需要让sub_401480函数等于1就好了,所以我们进去看看
mark
v1是我们输进去的,sub_401070是对输入的进行变换,得到v2
然后就是对每一位进行移位操作后与byte_402120进行比较
byte_402120的值为
mark

nAdtxA66nbbdxA71tUAE2AOlnnbtrAp1nQzGtAQGtrjC7===

千万注意前面的n,差点让坑

然后我们就只需要分析sub_401070这个变换了,打开以后,

wtf。。。

mark
mark
mark
我就只截取关键部分了