Skip to content

Commit 4efac85

Browse files
authored
Fixed a check NtQuerySystemInformation
Fixed a check in the NtQuerySystemInformation.
1 parent acbb29e commit 4efac85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

AntiCrack-DotNet/OtherChecks.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static bool IsUnsignedDriversAllowed(bool Syscall)
3434
CodeIntegrityInfo.Length = (uint)Marshal.SizeOf(typeof(SYSTEM_CODEINTEGRITY_INFORMATION));
3535
uint ReturnLength = 0;
3636
uint result = Syscall ? Syscalls.SyscallNtQuerySystemInformation(SystemCodeIntegrityInformation, ref CodeIntegrityInfo, (uint)Marshal.SizeOf(CodeIntegrityInfo), out ReturnLength) : NtQuerySystemInformation(SystemCodeIntegrityInformation, ref CodeIntegrityInfo, (uint)Marshal.SizeOf(CodeIntegrityInfo), out ReturnLength);
37-
if (NtQuerySystemInformation(SystemCodeIntegrityInformation, ref CodeIntegrityInfo, (uint)Marshal.SizeOf(CodeIntegrityInfo), out ReturnLength) >= 0 && ReturnLength == (uint)Marshal.SizeOf(CodeIntegrityInfo))
37+
if (result >= 0 && ReturnLength == (uint)Marshal.SizeOf(CodeIntegrityInfo))
3838
{
3939
uint CODEINTEGRITY_OPTION_ENABLED = 0x01;
4040
if ((CodeIntegrityInfo.CodeIntegrityOptions & CODEINTEGRITY_OPTION_ENABLED) == CODEINTEGRITY_OPTION_ENABLED)

0 commit comments

Comments
 (0)