Exemple #1
0
        public static NtStatus SetDynamicCodeTrust(SafeKernelObjectHandle handle)
        {
            SystemCodeIntegrityVerificationInformation info = new SystemCodeIntegrityVerificationInformation()
            {
                FileHandle = handle.DangerousGetHandle()
            };

            return(Set(SystemInformationClass.SystemCodeIntegrityVerificationInformation, info, false));
        }
Exemple #2
0
        public static NtStatus QueryDynamicCodeTrust(SafeKernelObjectHandle handle, IntPtr image, int image_size)
        {
            SystemCodeIntegrityVerificationInformation info = new SystemCodeIntegrityVerificationInformation()
            {
                FileHandle = handle.DangerousGetHandle(),
                Image      = image,
                ImageSize  = image_size
            };

            return(Query(SystemInformationClass.SystemCodeIntegrityVerificationInformation, info, false).Status);
        }