原内容
004865DD |. BA 30664800 MOV EDX,Fa.00486630
004865E2 |. 8BC4 MOV EAX,ESP
004865E4 |. B9 11000000 MOV ECX,11
004865E9 |. E8 E69EFAFF CALL Fa.004304D4
正确要改为这样的
004865DD |. BA 30664800 MOV EDX,Fa.00486630
004865E2 - E9 199A6E00 JMP 00B70000
004865E7 90 NOP
004865E8 90 NOP
004865E9 |. E8 E69EFAFF CALL Fa.004304D4
我写的代码老是成这样,失败
004865DD BA 30664800 MOV EDX,Fa.00486630
004865E2 EB 00 JMP SHORT Fa.004865E4
004865E4 00D8 ADD AL,BL
004865E6 0090 90E8E69E ADD BYTE PTR DS:[EAX+9EE6E890],DL
004865EC FA CLI
004865ED FFBA ??? ; 未知命令
Delphi 代码
Type
PJmpCode = ^TJmpCode;
TJmpCode = Packed Record
JmpCode: Byte;
Address: Pointer;
MovEAX: Array[0..1] Of Byte;
End;
{在目标进程中分配内存}
MemData := VirtualAllocEx(CurProc, Nil, 4096, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
{把自定义函数写入到目标进程中}
WriteProcessMemory(CurProc, MemData, @GetDataCode, 4096, Written);
//debug 显示地址
MessageBox(0,PChar('$' + IntToHex(LongInt(MemData), 8)), '', 0);
JmpCode.JmpCode := $EB;
JmpCode.Address := MemData; //地址是$00B7000,失败的就是不知为啥会变成$00D80000
JmpCode.MovEAX[0] := $90;
JmpCode.MovEAX[1] := $90;
WriteProcessMemory(CurProc, Pointer($004865E2), @JmpCode, 7, Written);
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)