Jump to content

  • Log In with Google      Sign In   
  • Create Account

Developering an anticheat for a game


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 Anddos   Members   -  Reputation: 501

Like
0Likes
Like

Posted 24 December 2012 - 11:19 AM

what would you guys do to combat dll injected hackers that detour directx functions
what is the best way to check a process for an injected dll and then use winsock to send off the results to the admin of the server etc

Edited by Anddos, 24 December 2012 - 11:21 AM.

:)

Sponsor:

#2 Servant of the Lord   Crossbones+   -  Reputation: 19662

Like
5Likes
Like

Posted 24 December 2012 - 12:35 PM

Disclaimer: I've never made a networked game before.

 

Assuming it's a multiplayer game:

 

  • First, I'd recognize that there is no way to stop client-side cheating, so I'd put alot of focus into making sure the server is secure and validates whether client packet information is reasonable or not (the player obviously can't move a thousand feet in a half a second, if he somehow is clicking the 'fire' button hundreds of times a second the server still controls the actual firing rate, etc...).
    I'd also make sure, as much as reasonably possible, that only information that the player actually has access to is sent to the player. If an enemy is behind a wall, the server knows that, and shouldn't send the enemy's location to the client! rolleyes.gif
     
  • Second, if unusual packet activity is occuring, I'd secretly mark it on the player's account and automaticly flag that account as a 'suspected' cheater, and the server would pay extra attention to him.
    I'd devote alot of my time to creating tools to enable moderators to effectively moderate, and to auto-detect suspicious behavior.
     
  • Third, for generic cheating programs like Cheat Engine and such, I'd do client-side random scans of the user's currently running processes looking for certain programs. Sure, they can hide it easily enough, or disable the scans, but for the careless cheaters, if it catches them it gives a guaranteed 100% accuracy, with 0 false positives. If worried about certain DLLs being replaced, I'd see if I can't find some way to checksum them.
     
  • Fourth, I'd create cheat programs myself, and distribute them online when people are searching for "<my game> hacks/aimbots/cheats/exploits". The cheat programs would work (and give a small advantage, not a huge one), but would flag the user to the master server by sending an extra packet basically saying "I am a cheater". Every three months or so I'd do a mass ban. Since there is a significant delay between using the cheat program and getting banned, hopefully people won't tie the two together too quickly, but even if they are, I'd have five or six different cheating programs circulating online, so people won't know which is the auto-banning ones, and will either take the risk (and have a high probability of being marked as a cheater), or avoid all cheating tools online (equally good).
     
  • Fifth, if a user is banned, they can either play on a banned-user-only server, not play at all, go through the hassle of creating a new account (and losing all your progress), or pay a real-world penalty of $10 after a 15 day suspension.
     
  • Sixth, I'd keep the game updating very frequently, at least weekly, maybe minor updates daily, so hackers will have to stay up-to-date, and will have to re-configure their cheats annoyingly frequently.
     
  • Seventh, I'd have each build/recompile of the game cycle through different scrambling patterns of the packets, and change around packet IDs and such, so without much work on my part, I automatically increase the difficulty of the work for people developing customized cheats targeting my game. I'd have every minor version (x.3.x, x.4.x, etc...) switch what encryption algorithm it is using, and change around when, and from where in the code, client-to-server cheat warnings are sent, and I'll change the content of those packets also, to keep them from being easily identified. This would be manually done, not automatically.
     
  • Eighth, I'd ensure users can record videos of cheaters. The videos can be uploaded to the public community forums, and voted on. If a video gets identified by enough votes as "cheating", it increases the visibility of the video to the administrator who could make a more intelligent and less emotional decision and then take action against the user caught in the video (but while also not having to wade through all the non-cheater videos himself, letting the community weed those out).
     
  • Ninth, I'd have hidden watermarks always over the game, so when cheaters take pictures or videos of themselves cheating and post them on flickr or YouTube or facebook, I can read the hidden watermark and match it up to a user's ID. I'd immediately ban the user, but I'd set it to a two week delay, so the user doesn't equate the screenshot to the ban, and the watermarking system could go undiscovered for longer. World of Warcraft's watermarking system lasted them five years (2007-2012), though I suspect now that sort of thing has more attention and is looked for.
     
  • Tenth (really should be first), I'd put alot of effort into cultivating a friendly and polite community. A poor/rude/cruel community without cheaters probably does more damage to your game than a polite community with cheaters.

 

 

In summary, I'd take as many easy steps as I can to make things more frustrating for cheaters, and as many easy steps as I can to make the server automatically identify cheaters for banning, and as many easy steps as I can to let the community help identify cheaters where human intervention is needed. Then, I'd focus the majority of my time actually making a fun game, knowing I can't get rid of all the cheaters. If cheating becomes so subtle that nobody realizes someone is cheating, then it won't negatively effect the game experience for other players and I won't waste time stopping it, unless I can do so easily without taking me away from the important development of the game itself.


Edited by Servant of the Lord, 24 December 2012 - 12:36 PM.

It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal

[Fly with me on Twitter] [Google+] [My broken website]

[Need web hosting? I personally like A Small Orange]


#3 blubberbert   Members   -  Reputation: 236

Like
2Likes
Like

Posted 24 December 2012 - 05:19 PM

well having written some hacks for multiplayer games like QuakeLive or Call of Duty 4, i think the best way is to check critical functions in the graphics API that could be hooked and used for hacks. obviously you should also check the functions in your own code.

punkbuster seems to only scan the first bytes of DrawIndexedPrimitive for example and you can easily circumvent that by doing a hook mid-function, so thats a mistake you dont want to make ;)

