usermode:overlay
Cheat Overlay detection & bypass
Cheater
AntiCheat
Cheater Bypass
Last updated
Was this helpful?
Cheat Overlay detection & bypass
Last updated
Was this helpful?
Was this helpful?
// Register our own overlay window class
const char* clsName = "MyCheatOverlayClass";
WNDCLASSEXA wc = { sizeof(WNDCLASSEXA), CS_HREDRAW | CS_VREDRAW,
OverlayProc, 0, 0, GetModuleHandleA(NULL),
NULL, LoadCursorA(NULL, IDC_ARROW),
NULL, NULL, clsName, NULL };
RegisterClassExA(&wc);
// Create a topmost, layered, transparent, click‐through window
hOverlay = CreateWindowExA(
WS_EX_TOPMOST | WS_EX_LAYERED | WS_EX_TRANSPARENT | WS_EX_TOOLWINDOW,
clsName, "myCheatOverlay",
WS_POPUP,
0, 0,
GetSystemMetrics(SM_CXSCREEN),
GetSystemMetrics(SM_CYSCREEN),
NULL, NULL,
wc.hInstance,
NULL
);
// Fully transparent (alpha = 1)
SetLayeredWindowAttributes(hOverlay, 0, 1, LWA_ALPHA);//using BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM)
// Check for suspicious substrings in title/class
for (const auto& keyword : { "cheat", "aimbot", "esp" }) {
if (contains_ci(strTitle, keyword)) {
reasons.push_back(std::string("Title contains \"") + keyword + "\"");
}
if (contains_ci(strClass, keyword)) {
reasons.push_back(std::string("Class name contains \"") + keyword + "\"");
}
}
// Check for extended style combination: topmost + layered + transparent
LONG exStyle = GetWindowLongA(hwnd, GWL_EXSTYLE);
if ((exStyle & WS_EX_TOPMOST) &&
(exStyle & WS_EX_LAYERED) &&
(exStyle & WS_EX_TRANSPARENT)) {
reasons.push_back("Has WS_EX_TOPMOST | WS_EX_LAYERED | WS_EX_TRANSPARENT");
}// Try NVIDIA GeForce Overlay
hOverlay = FindWindowA("CEF-OSC-WIDGET", "NVIDIA GeForce Overlay");
if (!hOverlay) {
// Fallback: AMD Radeon Overlay
hOverlay = FindWindowA(NULL, "AMD Radeon Overlay");
}
if (hOverlay) {
// Make the found window topmost, layered, and click‐through
// if it not already is
LONG ex = GetWindowLongA(hOverlay, GWL_EXSTYLE);
ex |= WS_EX_TOPMOST | WS_EX_LAYERED | WS_EX_TRANSPARENT;
SetWindowLongA(hOverlay, GWL_EXSTYLE, ex);
// Fully transparent (alpha = 1)
SetLayeredWindowAttributes(hOverlay, 0, 1, LWA_ALPHA);
std::cout << "Hijacked overlay HWND=" << hOverlay << "\n";
} else {
std::cout << "No existing overlay found. Exiting.\n";
return 0;
}