Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

ajoling

Anti Cheat-tecniques

This topic is 5157 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I''m working on a MMOG, and currently working on some cheat protection. After playing UT today and again, being the vicitim of an aimbot (http://members.home.nl/utcg/Shot0019.jpg), I came to the conclusion that the cheat protection is one of most important things in a game, cause the game becomes very boring if some guys start cheating. So, I was compiling a small list of ''anti-cheat'' methods, and wondering if anyone here has anything to add, that I might have missed... This list might help you give some new ideas, so it''s worth reading. 1) Packets encrypted 2) Packet ID''s variable 3) CRC32 on important game files 4) Values stored using a different value (eg, multiplying with 0.5) 5) Using a checksum mechanism on important variables (speed, heading, etc) 6) Server side check if speed is faster than the maximum allowed, also check if certain ship properties match (can cloak, etc) 7) Variables allocated at different memory positions (order) every time the game starts. Well, that''s it so far... any ideas further? Almar

Share this post


Link to post
Share on other sites
Advertisement
One idea is to seperate the networking stuff from the main executable (put it in a DLL).

On the one hand, this makes it marginally easier for hackers to zero in on the networking portion of the code (saving them like 3 minutes of hacking time..they can always easily find the networking code in a large disassembly by looking for the winsock calls).

The benefit, though, is that you can easily change large portions of the network protocol and just have users download the new DLL when they connect with an older protocol version, disconnect them and have them reconnect.

This will discourage people from finding network-protocol-related cheats as long as you keep an eye on things and fix any bugs and change the way the network protocol works in fairly superficial but frustrating ways every time a cheat is found.

This is not really an option for most FPS games, since the servers are distributed all over and run by independent admins, but for a MMOG where you control the servers, its a cinch.


The other obvious suggestion is don''t trust the client for anything more than is absolutely necessary. Your #6, for example, shouldn''t really be needed as you shouldn''t even trust the client to report a speed, that should all be handled on the server with the client just letting the server know "I''m going to travel in this direction and this percentage of my total ship speed". The server should know what 100% of the ship speed is, discard any messages where the speed is >100%, etc and then just send updates to the client (and the clients of other players in its vicinity) as to where it is at each tick. Things like cloaking should also be handled on the server, if the player can''t see someone else''s ship, filter that on the server, not on the client where they could write a hack to be able to see invisible ships. Of course, bandwidth and cpu cost is always an issue here..Sometimes you have to put some faith in the client because doing everything server side would cause too much network traffic for dialup users to handle, or would result in too many calculations on the server (especially if you''re a small operation and can''t afford to run like 20 distributed servers). But its always best to do as much as you can on the server, obviously.


The other thing that is important but can be a high-cost factor is keeping detailed database transactions of game events. If the user finds a bug in a game''s economy and can issue him/herself millions of credits, or a super unbeatable ship, or anything that throws game balance way off, its good to be able to rollback to a pre-bug state. The users will bitch and moan but most of them will understand why rollbacks need to be done in extreme cases. This type of thing is rather daunting if you implement it completely yourself. For MMOGs, I suggest using a relational database server-side to hold persistent data. There are some free ones like PostgreSQL and MySQL that you can use.





Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Thank you for your detailed reply!

It really game me some new ideas I would never even thought about.

quote:

The server should know what 100% of the ship speed is, discard any messages where the speed is >100%



Yeah, this is a nice method. Although it basicly comes down to the same, if someone *finds* a method to change the data sent to the server (my encryption algo is really interesting... but ofcourse anything can be decrypted), the cheater can simply enter a certain ''100''instead of a value that might be ''really'' wrong, for the server.

quote:

Things like cloaking should also be handled on the server, if the player can''t see someone else''s ship, filter that on the server, not on the client where they could write a hack to be able to see invisible ships



My current synchronisation code does not allow this, in fact, I was wondering how I would do it anyway. Simply not sending the packets won''t work... the ships will be interpolated, and interpolated...and interpolated, etc. But for example, that''s why I use the checksum. If the checksum does not match the state of certain properties, something has changed, and the game will terminate.

Hull and shield damage will be done serverside... and death too, so it''s virtually impossible to get invincible... Well, I hope.

I might another add one:

8) Have a simple checksum added to the packet data.

Thanks!
Almar

Share this post


Link to post
Share on other sites
Before you just go out and invent all kinds of crazy ideas, you should take a step back and classify what cheating is all about. I generally divide cheats into three categories (I don't think that's an official thing, but it works fine):

- Rule cheats
These are anything which violates the intended game rules, such as getting a super strong/fast ship, getting an infinite amount of money, etc...