you might also set some breakpoints on read access to critical structures (for example player positions)
however i dont know if this would be possible in real time.


another way is to check all 3rd party modules for signaturs of known hacks (i think most anticheats rely a lot on this).

 

if you like a challenge, you can also try to write some kind of intelligent cheat detection code that detects if a piece of code accesses data it shouldnt access (your games internal data)

 

those are just ideas though, ive never done anything like this
 


------------------------------
Join the revolution and get a free donut!

#4 superman3275   Crossbones+   -  Reputation: 2061

Like
0Likes
Like

Posted 24 December 2012 - 09:05 PM

I'd say that you only have to make sure that information being sent is reasonable (Like Servant of the Lord said, they obviously can't move One-Thousand meters per second), and only give players access to information that they need (They don't know the position of other players, meaning that they can't have them outlined in red or use an aim-bot).


I'm a game programmer and computer science ninja ph34r.png!

Here's my 2D RPG-Ish Platformer Programmed in Python + Pygame, with a Custom Level Editor and Rendering System!

 

Here's my Custom IDE / Debugger Programmed in Pure Python and Designed from the Ground Up for Programming Education!

Want to ask about Python, Flask, wxPython, Pygame, C++, HTML5, CSS3, Javascript, jQuery, C++, Vimscript, SFML 1.6 / 2.0, or anything else? Recruiting for a game development team and need a passionate programmer? Just want to talk about programming? Email me here:

hobohm.business@gmail.com

or Personal-Message me on here smile.png!


#5 Matias Goldberg   Crossbones+   -  Reputation: 3469

Like
2Likes
Like

Posted 25 December 2012 - 12:47 AM

Extravagant cheating via DirectX


Edited by Matias Goldberg, 25 December 2012 - 12:48 AM.


#6 Servant of the Lord   Crossbones+   -  Reputation: 19662

Like
0Likes
Like

Posted 25 December 2012 - 07:38 PM

Random thought: How about, since the server knows the enemy is not visible and behind a wall, instead of sending the real enemy location, send a fake one enemy location (behind a wall) to draw, to actually put wallhackers at a disadvantage instead of an advantage? Also, if an enemy is behind a wall and an ally is also behind a different wall, swap the enemy and ally indicators for those players.


It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal

[Fly with me on Twitter] [Google+] [My broken website]

[Need web hosting? I personally like A Small Orange]


#7 Matias Goldberg   Crossbones+   -  Reputation: 3469

Like
0Likes
Like

Posted 25 December 2012 - 08:13 PM

That depends. Lockstep deterministic games (like RTS) are inmune to many cheats (i.e. free ore, teleportation cheats, etc), but are very vulnerable to others because everybody must know everything (i.e. AI asisted commands, unveiling fog of war).

 

In non-deterministic games (ie. most FPS) many servers just send the information they know you need for sure, hence not sending data about enemies who are behind a wall. As for sending a fake location, that's meannnn






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS