Register for your free account! | Forgot your password?

Go Back   elitepvpers › Coders Den › General Coding
You last visited: Today at 01:36

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Server-side validation: a few mistakes that let clients cheat (and how to fix them)

Discussion on Server-side validation: a few mistakes that let clients cheat (and how to fix them) within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
imBigi's Avatar
 
elite*gold: 0
Join Date: Nov 2026
Posts: 2
Received Thanks: 0
Server-side validation: a few mistakes that let clients cheat (and how to fix them)

The client is an untrusted input device
Most "hacks" on a game server aren't magic — they're the client being trusted with something only the server should decide. If you run a server, these are the mistakes I see most often, and how to close them. Nothing here is exotic; it's just discipline about where the truth lives.

1. Trusting values the client sends.
Position, damage, gold, cooldowns — if the client reports them and the server stores them as-is, a modified client just reports whatever it wants. Fix: the server owns state. Recompute or validate server-side (did the hit land given server-side positions? did enough time pass for this skill?). The client sends intent ("I want to attack X"), never results.

2. No bounds or rate limits.
Even if you validate a value, check its range and its frequency. A client that sends 500 pick-up packets a second, or a trade of -1 items, is abusing a missing check. Fix: clamp every incoming value to a sane range, and rate-limit actions per connection.

3. Replayable packets.
If the same packet works twice, you get dupes. A captured "move item" or "confirm trade" packet replayed at the right moment is a classic economy break. Fix: sequence numbers / per-session nonces, and make state transitions idempotent — a trade that already completed can't complete again.

4. Authorization decided on the client.
"Can this player open this window / use this command / enter this map?" If the client decides and the server obeys, that's not a check. Fix: every privileged action re-checks permission server-side, every time.

5. Trusting client-supplied IDs and prices.
If the shop sends the price, or the client tells the server which item id it bought, a modified client buys a top-tier item for 1 gold. Fix: the server looks up price and item from its own catalog by id; the client's copy is display only.

The one rule
If a value matters, the server must own it or re-derive it. Treat every byte from the client as hostile input and most "hacks" simply stop working.

Happy to go deeper on any of these if it's useful.
imBigi is offline  
Reply


Similar Threads Similar Threads
Help How Fix these 3 mistakes of my flyff
10/17/2014 - Flyff Private Server - 1 Replies
Friends I Need Help How To Fix These 3 Mistakes of my flyff Porfa Agregamen my facebook https://www.facebook.com/carlitos.tambillotanta.7 2014/10/11 06:38:26 query:RANKING.RANKING_DBF.dbo.RANKING_STR 'R1','01' SQLSTATE:42000 error:Could not find server 'RANKING' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers. 2014/10/11 06:38:26 CDbManager::UpdateGuildRanking¿¡¼*...
[04.09.13] GigaByte v2.6 [FIX, FIX, FIX, FIX AND FIX]
09/11/2013 - WarRock Hacks, Bots, Cheats & Exploits - 79 Replies
http://www.elitepvpers.com/forum/warrock-hacks-bot s-cheats-exploits/2843300-11-09-gigabyte-public-v2 -7-a.html



All times are GMT +1. The time now is 01:36.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.