学习笔记之手动patch
【文章标题】: 学习笔记之手动patch【软件名称】: crackme_aspacked
【软件大小】: 10.0 KB
【下载地址】: 见附件
【加壳方式】: ASPack 2.12 -> Alexey Solodovnikov
【编写语言】: MASM32 / TASM32
【软件介绍】: 一个简单的crakeme
【作者声明】: 只是感兴趣,没有其他目的。失误之处敬请诸位大侠赐教!
--------------------------------------------------------------------------------
【详细过程】
今天学习到天草初级班的第十课patch,看完教程,跟着操作一遍后,就想自己搞定它,于是就有了下面的文章!
首先手动patch:
00405001 >60 PUSHAD
00405002 E8 03000000 CALL crackme_.0040500A
00405007- E9 EB045D45 JMP 459D54F7
F8到00405002,然后用硬件断点法:Esp寄存器——数据窗口跟随——在数据窗口,右击,断点,硬件访问断点-word,F9运行:
004053B0 /75 08 JNZ SHORT crackme_.004053BA
004053B2 |B8 01000000 MOV EAX,1
004053B7 |C2 0C00 RETN 0C
004053BA \68 00104000 PUSH crackme_.00401000
004053BF C3 RETN
这时在od中往下拉,找到一个空白地址,这里选在004055B7
将004053B0 /75 08 JNZ SHORT crackme_.004053BA改为
004053B0 /0F85 01020000 JNZ crackme_.004055B7
然后在004055B7处写下如下代码:
004055B7 C605 03124000 0>MOV BYTE PTR DS:,3
004055BE^ E9 F7FDFFFF JMP crackme_.004053BA
或:
004055B7 C605 03124000 0>MOV BYTE PTR DS:,0EB
004055BE^ E9 F7FDFFFF JMP crackme_.004053BA
然后保存文件就可以了。
当然也可以脱壳后爆破:
004011F7/$55 PUSH EBP
004011F8|.8BEC MOV EBP,ESP
004011FA|.6A 00 PUSH 0 ; /RootPathName = NULL
004011FC|.E8 99000000 CALL crackme_.0040129A ; \GetDriveTypeA
00401201|.83F8 05 CMP EAX,5
00401204|.74 17 JE SHORT crackme_.0040121D
00401206|.6A 30 PUSH 30 ; /Style = MB_OK|MB_ICONEXCLAMATION|MB_APPLMODAL
00401208|.68 14304000 PUSH crackme_.00403014 ; |Title = "FaNt0m's CrackMe #3 -- CD Check"
0040120D|.68 40304000 PUSH crackme_.00403040 ; |Text = "Error finding CDROM"
00401212|.6A 00 PUSH 0 ; |hOwner = NULL
00401214|.E8 51000000 CALL crackme_.0040126A ; \MessageBoxA
00401219|.C9 LEAVE
0040121A|.C2 0400 RETN 4
0040121D|>6A 00 PUSH 0 ; /Style = MB_OK|MB_APPLMODAL
0040121F|.68 14304000 PUSH crackme_.00403014 ; |Title = "FaNt0m's CrackMe #3 -- CD Check"
00401224|.68 54304000 PUSH crackme_.00403054 ; |Text = "Found a CDROM! Good job!"
00401229|.6A 00 PUSH 0 ; |hOwner = NULL
0040122B|.E8 3A000000 CALL crackme_.0040126A ; \MessageBoxA
00401230|.C9 LEAVE
00401231\.C2 0400 RETN 4
**********************************************************************
将00401201|.83F8 05 CMP EAX,5改为00401201 CMP EAX,3
或者将00401204 JE SHORT crackme_.0040121D改为: JMP SHORT crackme_.0040121D
--------------------------------------------------------------------------------
2009年07月21日 10:39:28 学习一下啊!/:good /:good /:good 支持一下~!
页:
[1]