- Knowledge cheats
These are basically things like wallhacks and maphacks

- Doping
Anything that improves the skill of a player. The most prominent example of this is the aimbot.

Rule cheats can be quite easily fought in a client/server-environment. Just don't trust anything the client tells you. It's also easy to fight in a peer-to-peer environment if you send say player commands instead of unit data, so every host runs its own simulation of the game world.

In a client-server environment, knowledge cheats can be completely eliminated, but it's really a tradeoff thing. Anything that's stored on the client can be revealed to the player. Ultimately you could just do all the rendering on the server and just send screenshots to the client, but this is of course not feasible in today's networking environment. Just reduce the amount of information a client has to the minimum.
In a peer-to-peer environment, it's a tradeoff between rule cheating and knowledge cheating. You can completely prevent rule cheating, but only if all hosts have complete knowledge about the entire world, which opens the game to knowledge cheats.

Doping cannot be prevented. Full stop.

Now in the cases where cheating can, in theory, not be completely eliminated (i.e. knowledge cheats and doping), you have to at least make the job harder for crackers, i.e. encrypt the entire networking protocol, encrypt critical data in memory (e.g. AOE2 just xors the players' amount of ressources with a randomly chosen value, according to an article on Gamasutra). Additionally, make tampering with your executable as difficult as possible. Encrypt parts of the code, run several different types of checksums, etc...

Oh, and you really should try to disassemble a good protection scheme at least once before you implement your own. You've got to know how crackers work (i.e. how they use tools like SoftIce, BoundsChecker and IDA).

cu,
Prefect

One line of sourcecode says more than a thousand words.

Edited by - Prefect on September 5, 2001 12:36:14 PM

Share this post


Link to post
Share on other sites
intresting concepts..

i built an anti-cheat gaming network that detects certin cheats for games... currently i only support warzone2100, wich detects lots of speed hacks for the game. ... yes i agree, you got to know the cheats be for you can come up with an anti cheat mechnisim to stop it.... and thats what i did with this network. called DirectGames Online.

http://www.directgamesonline.com

it works off of a database that keeps track of users who cheat on the network, i recently just updated the network to version 4.14 BETA, wich is mplayer like, ever since gamespy took over mplayer. its been a project ive been working on for about 2.5 years now...



---------------------------------

A N.E.W.S.T. Member
http://www.newst.org
http://www.directgamesonline.com

Share this post


Link to post
Share on other sites
2.5 years, ditto for my game...

Thanks for all the responses. Maybe doping can''t be prevented... but atleast we can mkae it tougher for people that try =-/

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Really intresting thread guys! Well as mentioned, doping is one of the most difficult cheats to stop. I''m not sure if it''s even possible to stop. Perhaps were looking at it from the wrong angle.

A few people cheat, which ruins the game for everyone. Why spend all the time creating anti-cheating technology for a few cheaters. Rather spend the time in cheat detection technology, which is much harder to circumvent or even detect. Cheater idenitification and indemnification is a much more reasonable goal. After all, with todays internet, it''s not hard to track and label your players, especially with the MMORPGS, which have a centeralized player DB. If a player is identified as a cheater and tagged as such, honest players can block them from even joining their games, thus no more anoying cheaters.

Good Luck!

-ddn

Share this post


Link to post
Share on other sites
Could doping be prevented using some kind of probability system?

For example, you could have your program keep track of the probability of certain events occuring. (eg. the probability of 10 head-shots in a row is 1/10000 for a skilled player, therefore he must be cheating. Or, the probability of shooting
someone ducking behind a crate with no clear line of sight is 1/10. The probability of him doing it 20 times in one minute is
1/10000)

For every event that can occur, you set a probability. THe program could even adjust the probabilities as the game was played if need be. Sure some legitimate players might get nailed, but probably very few.

It may not work as well for Aimbots, since there are some people with incredible aim. But for things like wallhacks, etc. it may work.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Actually such a system should be able to detect even the best aim bot. You''ll have to find statstical correlations within the data, by profiling known good human players. Deviant profiles will stand out and most likely be a cheater. For instance, a great player not only shoots accurately but their types of mouse movements can be statiscially correlated to their shooting skill. If a normal player, whose mouse movement is very different from the great player but whose shooting percent is very high, then you know there is something odd. True they could be a statsicail deviation, however with more profiles, it will give you a much clearer picture. Its a process of refinement, and testing like any software. Virtually impossible to circumvent as almost all the data is processed on the server side and the rule sets unknown to the cheater.

-ddn

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!