Kuboid
Open Luck·Kuboid.in
Black Hat2023
Open in YouTube ↗

Bypassing Anti-Cheats & Hacking Competitive Games

Black Hat9,487 views38:00over 2 years ago

This talk demonstrates techniques for bypassing kernel-level anti-cheat systems in competitive games by developing custom kernel drivers and utilizing external hardware for input simulation. The speaker details the process of reversing game binaries to identify memory offsets, hooking system calls to facilitate communication between user-mode and kernel-mode, and clearing driver traces to evade detection. The presentation concludes with a demonstration of an external pixel-based aimbot using an Arduino and USB host shield to simulate mouse input, effectively bypassing software-based anti-cheat monitoring.

Bypassing Kernel-Level Anti-Cheats with Custom Drivers and Hardware Simulation

TLDR: Modern kernel-level anti-cheats rely on monitoring system calls and hardware input to detect unauthorized software. This research demonstrates how to bypass these protections by developing custom kernel drivers to handle memory operations and using an Arduino with a USB host shield to simulate hardware-level mouse input. By offloading these tasks to external hardware, researchers can effectively evade software-based detection mechanisms that monitor user-mode processes.

Competitive gaming has turned into a high-stakes arms race between developers and cheat authors. Anti-cheat vendors have moved deep into the Windows kernel, deploying drivers that monitor system calls, memory access, and input events to maintain a level playing field. While these measures increase the cost of entry for cheat developers, they are not impenetrable. The core issue remains that if a system is compromised at the kernel level, the anti-cheat is essentially running on a platform controlled by the adversary.

The Mechanics of Kernel-Level Evasion

Bypassing these systems requires a shift from traditional user-mode hooking to kernel-mode manipulation. The research presented at Black Hat 2023 highlights a methodology for interacting with game memory without triggering standard detection vectors. The process begins with reverse engineering the game binary using tools like IDA Pro or Ghidra to identify the memory offsets for critical variables, such as player health or enemy coordinates.

Once the offsets are known, the challenge is reading and writing to this memory without the anti-cheat detecting the handle creation. Standard Windows APIs for process memory access are heavily monitored. To circumvent this, the researcher developed a custom kernel driver. This driver acts as a bridge, allowing user-mode applications to request memory operations that the driver executes from the kernel context.

To facilitate communication between the user-mode cheat application and the kernel-mode driver, the researcher employed a system call hooking technique. By hijacking a legitimate system call, the cheat can pass instructions to the driver. The following snippet illustrates the concept of injecting shellcode to redirect execution:

mov rax, [CheatDriver_address]
jmp rax

This approach effectively masks the communication channel, as the anti-cheat sees a legitimate system call being executed rather than an unauthorized memory access request.

Evading Detection with Hardware Input

Even with memory access, anti-cheats monitor input events to detect non-human mouse movements. Software-based input simulation, such as SendInput or mouse_event, is easily flagged by modern anti-cheat heuristics. The solution is to move the input simulation entirely off the host machine.

By using an Arduino Leonardo paired with a USB Host Shield, a researcher can create a hardware-level "man-in-the-middle" for the mouse. The real mouse connects to the host shield, which passes data to the Arduino, which then sends the modified input to the PC. To the operating system, this appears as a standard HID device. Because the input is generated by a physical microcontroller, it bypasses software-based input hooks entirely.

The researcher also addressed the challenge of loading unsigned drivers. Tools like kdmapper are frequently used to exploit vulnerable, signed drivers—such as the Intel driver associated with CVE-2015-229—to map custom, unsigned code into kernel memory. This technique is a staple in modern cheat development, as it allows for the execution of arbitrary kernel code without requiring a valid Microsoft signature.

Real-World Implications for Pentesters

For a security researcher or pentester, this research serves as a masterclass in understanding the limitations of kernel-mode security. If you are assessing an environment where kernel-level agents are deployed, you must recognize that these agents are not infallible. They are subject to the same vulnerabilities as any other driver.

During an engagement, look for signs of driver-based persistence or unauthorized memory mapping. The presence of known vulnerable drivers—often used as a vehicle for loading malicious code—is a significant indicator of compromise. Furthermore, monitor for unusual USB device behavior. While hardware-based input simulation is harder to detect, it often leaves traces in the device enumeration logs or via timing analysis of input events.

Defensive Considerations

Defending against these techniques is notoriously difficult because the attacker is operating at the same privilege level as the security software. Anti-cheat developers are increasingly focusing on behavioral analysis and hardware-level attestation to identify anomalies. For system administrators, the best defense is a strict policy regarding driver signing and the use of Windows Defender Application Control (WDAC) to prevent the loading of known vulnerable drivers.

The battle for integrity in competitive environments will continue to push into lower levels of the stack. As researchers, understanding these bypass techniques is essential for building more resilient systems. The next time you encounter a "secure" kernel-level agent, ask yourself how it handles its own memory and whether it is truly monitoring the hardware, or just the software that talks to it.

Talk Type
exploit demo
Difficulty
advanced
Has Demo Has Code Tool Released


Black Hat Asia 2023

45 talks · 2023
Browse conference →
Premium Security Audit

We break your app before they do.

Professional penetration testing and vulnerability assessments by the Kuboid Secure Layer team. Securing your infrastructure at every layer.

Get in Touch
Official Security Partner
kuboid.in