|
[结束][第一阶段◇第二题]看雪论坛.珠海金山2007逆向分析挑战赛
出题的那晚就做出来了,但做得不好,本不想提交的,不过占了沙发不提交就太浪费了 ...所以还是提交吧... |
|
[原创]第一题答案提交
以前对PE不是很熟悉,不过第二题还是做了,本不想提交的(第一题过了),不过后来发现有些东东有些意思(比如程序中本来就有一个延时载入的MessageBox不用再加入这个Import函数,而且本来就有载入资源,不用再用LoadMenu),就在今天又改了代码,现在才放上来 由于以前没有对PE深入的研究,也很少看PE的文章,这题仅是凭自己的一些对PE不多的认识来做的,所以可能有太多的弯路,过程如下: 1.找了一个PE程序,COPY它的头(1000H长),将三个段文件依次附加在后面(因为这三个段文件本来就是1000H的整倍数也就是4K边界对齐了的,不用再调整),在PE编辑器中改段的大小,和添加段表,清所有TABLE为0 2.OD载入后,分析代码段,由CAll [XXXX] IAT 表,并由此找到整个ImportTable数据,记下地址,退出OD后用PE编辑器改ImportTable 3.OD载入后可以看到 Call API函数,查找分析程序一般情况下程序入口对常用的API调用,找到程序入口地址,再退出OD用PE编辑器改入口地址,这时程序可以运行了 4.在VC中新建一个工程,添加菜单资源,并编译资源文件,生成一个XXX.Res文件.(之前分析被修复程序本身有自动加入菜单地方,其菜单名字为"pediy.com",因此添加菜单资源时取名为"pediy.com",这样加入资源后程序能自动载入,不用再加入LoadMenu代码) 5.用ResourceHacker将XXX.Res文件中的菜单资源添加到修复了的程序中.这时运行程序将会发现菜单已自动显示. 6.添加MessageBoxA的Import函数(这儿没有添加,因为分析程序时发现一个用于错误处理的一个延时载入MessageBox子程序,其地址为004059C4,函数原型应该是: int MessageBox( LPCTSTR lpText, LPCTSTR lpCaption, UINT uType ); 6.加入Patch代码,以处理菜单命令.在代码段后面找到一个空地,下入以下代码: 00406B80 817C24 08 11010000 cmp dword ptr [esp+8], 111 ;WM_COMMAND 00406B88 ^ 0F85 47A7FFFF jnz 004012D5 00406B8E 66:837C24 0C 68 cmp word ptr [esp+C], 68 ;About命令ID,资源文件自定义时的值 00406B94 ^ 0F85 3BA7FFFF jnz 004012D5 00406B9A 60 pushad 00406B9B 6A 40 push 40 00406B9D 68 8C804000 push 0040808C ; ASCII "pediy" 00406BA2 68 C06B4000 push 00406BC0 00406BA7 E8 18EEFFFF call 004059C4 ;延时载入的MessageBox 00406BAC 83C4 0C add esp, 0C 00406BAF 61 popad 00406BB0 33C0 xor eax, eax 00406BB2 C2 1000 retn 10 00406BC0 BF B4 D1 A9 C2 DB CC B3 2E D6 E9 BA A3 BD F0 .看雪论坛.珠海金 00406BCF C9 BD 32 30 30 37 C4 E6 CF F2 B7 D6 CE F6 CC F4 山2007逆向分析挑 00406BDF D5 BD C8 FC 0D 0A 68 74 74 70 3A 2F 2F 77 77 77 战赛..http://www 00406BEF 2E 70 65 64 69 79 2E 63 6F 6D 00 .pediy.com. 并改 RegisterClass 窗口消息处理入口地址: 0040121A |. C745 B4 D5124>mov dword ptr [ebp-4C], 004012D5 ;原消息处理入口地址 为: 0040121A C745 B4 806B4000 mov dword ptr [ebp-4C], 00406B80 到此,整个题目完成. pediy2-Done.rar |
|
|
|
|
|
|
|
[分享]Themida/WinLicense V1.8.2.0 脱壳的祥细过程(不明白细节者适用)
视频的,而且非常详细,的确不错,赞一个先... 不过... 楼主的五笔和拼音都还需要加强呀... 看着你打那个 "陷井" 二字足足用了1分多钟且用五笔和拼音都没能打出来结果还是用"陷进"代替...看着偶都着急,恨不得帮你打了... 另偶之前也发现脱壳后进游戏会断开.还以为是偶自己没脱干净...希望能找到原因... 还有那个视频,能从中播放一部分吗?怎么总是从头放... |
|
|
|
|
|
|
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值