else if ( v5[4] >= 4u )
{
v13 = *(unsigned int **)(a2 + 24);
Process = 0i64;
v14 = (void *)*v13;
ProcessHandle = 0i64;
v3 = PsLookupProcessByProcessId(v14, &Process);
if ( v3 >= 0 )
{
v3 = ObOpenObjectByPointer(Process, 0, 0i64, 0, 0i64, 0, &ProcessHandle);
if ( v3 >= 0 )
v3 = ZwTerminateProcess(ProcessHandle, 0);
}
if ( ProcessHandle )
ZwClose(ProcessHandle);
if ( Process )
ObfDereferenceObject(Process);
goto LABEL_100;
}
__int64 __fastcall sub_140001680(HANDLE ProcessId)
{
NTSTATUS v1; // ebx
const char *ProcessImageFileName; // rax
const char *v3; // rdi
unsigned __int8 (__fastcall *SystemRoutineAddress)(PEPROCESS); // rax
unsigned __int8 (__fastcall *v5)(PEPROCESS); // rax
struct _UNICODE_STRING DestinationString; // [rsp+40h] [rbp-18h] BYREF
PEPROCESS Process; // [rsp+68h] [rbp+10h] BYREF
HANDLE ProcessHandle; // [rsp+70h] [rbp+18h] BYREF
Process = 0i64;
ProcessHandle = 0i64;
v1 = PsLookupProcessByProcessId((HANDLE)(unsigned int)ProcessId, &Process);
if ( v1 >= 0 )
{
ProcessImageFileName = (const char *)PsGetProcessImageFileName(Process);
v3 = ProcessImageFileName;
if ( ProcessImageFileName )
{
if ( !stricmp(ProcessImageFileName, "csrss.exe")
|| !stricmp(v3, "smss.exe")
|| !stricmp(v3, "lsass.exe")
|| !stricmp(v3, "winlogon.exe")
|| !stricmp(v3, "svchost.exe")
|| v3[1] == 55 && ((*v3 - 75) & 0xDF) == 0 )
{
v1 = 0xC0000022;
}
else
{
if ( (unsigned int)dword_140006084 < 8 )
goto LABEL_17;
RtlInitUnicodeString(&DestinationString, L"PsIsProtectedProcess");
SystemRoutineAddress = (unsigned __int8 (__fastcall *)(PEPROCESS))MmGetSystemRoutineAddress(&DestinationString);
if ( SystemRoutineAddress && SystemRoutineAddress(Process) )
{
v1 = -1073740014;
goto LABEL_20;
}
RtlInitUnicodeString(&DestinationString, L"IsProtectedProcessLight");
v5 = (unsigned __int8 (__fastcall *)(PEPROCESS))MmGetSystemRoutineAddress(&DestinationString);
if ( v5 && v5(Process) )
{
v1 = 0xC0000712;
}
else
{
LABEL_17:
v1 = ObOpenObjectByPointer(Process, 0, 0i64, 0, 0i64, 0, &ProcessHandle);
if ( v1 >= 0 )
v1 = ZwTerminateProcess(ProcessHandle, 0);
}
}
}
}
LABEL_20:
if ( ProcessHandle )
ZwClose(ProcessHandle);
if ( Process )
ObfDereferenceObject(Process);
return (unsigned int)v1;
}
这种驱动是在是太多了。 |