转
举例说明hiew工具使用方法
举例说明hiew工具使用方法
工具:hiew32.exe dumpbin.exe
例子文件: simple.exe
1. 用dumpbin工具将simple.exe(可以随便找一个win32的可执行文件测试)反汇编得到simple.asm文件。
dumpbin /section:.text /disasm simple.exe >simple.asm
2. simple.asm的部分汇编代码如下:
00401035: 51 push ecx
00401036: E8 45 00 00 00 call 00401080
0040103B: 83 C4 08 add esp,8
0040103E: 85 C0 test eax,eax
00401040: 74 0F je 00401051
00401042: 68 50 70 40 00 push 407050h
00401047: E8 C8 01 00 00 call 00401214
本文将用 hiew32 工具把 0040103E地址处的指令 test eax,eax 改成 xor eax,eax
3. 下面的命令: hiew32会启动 simple.exe文件
hiew32 simple.exe
4. 按两下回车键进入汇编模式, 按F5, 并敲入偏移地址103E, 光标将会跳到地址 0040103E处。
5. 按F3切换到编辑模式,并回车,修改test eax,eax指令。回车后按F9保存,然后按F10退出。
工具:hiew32.exe dumpbin.exe
例子文件: simple.exe
1. 用dumpbin工具将simple.exe(可以随便找一个win32的可执行文件测试)反汇编得到simple.asm文件。
dumpbin /section:.text /disasm simple.exe >simple.asm
2. simple.asm的部分汇编代码如下:
00401035: 51 push ecx
00401036: E8 45 00 00 00 call 00401080
0040103B: 83 C4 08 add esp,8
0040103E: 85 C0 test eax,eax
00401040: 74 0F je 00401051
00401042: 68 50 70 40 00 push 407050h
00401047: E8 C8 01 00 00 call 00401214
本文将用 hiew32 工具把 0040103E地址处的指令 test eax,eax 改成 xor eax,eax
3. 下面的命令: hiew32会启动 simple.exe文件
hiew32 simple.exe
4. 按两下回车键进入汇编模式, 按F5, 并敲入偏移地址103E, 光标将会跳到地址 0040103E处。
5. 按F3切换到编辑模式,并回车,修改test eax,eax指令。回车后按F9保存,然后按F10退出。