Header inclusion feng-shui (each file only includes what it needs)

This commit is contained in:
Maxime Meignan
2021-12-31 17:29:14 +01:00
parent 4ae1872ae9
commit fa75dd9ec1
29 changed files with 79 additions and 84 deletions
+4
View File
@@ -4,6 +4,10 @@
--- Source and credit: https://github.com/gentilkiwi/mimikatz
*/
#include <Windows.h>
#include <aclapi.h>
#include <Tchar.h>
#include <time.h>
#include "DriverOps.h"
+2
View File
@@ -3,6 +3,8 @@
--- ntoskrnl.exe / wdigest.dll version compute functions.
*/
#include <Tchar.h>
#include <stdio.h>
#include "FileVersion.h"
@@ -4,6 +4,9 @@
--- Source and credit: https://github.com/Barakat/CVE-2019-16098/blob/master/CVE-2019-16098.cpp
*/
#include <Windows.h>
#include <Tchar.h>
#include <Psapi.h>
#include "KernelMemoryPrimitives.h"
+3 -2
View File
@@ -4,8 +4,9 @@
--- Ultimately not used because too unreliable and too prone to BSoD.
*/
#include "KernelPatternSearch.h"
#include <Windows.h>
#include <Tchar.h>
#include "KernelMemoryPrimitives.h"
DWORD64 PatternSearchStartingFromAddress(HANDLE Device, DWORD64 startAddress, DWORD bytesToScan, DWORD64 pattern, DWORD64 mask) {
for (DWORD i = 0; i < bytesToScan; i++) {
+4 -1
View File
@@ -3,7 +3,10 @@
--- LSASS dump functions.
*/
#include <Windows.h>
#include <TlHelp32.h>
#include <minidumpapiset.h>
#include <tchar.h>
#include "LSASSDump.h"
BOOL SetPrivilege(HANDLE hToken, LPCTSTR lpszPrivilege, BOOL bEnablePrivilege)
+3
View File
@@ -4,8 +4,11 @@
--- Hardcoded patterns, with offsets for 350+ ntoskrnl versions provided in the CSV file.
*/
#include <tchar.h>
#include <stdio.h>
#include "NtoskrnlOffsets.h"
#include "FileVersion.h"
union NtoskrnlOffsets ntoskrnlOffsets = { 0 };
+4
View File
@@ -6,6 +6,10 @@
*/
#include <tchar.h>
#include <stdio.h>
#include "FileVersion.h"
#include "WdigestOffsets.h"
union WdigestOffsets wdigestOffsets = { 0 };