这道题。。。
先运行程序,看看是个什么内容,一打开立马闪退。。。于是拖到 OD 里,来一下智能搜索试试。
中文搜索引擎
地址 反汇编 文本字符串
00401348 mov dword ptr ss:[esp],baby.00405000 libgcc_s_dw2-1.dll
0040135F mov dword ptr ss:[esp],baby.00405000 libgcc_s_dw2-1.dll
00401375 mov dword ptr ss:[esp+0x4],baby.00405013 __register_frame_info
0040138A mov dword ptr ss:[esp+0x4],baby.00405029 __deregister_frame_info
004013C0 mov dword ptr ss:[esp],baby.00405041 libgcj-16.dll
004013D8 mov dword ptr ss:[esp+0x4],baby.0040504F _Jv_RegisterClasses
0040146E mov dword ptr ss:[esp],baby.00405064 Hi~ this is a babyre //注意这里,跟进入看看
00401A50 push esi (Initial CPU selection)
00401D3E mov dword ptr ss:[esp],baby.00405080 Mingw runtime failure:\n
00401E54 mov dword ptr ss:[esp],baby.00405098 VirtualQuery failed for %d bytes at address %p
00401F21 mov dword ptr ss:[esp],baby.00405100 Unknown pseudo relocation bit size %d.\n
0040201F mov dword ptr ss:[esp],baby.004050CC Unknown pseudo relocation protocol version %d.\n
00402829 mov edi,baby.0040512C .
0040302D mov dword ptr ds:[esi],baby.0040512E glob-1.0-mingw32
004031A8 mov dword ptr ss:[esp+0x4],baby.00405142 .
004031D9 mov dword ptr ss:[esp+0x4],baby.00405142 .
跟进入以后,啥都没发现。。。程序运行起来就只有一句话,也没有其它提示,我寻思着用 IDA 试试,结果打开之后是这样
.text:00401460 push ebp
.text:00401461 mov ebp, esp
.text:00401463 and esp, 0FFFFFFF0h
.text:00401466 sub esp, 30h
.text:00401469 call ___main
.text:0040146E mov dword ptr [esp], offset aHiThisIsABabyr ; "Hi~ this is a babyre"
.text:00401475 call _printf
.text:0040147A mov byte ptr [esp+2Fh], 66h
.text:0040147F mov byte ptr [esp+2Eh], 6Ch
.text:00401484 mov byte ptr [esp+2Dh], 61h
.text:00401489 mov byte ptr [esp+2Ch], 67h
.text:0040148E mov byte ptr [esp+2Bh], 7Bh
.text:00401493 mov byte ptr [esp+2Ah], 52h
.text:00401498 mov byte ptr [esp+29h], 65h
.text:0040149D mov byte ptr [esp+28h], 5Fh
.text:004014A2 mov byte ptr [esp+27h], 31h
.text:004014A7 mov byte ptr [esp+26h], 73h
.text:004014AC mov byte ptr [esp+25h], 5Fh
.text:004014B1 mov byte ptr [esp+24h], 53h
.text:004014B6 mov byte ptr [esp+23h], 30h
.text:004014BB mov byte ptr [esp+22h], 5Fh
.text:004014C0 mov byte ptr [esp+21h], 43h
.text:004014C5 mov byte ptr [esp+20h], 30h
.text:004014CA mov byte ptr [esp+1Fh], 4Fh
.text:004014CF mov byte ptr [esp+1Eh], 4Ch
.text:004014D4 mov byte ptr [esp+1Dh], 7Dh
.text:004014D9 mov eax, 0
.text:004014DE leave
.text:004014DF retn
不对啊,这么一个入门题,应该是可以直接出 flag 的啊,再仔细看看,这后面这一堆16进制的数据是个啥,转换一下试试?
然后就出 flag 了,完后我在网上搜了一下,人家的 IDA 反编译之后直接就可以看到数据了,我这个......是我哪里没设置好吗?
网友评论