-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathReadProcess.h
More file actions
53 lines (46 loc) · 1.36 KB
/
Copy pathReadProcess.h
File metadata and controls
53 lines (46 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#pragma once
#include "NtApi.h"
#include "Thread.h"
static KEVENT g_kEvent;
typedef struct SocketRecv
{
ULONG Addr;
ULONG Size;
}CSocketRecv, *PSocketRecv;
typedef struct _RWPM_INFO
{
void* Address;
void* Buffer;
SIZE_T Length;
SIZE_T Type;//0=read;1=write
KEVENT Event;
}RWPM_INFO, *PRWPM_INFO;
class ReadProcess;
struct ThreadGetDll
{
char *DllName;
ULONGLONG BaseAddr;
ReadProcess *Ob;
};
class ReadProcess
{
public:
NTSTATUS SetProcess(HANDLE Pid);
NTSTATUS ReadProcessMemory(IN ULONGLONG Addr, IN ULONG Size,OUT PVOID Buffer);
NTSTATUS ReadProcessMemory_APC(IN ULONGLONG Addr, IN ULONG Size, OUT PVOID Buffer,int Type);
BOOLEAN WIN10_ReadProcessMemory(ULONG Addr, UINT_PTR bytestoread, PVOID output);
VOID WIN10_WriteProcessMemory(ULONG Addr, UINT_PTR bytestoread, PVOID Buffer);
ULONGLONG GetModuleBaseAddr(_In_ char* pModuleName);
ULONGLONG IoGetModeuleBaseAddr(_In_ char* pModuleName);
VOID TpPr(HANDLE Pid);
private:
NTSTATUS MMCopyProcessMemory(PEPROCESS tagetProcess, PVOID addr, SIZE_T size, PVOID data);
ULONGLONG GetModuleBaseWow64(_In_ PEPROCESS pEProcess, _In_ UNICODE_STRING usModuleName);
BOOLEAN WIN10_ReadProcess(ULONG Addr, UINT_PTR bytestoread, PVOID output);
VOID WIN10_WritedProcess(ULONG Addr, UINT_PTR bytestoread, PVOID Buffer);
static VOID GetDllBase(PVOID Ob);
public:
VOID UnReadProcess();
private:
PEPROCESS m_Peprocess;
};