├── README.md ├── PYAS_Protection ├── Release │ ├── SimplePYASProtection.Build.CppClean.log │ ├── SimplePY.22A30051.tlog │ │ ├── unsuccessfulbuild │ │ ├── CL.read.1.tlog │ │ ├── CL.write.1.tlog │ │ ├── CL.command.1.tlog │ │ ├── stampinf.read.1.tlog │ │ ├── stampinf.write.1.tlog │ │ ├── stampinf.command.1.tlog │ │ └── SimplePYASProtection.lastbuildstate │ ├── vc142.pdb │ ├── Driver.obj │ ├── Process.obj │ ├── Regedit.obj │ ├── SimpleProcessProtection.log │ └── SimpleProcessProtection.inf ├── File.c ├── Driver.c ├── Driver.h ├── Process.c ├── Regedit.c ├── Driver_Process.h ├── x64 │ └── Release │ │ └── PYAS.sys ├── Driver_Regedit.h ├── SimpleProcessProtection.vcxproj.user ├── SimpleProcessProtection.vcxproj.filters ├── Drvier_File.h ├── SimplePYASProtection.sln ├── SimpleProcessProtection.inf └── SimpleProcessProtection.vcxproj ├── ShaShen.jpg ├── .gitignore └── LICENSE /README.md: -------------------------------------------------------------------------------- 1 | # PYAS_Protection 2 | A Driver Only For PYAS 3 | -------------------------------------------------------------------------------- /PYAS_Protection/Release/SimplePYASProtection.Build.CppClean.log: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /PYAS_Protection/Release/SimplePY.22A30051.tlog/unsuccessfulbuild: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ShaShen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0sha0/PYAS_Protection/HEAD/ShaShen.jpg -------------------------------------------------------------------------------- /PYAS_Protection/File.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0sha0/PYAS_Protection/HEAD/PYAS_Protection/File.c -------------------------------------------------------------------------------- /PYAS_Protection/Driver.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0sha0/PYAS_Protection/HEAD/PYAS_Protection/Driver.c -------------------------------------------------------------------------------- /PYAS_Protection/Driver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0sha0/PYAS_Protection/HEAD/PYAS_Protection/Driver.h -------------------------------------------------------------------------------- /PYAS_Protection/Process.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0sha0/PYAS_Protection/HEAD/PYAS_Protection/Process.c -------------------------------------------------------------------------------- /PYAS_Protection/Regedit.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0sha0/PYAS_Protection/HEAD/PYAS_Protection/Regedit.c -------------------------------------------------------------------------------- /PYAS_Protection/Driver_Process.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0sha0/PYAS_Protection/HEAD/PYAS_Protection/Driver_Process.h -------------------------------------------------------------------------------- /PYAS_Protection/Release/vc142.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0sha0/PYAS_Protection/HEAD/PYAS_Protection/Release/vc142.pdb -------------------------------------------------------------------------------- /PYAS_Protection/Release/Driver.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0sha0/PYAS_Protection/HEAD/PYAS_Protection/Release/Driver.obj -------------------------------------------------------------------------------- /PYAS_Protection/Release/Process.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0sha0/PYAS_Protection/HEAD/PYAS_Protection/Release/Process.obj -------------------------------------------------------------------------------- /PYAS_Protection/Release/Regedit.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0sha0/PYAS_Protection/HEAD/PYAS_Protection/Release/Regedit.obj -------------------------------------------------------------------------------- /PYAS_Protection/x64/Release/PYAS.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0sha0/PYAS_Protection/HEAD/PYAS_Protection/x64/Release/PYAS.sys -------------------------------------------------------------------------------- /PYAS_Protection/Release/SimplePY.22A30051.tlog/CL.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0sha0/PYAS_Protection/HEAD/PYAS_Protection/Release/SimplePY.22A30051.tlog/CL.read.1.tlog -------------------------------------------------------------------------------- /PYAS_Protection/Release/SimplePY.22A30051.tlog/CL.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0sha0/PYAS_Protection/HEAD/PYAS_Protection/Release/SimplePY.22A30051.tlog/CL.write.1.tlog -------------------------------------------------------------------------------- /PYAS_Protection/Release/SimplePY.22A30051.tlog/CL.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0sha0/PYAS_Protection/HEAD/PYAS_Protection/Release/SimplePY.22A30051.tlog/CL.command.1.tlog -------------------------------------------------------------------------------- /PYAS_Protection/Release/SimplePY.22A30051.tlog/stampinf.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0sha0/PYAS_Protection/HEAD/PYAS_Protection/Release/SimplePY.22A30051.tlog/stampinf.read.1.tlog -------------------------------------------------------------------------------- /PYAS_Protection/Release/SimplePY.22A30051.tlog/stampinf.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0sha0/PYAS_Protection/HEAD/PYAS_Protection/Release/SimplePY.22A30051.tlog/stampinf.write.1.tlog -------------------------------------------------------------------------------- /PYAS_Protection/Release/SimplePY.22A30051.tlog/stampinf.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0sha0/PYAS_Protection/HEAD/PYAS_Protection/Release/SimplePY.22A30051.tlog/stampinf.command.1.tlog -------------------------------------------------------------------------------- /PYAS_Protection/Release/SimplePY.22A30051.tlog/SimplePYASProtection.lastbuildstate: -------------------------------------------------------------------------------- 1 | PlatformToolSet=WindowsKernelModeDriver10.0:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:VCServicingVersionMFC=14.29.30136:TargetPlatformVersion=10.0.18362.0: 2 | Release|Win32|D:\ProgarmRelease\SimpleProcessProtection\| 3 | -------------------------------------------------------------------------------- /PYAS_Protection/Driver_Regedit.h: -------------------------------------------------------------------------------- 1 | #include 2 | #define REG_TAG "rootkit" 3 | NTSTATUS RegistryCallback( 4 | _In_ PVOID CallbackContext, 5 | _In_ PVOID Argument1, 6 | _In_ PVOID Argument2 7 | ); 8 | BOOLEAN GetNameForRegistryObject( 9 | _Out_ PUNICODE_STRING pRegistryPath, 10 | _In_ PUNICODE_STRING pPartialRegistryPath, 11 | _In_ PVOID pRegistryObject 12 | ); 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | *.smod 22 | 23 | # Compiled Static libraries 24 | *.lai 25 | *.la 26 | *.a 27 | *.lib 28 | 29 | # Executables 30 | *.exe 31 | *.out 32 | *.app 33 | -------------------------------------------------------------------------------- /PYAS_Protection/SimpleProcessProtection.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Off 5 | 6 | 7 | Off 8 | 9 | -------------------------------------------------------------------------------- /PYAS_Protection/Release/SimpleProcessProtection.log: -------------------------------------------------------------------------------- 1 | Building 'SimplePYASProtection' with toolset 'WindowsKernelModeDriver10.0' and the 'Desktop' target platform. 2 | Stamping Release\SimpleProcessProtection.inf 3 | Stamping [Version] section with DriverVer=07/28/2023,20.1.40.736 4 | Driver.c 5 | File.c 6 | D:\ProgarmRelease\SimpleProcessProtection\File.c(114,1): error C2143: 语法错误: 缺少“;”(在“{”的前面) 7 | D:\ProgarmRelease\SimpleProcessProtection\File.c(118,36): error C2440: “return”: 无法从“UNICODE_STRING”转换为“OB_PREOP_CALLBACK_STATUS” 8 | D:\ProgarmRelease\SimpleProcessProtection\File.c(122,1): error C2143: 语法错误: 缺少“;”(在“{”的前面) 9 | D:\ProgarmRelease\SimpleProcessProtection\File.c(123,70): error C2065: “ObjectType”: 未声明的标识符 10 | D:\ProgarmRelease\SimpleProcessProtection\File.c(127,1): error C2143: 语法错误: 缺少“;”(在“{”的前面) 11 | D:\ProgarmRelease\SimpleProcessProtection\File.c(42): fatal error C1075: “{”: 未找到匹配令牌 12 | Process.c 13 | Regedit.c 14 | 正在生成代码... 15 | -------------------------------------------------------------------------------- /PYAS_Protection/SimpleProcessProtection.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | {8E41214B-6785-4CFE-B992-037D68949A14} 18 | inf;inv;inx;mof;mc; 19 | 20 | 21 | 22 | 23 | Driver Files 24 | 25 | 26 | 27 | 28 | Header Files 29 | 30 | 31 | Header Files 32 | 33 | 34 | Header Files 35 | 36 | 37 | Header Files 38 | 39 | 40 | 41 | 42 | Source Files 43 | 44 | 45 | Source Files 46 | 47 | 48 | Source Files 49 | 50 | 51 | Source Files 52 | 53 | 54 | -------------------------------------------------------------------------------- /PYAS_Protection/Drvier_File.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef CXX_FILEPROTECTX64_H 3 | #define CXX_FILEPROTECTX64_H 4 | #include 5 | #include 6 | 7 | typedef struct _OBJECT_TYPE_INITIALIZER 8 | { 9 | UINT16 Length; 10 | union 11 | { 12 | UINT8 ObjectTypeFlags; 13 | struct 14 | { 15 | UINT8 CaseInsensitive : 1; 16 | UINT8 UnnamedObjectsOnly : 1; 17 | UINT8 UseDefaultObject : 1; 18 | UINT8 SecurityRequired : 1; 19 | UINT8 MaintainHandleCount : 1; 20 | UINT8 MaintainTypeList : 1; 21 | UINT8 SupportsObjectCallbacks : 1; 22 | }; 23 | }; 24 | ULONG32 ObjectTypeCode; 25 | ULONG32 InvalidAttributes; 26 | struct _GENERIC_MAPPING GenericMapping; 27 | ULONG32 ValidAccessMask; 28 | ULONG32 RetainAccess; 29 | enum _POOL_TYPE PoolType; 30 | ULONG32 DefaultPagedPoolCharge; 31 | ULONG32 DefaultNonPagedPoolCharge; 32 | PVOID DumpProcedure; 33 | PVOID OpenProcedure; 34 | PVOID CloseProcedure; 35 | PVOID DeleteProcedure; 36 | PVOID ParseProcedure; 37 | PVOID SecurityProcedure; 38 | PVOID QueryNameProcedure; 39 | PVOID OkayToCloseProcedure; 40 | }OBJECT_TYPE_INITIALIZER, * POBJECT_TYPE_INITIALIZER; 41 | 42 | typedef struct _OBJECT_TYPE_TEMP 43 | { 44 | struct _LIST_ENTRY TypeList; 45 | struct _UNICODE_STRING Name; 46 | VOID* DefaultObject; 47 | UINT8 Index; 48 | UINT8 _PADDING0_[0x3]; 49 | ULONG32 TotalNumberOfObjects; 50 | ULONG32 TotalNumberOfHandles; 51 | ULONG32 HighWaterNumberOfObjects; 52 | ULONG32 HighWaterNumberOfHandles; 53 | UINT8 _PADDING1_[0x4]; 54 | struct _OBJECT_TYPE_INITIALIZER TypeInfo; 55 | ULONG64 TypeLock; 56 | ULONG32 Key; 57 | UINT8 _PADDING2_[0x4]; 58 | struct _LIST_ENTRY CallbackList; 59 | }OBJECT_TYPE_TEMP, * POBJECT_TYPE_TEMP; 60 | 61 | VOID EnableObType(POBJECT_TYPE ObjectType); 62 | UNICODE_STRING GetFilePathByFileObject(PVOID FileObject); 63 | OB_PREOP_CALLBACK_STATUS PreCallBack(PVOID RegistrationContext, POB_PRE_OPERATION_INFORMATION OperationInformation); 64 | NTSTATUS ProtectFileByObRegisterCallbacks(); 65 | #endif 66 | 67 | 68 | #ifndef CXX_FILEPROTECTX64_H 69 | #include "FileProtectX64.h" 70 | #endif -------------------------------------------------------------------------------- /PYAS_Protection/SimplePYASProtection.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.33801.447 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimpleProcessProtection", "SimpleProcessProtection.vcxproj", "{22A30051-CF4E-4C66-B1D7-C98519C28661}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|ARM = Debug|ARM 11 | Debug|ARM64 = Debug|ARM64 12 | Debug|x64 = Debug|x64 13 | Debug|x86 = Debug|x86 14 | Release|ARM = Release|ARM 15 | Release|ARM64 = Release|ARM64 16 | Release|x64 = Release|x64 17 | Release|x86 = Release|x86 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {22A30051-CF4E-4C66-B1D7-C98519C28661}.Debug|ARM.ActiveCfg = Debug|ARM 21 | {22A30051-CF4E-4C66-B1D7-C98519C28661}.Debug|ARM.Build.0 = Debug|ARM 22 | {22A30051-CF4E-4C66-B1D7-C98519C28661}.Debug|ARM.Deploy.0 = Debug|ARM 23 | {22A30051-CF4E-4C66-B1D7-C98519C28661}.Debug|ARM64.ActiveCfg = Debug|ARM64 24 | {22A30051-CF4E-4C66-B1D7-C98519C28661}.Debug|ARM64.Build.0 = Debug|ARM64 25 | {22A30051-CF4E-4C66-B1D7-C98519C28661}.Debug|ARM64.Deploy.0 = Debug|ARM64 26 | {22A30051-CF4E-4C66-B1D7-C98519C28661}.Debug|x64.ActiveCfg = Debug|x64 27 | {22A30051-CF4E-4C66-B1D7-C98519C28661}.Debug|x64.Build.0 = Debug|x64 28 | {22A30051-CF4E-4C66-B1D7-C98519C28661}.Debug|x64.Deploy.0 = Debug|x64 29 | {22A30051-CF4E-4C66-B1D7-C98519C28661}.Debug|x86.ActiveCfg = Debug|Win32 30 | {22A30051-CF4E-4C66-B1D7-C98519C28661}.Debug|x86.Build.0 = Debug|Win32 31 | {22A30051-CF4E-4C66-B1D7-C98519C28661}.Debug|x86.Deploy.0 = Debug|Win32 32 | {22A30051-CF4E-4C66-B1D7-C98519C28661}.Release|ARM.ActiveCfg = Release|ARM 33 | {22A30051-CF4E-4C66-B1D7-C98519C28661}.Release|ARM.Build.0 = Release|ARM 34 | {22A30051-CF4E-4C66-B1D7-C98519C28661}.Release|ARM.Deploy.0 = Release|ARM 35 | {22A30051-CF4E-4C66-B1D7-C98519C28661}.Release|ARM64.ActiveCfg = Release|ARM64 36 | {22A30051-CF4E-4C66-B1D7-C98519C28661}.Release|ARM64.Build.0 = Release|ARM64 37 | {22A30051-CF4E-4C66-B1D7-C98519C28661}.Release|ARM64.Deploy.0 = Release|ARM64 38 | {22A30051-CF4E-4C66-B1D7-C98519C28661}.Release|x64.ActiveCfg = Release|x64 39 | {22A30051-CF4E-4C66-B1D7-C98519C28661}.Release|x64.Build.0 = Release|x64 40 | {22A30051-CF4E-4C66-B1D7-C98519C28661}.Release|x64.Deploy.0 = Release|x64 41 | {22A30051-CF4E-4C66-B1D7-C98519C28661}.Release|x86.ActiveCfg = Release|Win32 42 | {22A30051-CF4E-4C66-B1D7-C98519C28661}.Release|x86.Build.0 = Release|Win32 43 | {22A30051-CF4E-4C66-B1D7-C98519C28661}.Release|x86.Deploy.0 = Release|Win32 44 | EndGlobalSection 45 | GlobalSection(SolutionProperties) = preSolution 46 | HideSolutionNode = FALSE 47 | EndGlobalSection 48 | GlobalSection(ExtensibilityGlobals) = postSolution 49 | SolutionGuid = {AA777813-50C5-4820-8F7D-E040B2462BEF} 50 | EndGlobalSection 51 | EndGlobal 52 | -------------------------------------------------------------------------------- /PYAS_Protection/Release/SimpleProcessProtection.inf: -------------------------------------------------------------------------------- 1 | ; 2 | ; SimpleProcessProtection.inf 3 | ; 4 | 5 | [Version] 6 | Signature="$WINDOWS NT$" 7 | Class=Sample ; TODO: edit Class 8 | ClassGuid={78A1C341-4539-11d3-B88D-00C04FAD5171} ; TODO: edit ClassGuid 9 | Provider=%ManufacturerName% 10 | CatalogFile=SimpleProcessProtection.cat 11 | DriverVer = 07/28/2023,20.1.40.736 12 | 13 | [DestinationDirs] 14 | DefaultDestDir = 12 15 | SimpleProcessProtection_Device_CoInstaller_CopyFiles = 11 16 | 17 | ; ================= Class section ===================== 18 | 19 | [ClassInstall32] 20 | Addreg=SampleClassReg 21 | 22 | [SampleClassReg] 23 | HKR,,,0,%ClassName% 24 | HKR,,Icon,,-5 25 | 26 | [SourceDisksNames] 27 | 1 = %DiskName%,,,"" 28 | 29 | [SourceDisksFiles] 30 | SimpleProcessProtection.sys = 1,, 31 | WdfCoInstaller01009.dll=1 ; make sure the number matches with SourceDisksNames 32 | 33 | ;***************************************** 34 | ; Install Section 35 | ;***************************************** 36 | 37 | [Manufacturer] 38 | %ManufacturerName%=Standard,NTx86 39 | 40 | [Standard.NTx86] 41 | %SimpleProcessProtection.DeviceDesc%=SimpleProcessProtection_Device, Root\SimpleProcessProtection ; TODO: edit hw-id 42 | 43 | [SimpleProcessProtection_Device.NT] 44 | CopyFiles=Drivers_Dir 45 | 46 | [Drivers_Dir] 47 | SimpleProcessProtection.sys 48 | 49 | ;-------------- Service installation 50 | [SimpleProcessProtection_Device.NT.Services] 51 | AddService = SimpleProcessProtection,%SPSVCINST_ASSOCSERVICE%, SimpleProcessProtection_Service_Inst 52 | 53 | ; -------------- SimpleProcessProtection driver install sections 54 | [SimpleProcessProtection_Service_Inst] 55 | DisplayName = %SimpleProcessProtection.SVCDESC% 56 | ServiceType = 1 ; SERVICE_KERNEL_DRIVER 57 | StartType = 3 ; SERVICE_DEMAND_START 58 | ErrorControl = 1 ; SERVICE_ERROR_NORMAL 59 | ServiceBinary = %12%\SimpleProcessProtection.sys 60 | 61 | ; 62 | ;--- SimpleProcessProtection_Device Coinstaller installation ------ 63 | ; 64 | 65 | [SimpleProcessProtection_Device.NT.CoInstallers] 66 | AddReg=SimpleProcessProtection_Device_CoInstaller_AddReg 67 | CopyFiles=SimpleProcessProtection_Device_CoInstaller_CopyFiles 68 | 69 | [SimpleProcessProtection_Device_CoInstaller_AddReg] 70 | HKR,,CoInstallers32,0x00010000, "WdfCoInstaller01009.dll,WdfCoInstaller" 71 | 72 | [SimpleProcessProtection_Device_CoInstaller_CopyFiles] 73 | WdfCoInstaller01009.dll 74 | 75 | [SimpleProcessProtection_Device.NT.Wdf] 76 | KmdfService = SimpleProcessProtection, SimpleProcessProtection_wdfsect 77 | [SimpleProcessProtection_wdfsect] 78 | KmdfLibraryVersion = 1.9 79 | 80 | [Strings] 81 | SPSVCINST_ASSOCSERVICE= 0x00000002 82 | ManufacturerName="" ;TODO: Replace with your manufacturer name 83 | ClassName="Samples" ; TODO: edit ClassName 84 | DiskName = "SimpleProcessProtection Installation Disk" 85 | SimpleProcessProtection.DeviceDesc = "SimpleProcessProtection Device" 86 | SimpleProcessProtection.SVCDESC = "SimpleProcessProtection Service" 87 | -------------------------------------------------------------------------------- /PYAS_Protection/SimpleProcessProtection.inf: -------------------------------------------------------------------------------- 1 | ; 2 | ; SimpleProcessProtection.inf 3 | ; 4 | 5 | [Version] 6 | Signature="$WINDOWS NT$" 7 | Class=Sample ; TODO: edit Class 8 | ClassGuid={78A1C341-4539-11d3-B88D-00C04FAD5171} ; TODO: edit ClassGuid 9 | Provider=%ManufacturerName% 10 | CatalogFile=SimpleProcessProtection.cat 11 | DriverVer= ; TODO: set DriverVer in stampinf property pages 12 | 13 | [DestinationDirs] 14 | DefaultDestDir = 12 15 | SimpleProcessProtection_Device_CoInstaller_CopyFiles = 11 16 | 17 | ; ================= Class section ===================== 18 | 19 | [ClassInstall32] 20 | Addreg=SampleClassReg 21 | 22 | [SampleClassReg] 23 | HKR,,,0,%ClassName% 24 | HKR,,Icon,,-5 25 | 26 | [SourceDisksNames] 27 | 1 = %DiskName%,,,"" 28 | 29 | [SourceDisksFiles] 30 | SimpleProcessProtection.sys = 1,, 31 | WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll=1 ; make sure the number matches with SourceDisksNames 32 | 33 | ;***************************************** 34 | ; Install Section 35 | ;***************************************** 36 | 37 | [Manufacturer] 38 | %ManufacturerName%=Standard,NT$ARCH$ 39 | 40 | [Standard.NT$ARCH$] 41 | %SimpleProcessProtection.DeviceDesc%=SimpleProcessProtection_Device, Root\SimpleProcessProtection ; TODO: edit hw-id 42 | 43 | [SimpleProcessProtection_Device.NT] 44 | CopyFiles=Drivers_Dir 45 | 46 | [Drivers_Dir] 47 | SimpleProcessProtection.sys 48 | 49 | ;-------------- Service installation 50 | [SimpleProcessProtection_Device.NT.Services] 51 | AddService = SimpleProcessProtection,%SPSVCINST_ASSOCSERVICE%, SimpleProcessProtection_Service_Inst 52 | 53 | ; -------------- SimpleProcessProtection driver install sections 54 | [SimpleProcessProtection_Service_Inst] 55 | DisplayName = %SimpleProcessProtection.SVCDESC% 56 | ServiceType = 1 ; SERVICE_KERNEL_DRIVER 57 | StartType = 3 ; SERVICE_DEMAND_START 58 | ErrorControl = 1 ; SERVICE_ERROR_NORMAL 59 | ServiceBinary = %12%\SimpleProcessProtection.sys 60 | 61 | ; 62 | ;--- SimpleProcessProtection_Device Coinstaller installation ------ 63 | ; 64 | 65 | [SimpleProcessProtection_Device.NT.CoInstallers] 66 | AddReg=SimpleProcessProtection_Device_CoInstaller_AddReg 67 | CopyFiles=SimpleProcessProtection_Device_CoInstaller_CopyFiles 68 | 69 | [SimpleProcessProtection_Device_CoInstaller_AddReg] 70 | HKR,,CoInstallers32,0x00010000, "WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll,WdfCoInstaller" 71 | 72 | [SimpleProcessProtection_Device_CoInstaller_CopyFiles] 73 | WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll 74 | 75 | [SimpleProcessProtection_Device.NT.Wdf] 76 | KmdfService = SimpleProcessProtection, SimpleProcessProtection_wdfsect 77 | [SimpleProcessProtection_wdfsect] 78 | KmdfLibraryVersion = $KMDFVERSION$ 79 | 80 | [Strings] 81 | SPSVCINST_ASSOCSERVICE= 0x00000002 82 | ManufacturerName="" ;TODO: Replace with your manufacturer name 83 | ClassName="Samples" ; TODO: edit ClassName 84 | DiskName = "SimpleProcessProtection Installation Disk" 85 | SimpleProcessProtection.DeviceDesc = "SimpleProcessProtection Device" 86 | SimpleProcessProtection.SVCDESC = "SimpleProcessProtection Service" 87 | -------------------------------------------------------------------------------- /PYAS_Protection/SimpleProcessProtection.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 | {22A30051-CF4E-4C66-B1D7-C98519C28661} 39 | {1bc93793-694f-48fe-9372-81e2b05556fd} 40 | v4.5 41 | 12.0 42 | Debug 43 | Win32 44 | SimpleProcessProtection 45 | SimplePYASProtection 46 | 47 | 48 | 49 | Windows10 50 | true 51 | WindowsKernelModeDriver10.0 52 | Driver 53 | KMDF 54 | Universal 55 | 56 | 57 | Windows7 58 | false 59 | WindowsKernelModeDriver10.0 60 | Driver 61 | KMDF 62 | Desktop 63 | 64 | 65 | Windows10 66 | true 67 | WindowsKernelModeDriver10.0 68 | Driver 69 | KMDF 70 | Universal 71 | 72 | 73 | Windows7 74 | false 75 | WindowsKernelModeDriver10.0 76 | Driver 77 | KMDF 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 | 129 | 130 | DbgengKernelDebugger 131 | 132 | 133 | DbgengKernelDebugger 134 | 135 | 136 | DbgengKernelDebugger 137 | 138 | 139 | DbgengKernelDebugger 140 | 141 | 142 | DbgengKernelDebugger 143 | 144 | 145 | 146 | TurnOffAllWarnings 147 | 148 | 149 | 150 | 151 | false 152 | 153 | 154 | false 155 | 156 | 157 | 158 | 159 | TurnOffAllWarnings 160 | 161 | 162 | 163 | 164 | false 165 | 166 | 167 | false 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | --------------------------------------------------------------------------------