mirror-ac/driver/integrity.h

63 lines
1.2 KiB
C
Raw Normal View History

2023-08-22 19:32:25 +02:00
#ifndef INTEGRITY_H
#define INTEGRITY_H
#include <ntifs.h>
2023-09-02 15:47:15 +02:00
#include "common.h"
2023-08-22 19:32:25 +02:00
2023-09-04 15:36:26 +02:00
#define SMBIOS_TABLE 'RSMB'
#define SMBIOS_SYSTEM_INFORMATION_TYPE_2_TABLE 2
#define NULL_TERMINATOR '\0'
2023-09-04 15:39:28 +02:00
#define MOTHERBOARD_SERIAL_CODE_TABLE_INDEX 4
2023-09-04 15:36:26 +02:00
2023-09-05 11:16:32 +02:00
/* for testing purposes */
#define VMWARE_SMBIOS_TABLE 1
#define VMWARE_SMBIOS_TABLE_INDEX 3
2023-09-04 17:00:36 +02:00
2023-09-05 11:16:32 +02:00
#define MAX_MODULE_PATH 256
2023-09-04 17:00:36 +02:00
2023-09-05 11:16:32 +02:00
typedef struct _PROCESS_MODULE_INFORMATION
{
PVOID module_base;
SIZE_T module_size;
WCHAR module_path[ MAX_MODULE_PATH ];
2023-09-04 17:00:36 +02:00
2023-09-05 11:16:32 +02:00
}PROCESS_MODULE_INFORMATION, *PPROCESS_MODULE_INFORMATION;
2023-09-04 17:00:36 +02:00
2023-09-05 11:16:32 +02:00
typedef struct _PROCESS_MODULE_VALIDATION_RESULT
{
INT is_module_valid;
2023-09-04 17:00:36 +02:00
2023-09-05 11:16:32 +02:00
}PROCESS_MODULE_VALIDATION_RESULT, *PPROCESS_MODULE_VALIDATION_RESULT;
2023-09-04 17:00:36 +02:00
2023-08-22 19:32:25 +02:00
NTSTATUS CopyDriverExecutableRegions(
_In_ PIRP Irp
);
2023-08-23 14:14:20 +02:00
NTSTATUS GetDriverImageSize(
_In_ PIRP Irp
);
2023-08-31 18:42:38 +02:00
NTSTATUS VerifyInMemoryImageVsDiskImage(
2023-09-01 13:46:31 +02:00
//_In_ PIRP Irp
2023-08-31 18:42:38 +02:00
);
NTSTATUS RetrieveInMemoryModuleExecutableSections(
_In_ PIRP Irp
);
2023-09-04 15:36:26 +02:00
NTSTATUS ParseSMBIOSTable(
_In_ PVOID ConfigMotherboardSerialNumber,
2023-09-06 17:33:08 +02:00
_In_ SIZE_T ConfigMotherboardSerialMaxNumberSize
2023-09-04 15:36:26 +02:00
);
2023-09-05 11:16:32 +02:00
NTSTATUS ValidateProcessLoadedModule(
_In_ PIRP Irp
);
2023-09-04 17:00:36 +02:00
2023-09-06 17:33:08 +02:00
NTSTATUS GetHardDiskDriveSerialNumber(
_In_ PVOID ConfigDrive0Serial,
_In_ SIZE_T ConfigDrive0MaxSize
);
#endif