-
-
[求助]请问:我用NtWriteVirtualMemory写内存为何总是失败?(RING 3) 谢谢!!
-
-
[求助]请问:我用NtWriteVirtualMemory写内存为何总是失败?(RING 3) 谢谢!!
typedef
NTSTATUS
(NTAPI*pfnNtWriteVirtualMemory)(
HANDLE ProcessHandle,
PVOID BaseAddress,
PVOID Buffer,
ULONG BufferLength,
PULONG ReturnLength OPTIONAL
);
pfnNtWriteVirtualMemory NtWriteVirtualMemory = (pfnNtWriteVirtualMemory)GetProcAddress(GetModuleHandle ( "ntdll.dll" ),"NtWriteVirtualMemory");
int main()
{
UpTokenPrivileges(); //提权
NTSTATUS status;
HANDLE w_hopen = OpenProcess(PROCESS_ALL_ACCESS,0,632);
DWORD temp=0x74;
status = NtWriteVirtualMemory(w_hopen,(LPVOID)0x6F2A0930,&temp,1,NULL);
if(!NT_SUCCESS(status))
MessageBox(NULL,"0","0",MB_OK);
return 0;
}
NtWriteVirtualMemory函数的地址已获取到,openprocess也没问题.难道是我参数的问题吗? 总是失败,郁闷死了.
请各位指点一下,我这是第一次这样用.我这是在ring3下调用的
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!