Lesson 7 of 9 · 25m
The Cheater's Threat Model: Never Trust the Client
Map cheat capabilities against trust boundaries, separate prevention from detection, and prioritize server-side invariants over client secrecy.
A cheater does not need your source code, your debug symbols, or a Hollywood exploit chain. They need control over a machine you do not control. Once you accept that the client process, memory, network timing, input devices, and rendered frames are adversarial territory, design becomes clearer. Obfuscation raises cost; server invariants determine whether the cheat matters.
Start with capabilities, not cheat names
"Aimbot" and "wallhack" are labels. Capabilities are more useful:
read hidden state positions behind walls, loot, cooldowns, health
inject impossible input perfect aim, instant reaction, scripted movement
modify local simulation speed, teleport, fly, no collision
manipulate timing lag switching, packet delay, selective dropping
automate workflow farming, queuing, market manipulation
forge or replay messages duplicate purchase, replay pickup, spoof actionAsk what server-side truth the capability violates. If the answer is none — for example, reading positional data the server must send for rendering — prevention may be impossible and detection or information minimization becomes the control.
Information hiding is the first boundary
Do not replicate what a client does not need. A player does not need exact enemy positions through three walls, inventory contents of distant players, or precise health values the game never displays. Relevance filtering, fog-of-war, spatial partitioning, and voice-of-design restraint reduce wallhack value.
send exact state visible or recently visible entities
send coarse state distant or occluded entities where gameplay requires awareness
send nothing entities with no plausible relevanceThis is not perfect. Sound, radar mechanics, destructible walls, and replay systems complicate visibility. But every unnecessary byte is both bandwidth cost and cheat intelligence.
Server invariants beat client promises
Write down statements that must remain true no matter what a client sends:
a player cannot move faster than validated movement allows
a weapon cannot fire faster than its cooldown window permits
a purchase cannot increase currency
a pickup cannot be collected twice
an action cannot occur while stunned, dead, or out of range
a trade cannot duplicate an itemThen implement those invariants server-side. Client checks are user-experience sugar: they hide unavailable buttons and predict outcomes. They are not security controls.
Detection is evidence collection, not vibes
Strong detection uses behavioral and mechanical evidence: input distributions, impossible reaction times, movement correlation, packet timing patterns, repeated edge-of-validation behavior, and replay comparisons. Weak detection bans whoever got reported often. Preserve evidence and make enforcement reviewable; false positives in competitive communities are expensive.
Kernel anti-cheat is a trade, not a personality
Kernel-level anti-cheat can observe powerful local tampering, but it expands privilege, compatibility risk, privacy concern, and player distrust. It still cannot prove intent, and it does not replace server validation. Treat it as one layer in a risk decision involving the competitive value of the game, the player base, and operational maturity — not as the foundation of correctness.
Field notes
- Any hidden state sent "just in case" will eventually be read by someone you did not intend.
- Encryption protects transport confidentiality, not a client controlled by the recipient.
- Randomized message formats slow casual reverse engineering but do not create authorization.
- Cheat resistance is economic: raise attacker cost while keeping honest-player friction and false positives low.
Was this lesson helpful?