csaw2013reversing2
IDA分析写脚本
方法一:写脚本运行得到flag
查看main函数
1 | hHeap = HeapCreate(0x40000u, 0, 0); |
查看sub_401000:
1 | v2 = dword_409B38; |
找v2:小端序,可以直接转换为字节查看

写脚本:
1 | lpMen=[0xBB,0xCC,0xA0,0xBC,0xDC,0xD1,0xBE,0xB8,0xCD,0xCF,0xBE,0xAE,0xD2,0xC4,0xAB,0x82, |
1 | flag{reversing_is_not_that_hard!} |
OD调试
方法二:OD调试
在IsDebuggerPresent()段首处下断
在ints处会跳出乱码,下断点
在两个跳的地方下断,F8运行
IDA分析修改代码
IDA分析修改代码:jnz改jmp
修改步骤:Edit > Patch program > Assemble
int3改nop,否则程序会中断
jmp后面改成loc_4010B9,就是跳出lpMen的函数

最后保存Edit > Patch program > Apply pathes to input file