-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathstdafx.h
43 lines (34 loc) · 1.09 KB
/
stdafx.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#pragma once
#include <winsock2.h>
#include <Windows.h>
#define _WS2DEF_
#include <aclapi.h>
#include <processthreadsapi.h>
#include <Psapi.h>
#include <sddl.h>
#include <shellapi.h>
#include <Shlobj.h>
#include <Shlobj_core.h>
#include <strsafe.h>
#include <tchar.h>
#include <tlhelp32.h>
#include <winternl.h>
#include <stdio.h>
#include <cstdio>
#include <filesystem>
#include <iostream>
#include <string_view>
#include "krabs.hpp"
#include "resource.h"
constexpr auto RED = 12;
constexpr auto PAGE_EXECUTE_ANY = PAGE_EXECUTE | PAGE_EXECUTE_READ | PAGE_EXECUTE_READWRITE | PAGE_EXECUTE_WRITECOPY;
constexpr auto IsExecutable = [](DWORD Protection) { return 0 != (Protection & PAGE_EXECUTE_ANY); };
constexpr auto PAGE_WRITE_ANY = PAGE_READWRITE | PAGE_WRITECOPY | PAGE_EXECUTE_READWRITE | PAGE_EXECUTE_WRITECOPY;
constexpr auto IsWritable = [](DWORD Protection) { return 0 != (Protection & PAGE_WRITE_ANY); };
// helpers.cpp
const char* ProtectionString(DWORD Protection);
std::wstring ProcessName(DWORD processId);
// enableppl.cpp
VOID InstallVulnerableDriver();
VOID EnablePPL();
VOID DisablePPL();