Control Flow Guard is a security mitigation that verifies the target address of indirect calls. It works by having the compiler insert a check at indirect call sites to verify the validity of the call target, and also the linker write the necessary data and flags into the PE/COFF image to enable the feature on Windows' end.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <intrin.h> | |
#define Assert(x) do { if (!(x)) __debugbreak(); } while (0) | |
static struct | |
{ | |
DWORD process_id; | |
char data[4096 - sizeof(DWORD)]; | |
}* ods_buffer; |