├── .editorconfig ├── .gitattributes ├── .gitignore ├── LICENSE.txt ├── README.MD ├── cheat-driver.sln └── src ├── driver.c ├── driver.vcxproj ├── driver.vcxproj.filters ├── driver_codes.h └── driver_config.h /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.{c,h,cpp,sh}] 2 | charset = utf-8 3 | indent_style = tab 4 | indent_size = 4 5 | trim_trailing_whitespace = true 6 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | bin/ 22 | tmp/ 23 | [Bb]in/ 24 | [Oo]bj/ 25 | [Ll]og/ 26 | 27 | # Visual Studio 2015 cache/options directory 28 | .vs/ 29 | # Uncomment if you have tasks that create the project's static files in wwwroot 30 | #wwwroot/ 31 | 32 | # MSTest test Results 33 | [Tt]est[Rr]esult*/ 34 | [Bb]uild[Ll]og.* 35 | 36 | # NUNIT 37 | *.VisualState.xml 38 | TestResult.xml 39 | 40 | # Build Results of an ATL Project 41 | [Dd]ebugPS/ 42 | [Rr]eleasePS/ 43 | dlldata.c 44 | 45 | # DNX 46 | project.lock.json 47 | project.fragment.lock.json 48 | artifacts/ 49 | 50 | *_i.c 51 | *_p.c 52 | *_i.h 53 | *.ilk 54 | *.meta 55 | *.obj 56 | *.pch 57 | *.pdb 58 | *.pgc 59 | *.pgd 60 | *.rsp 61 | *.sbr 62 | *.tlb 63 | *.tli 64 | *.tlh 65 | *.tmp 66 | *.tmp_proj 67 | *.log 68 | *.vspscc 69 | *.vssscc 70 | .builds 71 | *.pidb 72 | *.svclog 73 | *.scc 74 | 75 | # Chutzpah Test files 76 | _Chutzpah* 77 | 78 | # Visual C++ cache files 79 | ipch/ 80 | *.aps 81 | *.ncb 82 | *.opendb 83 | *.opensdf 84 | *.sdf 85 | *.cachefile 86 | *.VC.db 87 | *.VC.VC.opendb 88 | 89 | # Visual Studio profiler 90 | *.psess 91 | *.vsp 92 | *.vspx 93 | *.sap 94 | 95 | # TFS 2012 Local Workspace 96 | $tf/ 97 | 98 | # Guidance Automation Toolkit 99 | *.gpState 100 | 101 | # ReSharper is a .NET coding add-in 102 | _ReSharper*/ 103 | *.[Rr]e[Ss]harper 104 | *.DotSettings.user 105 | 106 | # JustCode is a .NET coding add-in 107 | .JustCode 108 | 109 | # TeamCity is a build add-in 110 | _TeamCity* 111 | 112 | # DotCover is a Code Coverage Tool 113 | *.dotCover 114 | 115 | # NCrunch 116 | _NCrunch_* 117 | .*crunch*.local.xml 118 | nCrunchTemp_* 119 | 120 | # MightyMoose 121 | *.mm.* 122 | AutoTest.Net/ 123 | 124 | # Web workbench (sass) 125 | .sass-cache/ 126 | 127 | # Installshield output folder 128 | [Ee]xpress/ 129 | 130 | # DocProject is a documentation generator add-in 131 | DocProject/buildhelp/ 132 | DocProject/Help/*.HxT 133 | DocProject/Help/*.HxC 134 | DocProject/Help/*.hhc 135 | DocProject/Help/*.hhk 136 | DocProject/Help/*.hhp 137 | DocProject/Help/Html2 138 | DocProject/Help/html 139 | 140 | # Click-Once directory 141 | publish/ 142 | 143 | # Publish Web Output 144 | *.[Pp]ublish.xml 145 | *.azurePubxml 146 | # TODO: Comment the next line if you want to checkin your web deploy settings 147 | # but database connection strings (with potential passwords) will be unencrypted 148 | #*.pubxml 149 | *.publishproj 150 | 151 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 152 | # checkin your Azure Web App publish settings, but sensitive information contained 153 | # in these scripts will be unencrypted 154 | PublishScripts/ 155 | 156 | # NuGet Packages 157 | *.nupkg 158 | # The packages folder can be ignored because of Package Restore 159 | **/packages/* 160 | # except build/, which is used as an MSBuild target. 161 | !**/packages/build/ 162 | # Uncomment if necessary however generally it will be regenerated when needed 163 | #!**/packages/repositories.config 164 | # NuGet v3's project.json files produces more ignoreable files 165 | *.nuget.props 166 | *.nuget.targets 167 | 168 | # Microsoft Azure Build Output 169 | csx/ 170 | *.build.csdef 171 | 172 | # Microsoft Azure Emulator 173 | ecf/ 174 | rcf/ 175 | 176 | # Windows Store app package directories and files 177 | AppPackages/ 178 | BundleArtifacts/ 179 | Package.StoreAssociation.xml 180 | _pkginfo.txt 181 | 182 | # Visual Studio cache files 183 | # files ending in .cache can be ignored 184 | *.[Cc]ache 185 | # but keep track of directories ending in .cache 186 | !*.[Cc]ache/ 187 | 188 | # Others 189 | ClientBin/ 190 | ~$* 191 | *~ 192 | *.dbmdl 193 | *.dbproj.schemaview 194 | *.jfm 195 | *.pfx 196 | *.publishsettings 197 | node_modules/ 198 | orleans.codegen.cs 199 | 200 | # Since there are multiple workflows, uncomment next line to ignore bower_components 201 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 202 | #bower_components/ 203 | 204 | # RIA/Silverlight projects 205 | Generated_Code/ 206 | 207 | # Backup & report files from converting an old project file 208 | # to a newer Visual Studio version. Backup files are not needed, 209 | # because we have git ;-) 210 | _UpgradeReport_Files/ 211 | Backup*/ 212 | UpgradeLog*.XML 213 | UpgradeLog*.htm 214 | 215 | # SQL Server files 216 | *.mdf 217 | *.ldf 218 | 219 | # Business Intelligence projects 220 | *.rdl.data 221 | *.bim.layout 222 | *.bim_*.settings 223 | 224 | # Microsoft Fakes 225 | FakesAssemblies/ 226 | 227 | # GhostDoc plugin setting file 228 | *.GhostDoc.xml 229 | 230 | # Node.js Tools for Visual Studio 231 | .ntvs_analysis.dat 232 | 233 | # Visual Studio 6 build log 234 | *.plg 235 | 236 | # Visual Studio 6 workspace options file 237 | *.opt 238 | 239 | # Visual Studio LightSwitch build output 240 | **/*.HTMLClient/GeneratedArtifacts 241 | **/*.DesktopClient/GeneratedArtifacts 242 | **/*.DesktopClient/ModelManifest.xml 243 | **/*.Server/GeneratedArtifacts 244 | **/*.Server/ModelManifest.xml 245 | _Pvt_Extensions 246 | 247 | # Paket dependency manager 248 | .paket/paket.exe 249 | paket-files/ 250 | 251 | # FAKE - F# Make 252 | .fake/ 253 | 254 | # JetBrains Rider 255 | .idea/ 256 | *.sln.iml 257 | 258 | # CodeRush 259 | .cr/ 260 | 261 | # Python Tools for Visual Studio (PTVS) 262 | __pycache__/ 263 | *.pyc -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 nkga 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.MD: -------------------------------------------------------------------------------- 1 | # cheat-driver 2 | 3 | Simple WDM kernel mode driver for handling read/write memory requests into 4 | arbitrary processes. 5 | 6 | ### Background 7 | 8 | Kernel based anti-cheat drivers (EAC, BattleEye) block or monitor requests for 9 | interfacing with the memory from the game process. The simplest way to bypass anti-cheat protections from the kernel is to use your own kernel mode driver. 10 | 11 | ### Building 12 | 13 | 1. Install [Visual Studio](https://www.visualstudio.com/). 14 | 2. Install the [Windows Driver Kit](https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk). 15 | 3. Set the solution configuration to `x64` and `Release` and build the solution. 16 | 17 | ### Usage 18 | 19 | For practical use you will need a driver signing certificate. For development 20 | purposes you can enable [test-signing mode](https://docs.microsoft.com/en-us/windows-hardware/drivers/install/the-testsigning-boot-configuration-option). 21 | 22 | You will need to either install and run the driver as a service with `CreateService` or use a function like `NtLoadDriver`. 23 | Once the driver is loaded, you can open a handle to the driver: 24 | 25 | ```cpp 26 | #include "driver_config.h" 27 | #include "driver_codes.h" 28 | 29 | HANDLE driver = CreateFileW( 30 | DRIVER_DEVICE_PATH, 31 | GENERIC_READ | GENERIC_WRITE, 32 | FILE_SHARE_READ | FILE_SHARE_WRITE, 33 | 0, 34 | OPEN_EXISTING, 35 | 0, 0); 36 | ``` 37 | 38 | To issue read or write requests, you send the driver a control code: 39 | 40 | ```cpp 41 | DRIVER_COPY_MEMORY copy = {}; 42 | copy.ProcessId = processId; 43 | copy.Source = sourceBufferPtr; 44 | copy.Target = targetAddressPtr; 45 | copy.Size = bytesToRead; 46 | copy.Write = FALSE; 47 | 48 | DeviceIoControl( 49 | driver, 50 | IOCTL_DRIVER_COPY_MEMORY, 51 | ©, 52 | sizeof(copy), 53 | ©, 54 | sizeof(copy), 55 | 0, 0) 56 | ``` 57 | 58 | The target and source parameters should be reversed if issuing a write request. -------------------------------------------------------------------------------- /cheat-driver.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27703.2000 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "driver", "src\driver.vcxproj", "{E1F91302-CD35-4B3A-9F01-7CC5BF8C24CF}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Release|x64 = Release|x64 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {E1F91302-CD35-4B3A-9F01-7CC5BF8C24CF}.Debug|x64.ActiveCfg = Debug|x64 15 | {E1F91302-CD35-4B3A-9F01-7CC5BF8C24CF}.Debug|x64.Build.0 = Debug|x64 16 | {E1F91302-CD35-4B3A-9F01-7CC5BF8C24CF}.Debug|x64.Deploy.0 = Debug|x64 17 | {E1F91302-CD35-4B3A-9F01-7CC5BF8C24CF}.Release|x64.ActiveCfg = Release|x64 18 | {E1F91302-CD35-4B3A-9F01-7CC5BF8C24CF}.Release|x64.Build.0 = Release|x64 19 | {E1F91302-CD35-4B3A-9F01-7CC5BF8C24CF}.Release|x64.Deploy.0 = Release|x64 20 | EndGlobalSection 21 | GlobalSection(SolutionProperties) = preSolution 22 | HideSolutionNode = FALSE 23 | EndGlobalSection 24 | GlobalSection(ExtensibilityGlobals) = postSolution 25 | SolutionGuid = {569B6580-CAF4-4273-BFF7-EC37D6538BF5} 26 | EndGlobalSection 27 | EndGlobal 28 | -------------------------------------------------------------------------------- /src/driver.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "driver_codes.h" 4 | #include "driver_config.h" 5 | 6 | // Copies virtual memory from one process to another. 7 | NTKERNELAPI NTSTATUS NTAPI MmCopyVirtualMemory( 8 | IN PEPROCESS FromProcess, 9 | IN PVOID FromAddress, 10 | IN PEPROCESS ToProcess, 11 | OUT PVOID ToAddress, 12 | IN SIZE_T BufferSize, 13 | IN KPROCESSOR_MODE PreviousMode, 14 | OUT PSIZE_T NumberOfBytesCopied 15 | ); 16 | 17 | // Forward declaration for suppressing code analysis warnings. 18 | DRIVER_INITIALIZE DriverEntry; 19 | 20 | // Dispatch function. 21 | _Dispatch_type_(IRP_MJ_CREATE) 22 | _Dispatch_type_(IRP_MJ_CLOSE) 23 | _Dispatch_type_(IRP_MJ_DEVICE_CONTROL) 24 | DRIVER_DISPATCH DriverDispatch; 25 | 26 | // Performs a memory copy request. 27 | NTSTATUS DriverCopy(IN PDRIVER_COPY_MEMORY copy) { 28 | NTSTATUS status = STATUS_SUCCESS; 29 | PEPROCESS process; 30 | 31 | status = PsLookupProcessByProcessId((HANDLE)copy->ProcessId, &process); 32 | 33 | if (NT_SUCCESS(status)) { 34 | PEPROCESS sourceProcess, targetProcess; 35 | PVOID sourcePtr, targetPtr; 36 | 37 | if (copy->Write == FALSE) { 38 | sourceProcess = process; 39 | targetProcess = PsGetCurrentProcess(); 40 | sourcePtr = (PVOID)copy->Target; 41 | targetPtr = (PVOID)copy->Source; 42 | } else { 43 | sourceProcess = PsGetCurrentProcess(); 44 | targetProcess = process; 45 | sourcePtr = (PVOID)copy->Source; 46 | targetPtr = (PVOID)copy->Target; 47 | } 48 | 49 | SIZE_T bytes; 50 | status = MmCopyVirtualMemory(sourceProcess, sourcePtr, targetProcess, targetPtr, copy->Size, KernelMode, &bytes); 51 | 52 | ObDereferenceObject(process); 53 | } 54 | 55 | return status; 56 | } 57 | 58 | // Handles a IRP request. 59 | NTSTATUS DriverDispatch(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp) { 60 | UNREFERENCED_PARAMETER(DeviceObject); 61 | 62 | Irp->IoStatus.Status = STATUS_SUCCESS; 63 | Irp->IoStatus.Information = 0; 64 | 65 | PIO_STACK_LOCATION irpStack = IoGetCurrentIrpStackLocation(Irp); 66 | PVOID ioBuffer = Irp->AssociatedIrp.SystemBuffer; 67 | ULONG inputLength = irpStack->Parameters.DeviceIoControl.InputBufferLength; 68 | 69 | if (irpStack->MajorFunction == IRP_MJ_DEVICE_CONTROL) { 70 | ULONG ioControlCode = irpStack->Parameters.DeviceIoControl.IoControlCode; 71 | 72 | if (ioControlCode == IOCTL_DRIVER_COPY_MEMORY) { 73 | if (ioBuffer && inputLength >= sizeof(DRIVER_COPY_MEMORY)) { 74 | Irp->IoStatus.Status = DriverCopy((PDRIVER_COPY_MEMORY)ioBuffer); 75 | Irp->IoStatus.Information = sizeof(DRIVER_COPY_MEMORY); 76 | } else { 77 | Irp->IoStatus.Status = STATUS_INFO_LENGTH_MISMATCH; 78 | } 79 | } else { 80 | Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; 81 | } 82 | } 83 | 84 | NTSTATUS status = Irp->IoStatus.Status; 85 | IoCompleteRequest(Irp, IO_NO_INCREMENT); 86 | 87 | return status; 88 | } 89 | 90 | // Unloads the driver. 91 | VOID DriverUnload(IN PDRIVER_OBJECT DriverObject) { 92 | UNICODE_STRING dosDeviceName; 93 | RtlUnicodeStringInit(&dosDeviceName, DRIVER_DOS_DEVICE_NAME); 94 | 95 | IoDeleteSymbolicLink(&dosDeviceName); 96 | IoDeleteDevice(DriverObject->DeviceObject); 97 | } 98 | 99 | // Entry point for the driver. 100 | NTSTATUS DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath) { 101 | NTSTATUS status = STATUS_SUCCESS; 102 | 103 | UNREFERENCED_PARAMETER(RegistryPath); 104 | 105 | UNICODE_STRING deviceName; 106 | RtlUnicodeStringInit(&deviceName, DRIVER_DEVICE_NAME); 107 | 108 | PDEVICE_OBJECT deviceObject = NULL; 109 | status = IoCreateDevice(DriverObject, 0, &deviceName, DRIVER_DEVICE_TYPE, 0, FALSE, &deviceObject); 110 | 111 | if (!NT_SUCCESS(status)) { 112 | return status; 113 | } 114 | 115 | DriverObject->MajorFunction[IRP_MJ_CREATE] = DriverDispatch; 116 | DriverObject->MajorFunction[IRP_MJ_CLOSE] = DriverDispatch; 117 | DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = DriverDispatch; 118 | DriverObject->DriverUnload = DriverUnload; 119 | 120 | UNICODE_STRING dosDeviceName; 121 | RtlUnicodeStringInit(&dosDeviceName, DRIVER_DOS_DEVICE_NAME); 122 | 123 | status = IoCreateSymbolicLink(&dosDeviceName, &deviceName); 124 | 125 | if (!NT_SUCCESS(status)) { 126 | IoDeleteDevice(deviceObject); 127 | } 128 | 129 | return status; 130 | } 131 | -------------------------------------------------------------------------------- /src/driver.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | Debug 22 | ARM 23 | 24 | 25 | Release 26 | ARM 27 | 28 | 29 | Debug 30 | ARM64 31 | 32 | 33 | Release 34 | ARM64 35 | 36 | 37 | 38 | {E1F91302-CD35-4B3A-9F01-7CC5BF8C24CF} 39 | {497e31cb-056b-4f31-abb8-447fd55ee5a5} 40 | v4.5 41 | 12.0 42 | Debug 43 | Win32 44 | driver 45 | $(LatestTargetPlatformVersion) 46 | 47 | 48 | 49 | Windows10 50 | true 51 | WindowsKernelModeDriver10.0 52 | Driver 53 | KMDF 54 | Universal 55 | 56 | 57 | Windows10 58 | false 59 | WindowsKernelModeDriver10.0 60 | Driver 61 | KMDF 62 | Universal 63 | 64 | 65 | Windows10 66 | true 67 | WindowsKernelModeDriver10.0 68 | Driver 69 | WDM 70 | Desktop 71 | 72 | 73 | Windows10 74 | false 75 | WindowsKernelModeDriver10.0 76 | Driver 77 | WDM 78 | Desktop 79 | 80 | 81 | Windows10 82 | true 83 | WindowsKernelModeDriver10.0 84 | Driver 85 | KMDF 86 | Universal 87 | 88 | 89 | Windows10 90 | false 91 | WindowsKernelModeDriver10.0 92 | Driver 93 | KMDF 94 | Universal 95 | 96 | 97 | Windows10 98 | true 99 | WindowsKernelModeDriver10.0 100 | Driver 101 | KMDF 102 | Universal 103 | 104 | 105 | Windows10 106 | false 107 | WindowsKernelModeDriver10.0 108 | Driver 109 | KMDF 110 | Universal 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | DbgengKernelDebugger 122 | 123 | 124 | DbgengKernelDebugger 125 | 126 | 127 | DbgengKernelDebugger 128 | ..\..\..\Program Files (x86)\Windows Kits\10\CodeAnalysis\DriverMinimumRules.ruleset 129 | false 130 | $(SolutionDir)bin\$(Configuration)\ 131 | $(SolutionDir)tmp\$(ProjectName)\$(Configuration)\ 132 | 133 | 134 | DbgengKernelDebugger 135 | ..\..\..\Program Files (x86)\Windows Kits\10\CodeAnalysis\DriverMinimumRules.ruleset 136 | false 137 | $(SolutionDir)bin\$(Configuration)\ 138 | $(SolutionDir)tmp\$(ProjectName)\$(Configuration)\ 139 | 140 | 141 | DbgengKernelDebugger 142 | 143 | 144 | DbgengKernelDebugger 145 | 146 | 147 | DbgengKernelDebugger 148 | 149 | 150 | DbgengKernelDebugger 151 | 152 | 153 | 154 | true 155 | true 156 | trace.h 157 | true 158 | 159 | 160 | 161 | 162 | true 163 | true 164 | trace.h 165 | true 166 | 167 | 168 | 169 | 170 | true 171 | trace.h 172 | true 173 | stdcpplatest 174 | false 175 | 176 | 177 | 178 | 179 | true 180 | trace.h 181 | true 182 | MaxSpeed 183 | AnySuitable 184 | Speed 185 | stdcpplatest 186 | false 187 | 188 | 189 | 190 | 191 | true 192 | true 193 | trace.h 194 | true 195 | 196 | 197 | 198 | 199 | true 200 | true 201 | trace.h 202 | true 203 | 204 | 205 | 206 | 207 | true 208 | true 209 | trace.h 210 | true 211 | 212 | 213 | 214 | 215 | true 216 | true 217 | trace.h 218 | true 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | -------------------------------------------------------------------------------- /src/driver.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 6 | h;hh;hpp;hxx;hm;inl;inc;xsd 7 | 8 | 9 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 10 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 11 | 12 | 13 | 14 | 15 | source 16 | 17 | 18 | 19 | 20 | include 21 | 22 | 23 | include 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/driver_codes.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | // #include 3 | #include "driver_codes.h" 4 | 5 | // Request for read/writing memory from/to a process. 6 | #define IOCTL_DRIVER_COPY_MEMORY ((ULONG)CTL_CODE(DRIVER_DEVICE_TYPE, 0x808, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)) 7 | 8 | // Copy requeest data. 9 | typedef struct _DRIVER_COPY_MEMORY { 10 | ULONGLONG Source; // Source buffer address. 11 | ULONGLONG Target; // Target buffer address. 12 | ULONGLONG Size; // Buffer size. 13 | ULONG ProcessId; // Target process ID. 14 | BOOLEAN Write; // TRUE if writing, FALSE if reading. 15 | } DRIVER_COPY_MEMORY, *PDRIVER_COPY_MEMORY; 16 | -------------------------------------------------------------------------------- /src/driver_config.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define DRIVER_NAME L"MemoryDriver" 4 | #define DRIVER_DEVICE_NAME L"\\Device\\MemoryDriver" 5 | #define DRIVER_DOS_DEVICE_NAME L"\\DosDevices\\MemoryDriver" 6 | #define DRIVER_DEVICE_PATH L"\\\\.\\MemoryDriver" 7 | #define DRIVER_DEVICE_TYPE 0x00000022 8 | --------------------------------------------------------------------------------