19
\$\begingroup\$

Why editing the memory of the game client works? Why so many "Hack protection" tools coming with the clients?

If I were to design a client-server game, everything would happen at the server (the simulation of the game world) and clients would be only passive consumers receiving status updates of the part of the world near their characters, sending only some information like keystrokes or move/action commands. Maybe I missing something here, but with that design, any hack like raising my STR by 200 in the client memory (if the value is present at all), just won't have any effect.

The only explanation I can think is that games in which memory editing works let parts of the simulation run in the client and the server then just synchronize all the clients periodically. I can understand that design for Real Time Strategy games with a fixed number of players once a match is configured, but, why in MMORPGs? Is it a strategy to reduce server load?

\$\endgroup\$
  • 2
    \$\begingroup\$ As well as server load, there's also a latency issue. E.g. Minecraft handles all movement client-side simply because it's the easiest solution (out of pure client-side movement, client-side prediction, or laggy movement). (Minecraft has no prediction framework as it's normally a slow-paced game, so predicting movement would be a lot of work and possibly unreliable) \$\endgroup\$ – immibis Jul 3 '15 at 9:25
21
\$\begingroup\$

While ideal, it is practically improbable to validate every single input against the server, both in terms of computational load and latency in input confirmation for the client.

Consequently there are usually a handful of things that aren't validated on the server in many MMOs. In some cases this includes certain classes of character movement, which is why teleportation and speed hacks exist. Client-side protections help provide an extra barrier to those hacks, although of course with sufficient time they can be bypassed. To combat this, many such games would employ a strategy of logging and after-the-fact verification and rotation of the actual protections employed.

There's also the issue of screen other simple memory-scraping hacks that can collate information and transmit keypress and other input back through the client faster than a human can normally react. Or they can look for information that may be transmitted to the client but not necessarily visible yet (such as the positions of creatures that are close by but not displayed anywhere yet, as was common in early Diablo map hacks).

\$\endgroup\$
  • \$\begingroup\$ That would explain interest into looking at the game client's memory and interest in preventing that from happening. The teleportation hack I've seen personally in the last game I played. \$\endgroup\$ – Hatoru Hansou Jul 3 '15 at 4:17
  • 2
    \$\begingroup\$ Interestingly, the game Ark: Survival Evolved says they have everything validated on the server (down to the inputs, iirc). Not exactly a WoW type MMO but it supports 70ppl servers in alpha (plus tons of npc dinos and player built structures). You can certainly feel the lag but it's getting better. I imagine that this will become more and more popular as technology gets better. \$\endgroup\$ – slicedtoad Jul 3 '15 at 17:37
  • 5
    \$\begingroup\$ "70 people" is at least an order of magnitude (several, in fact) fewer people per server than the MMOs I have worked on supported. Also be aware that nearly everybody says they do everything on the server, simply as a way of not giving hackers a leg up on developing hacks. \$\endgroup\$ – Josh Jul 3 '15 at 17:50
  • \$\begingroup\$ @slicedtoad I was about to mention that. Note that since most MMOs use instancing anyway, so ARKs method could work inside those. It just isn't feasible (yet) to do this for large amounts of players. \$\endgroup\$ – Mast Jul 4 '15 at 8:29
10
\$\begingroup\$

One of the reasons why there are protections is that reading the game state could allow bots to know the state of the game and act accordingly.

For instance, grinding in a MMO: if the "bot" knows what mob is around, it can send commands to the game clients to select the mob, hit it until its life is 0, pick up the loot, rinse and repeat. With this, even if all the changes to the simulation are made/confirmed server side, some players may cheat. The commands could be sent via fake mouse-clicks or key-downs, or via memory writing.

This is one of the reasons why MMOs use memory protection.

\$\endgroup\$
  • \$\begingroup\$ Ok, bots have more sense, even if you cannot put yourself in god mode, having a program doing everything for you is cheating too. But, why the "hackers" in the game I was playing can kill in a single hit? Isn't that an indication of editing game memory and server somehow validating those changes. \$\endgroup\$ – Hatoru Hansou Jul 3 '15 at 1:43
  • 1
    \$\begingroup\$ @HatoruHansou Yes. And the annoying part is that unmanned bot can run by itself, so imagine a bunch of 10 computers monitored by a single gold farmer employee, characters online and active 24hours a day.... your MMO is ruined. Some will even have special handling for other players ("Don't stay on my turf, this is my room" (been there.. Lineage II in the beginning)). \$\endgroup\$ – Alexandre Vaillancourt Jul 3 '15 at 1:47
  • \$\begingroup\$ Let the bot population grow without control and your game may be out of business very soon. Ok, the bot alone are enough to justify the anti hack protections. I will wait for a while longer before accepting the answer. \$\endgroup\$ – Hatoru Hansou Jul 3 '15 at 1:54
  • \$\begingroup\$ @HatoruHansou sure :) I'm not sure I have all the reasons for memory protection anyways :) \$\endgroup\$ – Alexandre Vaillancourt Jul 3 '15 at 1:55
6
\$\begingroup\$

Many MMO's are designed with client-side hit prediction. So if there is a hit on the client, it sends that result to the server that there was a hit. In this case the server is not truly authoritative, and thus cheating is possible.

To be honest, if I were designing an MMO, I would make the server fully authoritative, with the client only sending clamped input values to the server, and the server resolving the result.

As to why this isn't done yet by many MMO's, I can only think of additional server load and 'response lag' that comes with having a fully authoritative server, as it just breaks the feel and responsiveness of the game.

\$\endgroup\$
  • \$\begingroup\$ That would explain the memory hacks being effective. Do you have some links to articles/papers about no authoritative server design? \$\endgroup\$ – Hatoru Hansou Jul 3 '15 at 4:10
  • 4
    \$\begingroup\$ Load is not the only problem - responsiveness is the key. Any networked real-time game must employ latency hiding techniques. To make sure everyone agrees, the server has to have a way of ordering the events that happened on each of the clients - trying to avoid the situations like "I shot you first" "No, I shot you first". Speedhacks for games like Counter-Strike rely on abusing this synchronization by manipulating the latency perceived by the server etc. (it's one of the reasons most CS servers kick players with latency higher than 100-200ms). \$\endgroup\$ – Luaan Jul 3 '15 at 9:03
  • 3
    \$\begingroup\$ Unless you're making a strictly turn-based game, this simply cannot be avoided. Latencies will always exist, and all the computers involved in the networked game need to agree on a "common time" to order events. Even with the best systems to manage latency, there will always be inconsistencies, but we've gotten very good at hiding those. The problem is that once you start making those tiny things, it's easier to let a subtle bug slip by - say, allowing the client to post killing the same monster twice if it pretends that the second kill happened before the first kill. It's hard. \$\endgroup\$ – Luaan Jul 3 '15 at 9:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.