TLS是线程本地存储,定义TLS函数,在函数内可以调用内核函数 NtQueryInformationProcess 检查当前是否处于被调试状态,也可以调用 NtSetInformationThread 让调试崩溃。
// TLS反调试.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//
#include <stdio.h>
#include <Windows.h>
// MINT 是github上的一个项目,里面有对内核函数的声明
// https://github.com/Chuyu-Team/MINT
#include "MINT.h"
#pragma comment(linker,"