分享一个C++读写驱动源码
相关代码:
#pragma once
#include<ntifs.h>
#include<windef.h>
#define READCODE CTL_CODE(FILE_DEVICE_UNKNOWN,0x800,METHOD_BUFFERED,FILE_ALL_ACCESS)
#define WRITECODE CTL_CODE(FILE_DEVICE_UNKNOWN,0x801,METHOD_BUFFERED,FILE_ALL_ACCESS)
#define DEVICENAME L"\\Device\\ReadWriteDevice"
#define SYMBOLNAME L"\\??\\ReadWriteSymbolName"
typedef struct DATA
{
DWORD pid;//要读写的进程ID
unsigned __int64 address;//要读写的地址
DWORD size;//读写长度
BYTE* data;//要读写的数据,
}Data;
void DriverUnload(PDRIVER_OBJECT driver);
NTSTATUS CreateDevice(PDRIVER_OBJECT driver);
NTSTATUS DriverIrpCtl(PDEVICE_OBJECT device, PIRP pirp);
BOOL ReadMemory(Data* data);
BOOL WriteMemory(Data* data);
回复后下载源码:
**** Hidden Message *****
相关代码:
页:
[1]