2023-08-22 19:32:25 +02:00
|
|
|
#ifndef INTEGRITY_H
|
|
|
|
#define INTEGRITY_H
|
|
|
|
|
|
|
|
#include <ntifs.h>
|
2023-12-25 16:54:35 +01:00
|
|
|
|
2023-09-02 15:47:15 +02:00
|
|
|
#include "common.h"
|
2023-08-22 19:32:25 +02:00
|
|
|
|
2023-12-25 16:54:35 +01:00
|
|
|
typedef enum _SMBIOS_TABLE_INDEX
|
|
|
|
{
|
|
|
|
SmbiosInformation = 0,
|
|
|
|
SystemInformation,
|
|
|
|
VendorSpecificInformation,
|
|
|
|
ChassisInformation
|
|
|
|
|
|
|
|
} SMBIOS_TABLE_INDEX;
|
|
|
|
|
|
|
|
#define SMBIOS_VMWARE_SERIAL_NUMBER_SUB_INDEX 3
|
|
|
|
#define SMBIOS_NATIVE_SERIAL_NUMBER_SUB_INDEX 4
|
|
|
|
#define SMBIOS_VENDOR_STRING_SUB_INDEX 1
|
|
|
|
|
2023-10-05 08:27:17 +02:00
|
|
|
NTSTATUS
|
2023-12-13 05:06:27 +01:00
|
|
|
GetDriverImageSize(_Inout_ PIRP Irp);
|
2023-08-22 19:32:25 +02:00
|
|
|
|
2023-10-05 08:27:17 +02:00
|
|
|
NTSTATUS
|
2023-09-27 06:22:14 +02:00
|
|
|
VerifyInMemoryImageVsDiskImage(
|
2023-12-13 05:06:27 +01:00
|
|
|
//_In_ PIRP Irp
|
2023-08-31 18:42:38 +02:00
|
|
|
);
|
|
|
|
|
2023-10-05 08:27:17 +02:00
|
|
|
NTSTATUS
|
2023-12-13 05:06:27 +01:00
|
|
|
RetrieveInMemoryModuleExecutableSections(_Inout_ PIRP Irp);
|
2023-08-31 17:49:04 +02:00
|
|
|
|
2023-10-05 08:27:17 +02:00
|
|
|
NTSTATUS
|
2023-12-13 05:06:27 +01:00
|
|
|
ValidateProcessLoadedModule(_Inout_ PIRP Irp);
|
2023-09-04 17:00:36 +02:00
|
|
|
|
2023-10-05 08:27:17 +02:00
|
|
|
NTSTATUS
|
2023-12-13 05:06:27 +01:00
|
|
|
GetHardDiskDriveSerialNumber(_Inout_ PVOID ConfigDrive0Serial, _In_ SIZE_T ConfigDrive0MaxSize);
|
2023-09-06 17:33:08 +02:00
|
|
|
|
2023-09-27 06:22:14 +02:00
|
|
|
NTSTATUS
|
2023-12-25 16:54:35 +01:00
|
|
|
ParseSMBIOSTable(_Out_ PVOID Buffer,
|
|
|
|
_In_ SIZE_T BufferSize,
|
|
|
|
_In_ ULONG TableIndex,
|
|
|
|
_In_ ULONG TableSubIndex);
|
2023-09-27 06:22:14 +02:00
|
|
|
|
2023-10-02 16:31:30 +02:00
|
|
|
NTSTATUS
|
2023-10-03 14:31:30 +02:00
|
|
|
DetectEptHooksInKeyFunctions();
|
2023-10-02 16:31:30 +02:00
|
|
|
|
2023-10-07 17:37:47 +02:00
|
|
|
PVOID
|
2023-12-13 05:06:27 +01:00
|
|
|
ScanForSignature(_In_ PVOID BaseAddress,
|
|
|
|
_In_ SIZE_T MaxLength,
|
|
|
|
_In_ LPCSTR Signature,
|
|
|
|
_In_ SIZE_T SignatureLength);
|
2023-10-07 17:37:47 +02:00
|
|
|
|
2023-12-13 05:06:27 +01:00
|
|
|
// NTSTATUS
|
|
|
|
// DetermineIfTestSigningIsEnabled(
|
2023-10-20 20:30:45 +02:00
|
|
|
// _Inout_ PBOOLEAN Result
|
|
|
|
//);
|
|
|
|
|
2023-10-07 17:37:47 +02:00
|
|
|
NTSTATUS
|
2023-10-20 20:30:45 +02:00
|
|
|
ValidateSystemModules();
|
2023-10-07 17:37:47 +02:00
|
|
|
|
2023-10-30 12:57:24 +01:00
|
|
|
NTSTATUS
|
|
|
|
ValidateNtoskrnl();
|
|
|
|
|
2023-12-25 16:54:35 +01:00
|
|
|
NTSTATUS
|
|
|
|
GetOsVersionInformation(_Out_ PRTL_OSVERSIONINFOW VersionInfo);
|
|
|
|
|
2023-08-25 09:38:45 +02:00
|
|
|
#endif
|