-
-
[讨论]R3函数重写-WriteProcessMemory
-
发表于:
2023-3-23 17:32
7021
-
[讨论]R3函数重写-WriteProcessMemory
系统版本win10,1904,21h2,以下出现的数值均为十六进制。
跟随
往下拉,3环的api不用太关心具体做了啥,直接走到syscall即可,
调用了Ntwritetualmeomry,跟进去
好了,看见syscall了
头部下断,观察参数
原先函数参数
对比一下
Ntwritetualmeomry跟WriteProcessMemory参数类型,数量一样。
重写代码如下:
#include<Windows.h>
#include<stdio.h>
HANDLE handle;
float 写入数据 = -200;
SIZE_T 实际写入字节 = 0;
EXTERN_C DWORD NewWriteProcessMemory(HANDLE handle, PVOID BaseAddress, LPCVOID buffer, ULONG64 size, SIZE_T* out);
int main()
{
handle = OpenProcess(PROCESS_ALL_ACCESS, NULL, 0x152C);
if (handle <= 0) {
printf("OpenProcess error%p\n");
}
NewWriteProcessMemory(handle, (PVOID)0xEC7E2FFA38, &写入数据, 4, &实际写入字节);
CloseHandle(handle);
return 0;
}
.CODE
NewWriteProcessMemory proc
mov r10,rcx
mov eax,58
syscall
ret
NewWriteProcessMemory endp
END
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!