Anti-Cheating system: Need expierienced help!

Ouguiya

New Member
Reaction score
11
My thoughts exactly, Legacyspy.


Before going any further, there is one thing about the word "noob" I want to clarify.

Yes, I know, there have been many many definitions of this, but I will just give here the one I use, and how the word "noob" is meant.

So, to contrast: A "Newbie" (note the diffrence) is a new player. Those really deserve help. They are just "new" to the game, and haven't understood everything. In a sense, we all were newbies once.

Now, the other side of the coin are "noobs", or also called "b00ns". Those are the type of people who are really bad, but will rather die than admit it. They have been playing for maybe a while, but cannot win, and will do anything to achieve a small sense of ego, i.e: cheat, hack etc.
Sidenote: Those are also the kind of people who say stuff like: "Hey, come on, trust me, I know that game, I have been playing for 2 years!!", and then the answer comes: "It's only been out for 7 months..."

This is what I mean when I say "noob". Note again: I do not mean a new or inexpierienced player. I mean a bad AND blown-up ego type of player, who does anything he can to win, no matter the cost.


Ok, to continue...

I think I will create a system (seing as there is none which I can really just copy / paste into my map), which will account for 3 things (hopefully) to prevent 99,9 % of all hacks from occuring:

1) It should account for all popular "hack" messages. If one of these is typed, the system should maybe check if something changed, and if it did, kick the player out of the game immedietly. (This is the easiest thing to do)

2) It should account for any changes in the game itself. Meaning, if the player receives more money than he should have (this could be done via a variable, keeping track of the player's money, and if the player's money is diffrent than this variable, the player get's kicked)

3) Lastly (this is the hardest by far to do), I will try to do something that tries to check sort of a "checksum" or "variable sum" or "functions sum" or anything of the similar.

Point 3 is probably the most efficient, since it immediately discovers injected code, but the problem is, I don't know how to do it.

If there is anyone out there who can point me in the right direction of any trigger function or something similar which enables the map to "check" I would greatly appreciate it.

Thanks,

Yours,

Ouguiya
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
What you can also do is count the number of handles at map initialization and check if it's normal. A trigger is a handle, a pre-placed unit is a handle, a region is a handle, even a destructible (and maybe doodad, not sure) is one. A lot of things will trigger it, making it fairly efficient. The only problem is object editor. If someone knows how to prevent modifying things through the OE then I guess it could help to tell us.
 

crabbb622

New Member
Reaction score
9
just a quick idea...

to slow down the hacker, you can make it so that your anti hack defenses only fire during a multiplayer game. that way, he can't test the hacks easily, or even be aware that there are defenses, or perhaps this cheater wrote the whole code without going on battlenet to find that it doesn't work at all. Then he'd be fustrated and rage quit
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
That's kind of evil and useless... But at the same time hackers are evil too... so that leaves us with "useless"..... So yeah...
 

WindexIsBack

New Member
Reaction score
100
A very good idea crabby, I suggest detecting if X number of players are active.
And by X, I mean a random number (2-5, maybe?)

This makes it very hard to find ;-)
 

Ouguiya

New Member
Reaction score
11
Hello again!

Thanks for those replies! (Yeah, I know, I say that one often :D)

I have to say I agree with Bob and Crabb both!

First with Crabb (that idea really sounds overcool. It prevents an easy detection)

Second: Bob, yeah, it really is evil, but hey, why not be evil once in a while too ;). I don't think it's totally useless. I mean, sure, the system COULD live without it, but why leave it out?

What Bob said in his first idea however really threw me from my chair. It seems easy, and yet so incredibly efficient. I will be sure to include it, thank you :)

@ Windexisback: You seem to know quite a lot about this. Could you maybe give me some advice as to how to make those anti-cheat functions as hard as possible to find?


Thanks!

Yours,

Ouguiya
 

Legacyspy

New Member
Reaction score
19
Does this work?

This is VERY EASY to reverse once you're aware of it. But it's interesting just the same.

Simply use this code somewhere in your game code (it shouldn't even ever have to be triggered to work):
Code:
call CreateQuestBJ(0,"Something Here... irrelevant", "REPLACE THIS", "ReplaceableTextures\\CommandButtons\\BTNHolyBolt.blp")

"REPLACE THIS" should be replaced by a string literal (not a variable). If the length (the number of characters) of this string literal exceeds 1023 (if it's 1024 characters long or longer) WC3 will crash whenever the map is selected (in the "create game" or "custom game" screens). NOTE: Although I have only tested this for the CreateQuestBJ function, it probably works the same way for most (if not all) functions.
(Why 1023 characters? Most likely because "0x00" or "\0" or NULL is appended automatically to any string thus making it 1024 or 2^10 "under the hood".)

The trick here lies in how line breaks can be represented in many different ways and that WC3 reliably understands at the very least two of these representations: CR (carriage return, 0x0D, used most prominently in Mac environments) and CR+LF (carriage return + line feed, 0x0D0A, used most prominently in Windows environments). As you can see, CR occupies only 1 byte (one character) while CR+LF is 2 bytes long (two characters), yet they do the exact same thing (within WC3). So, what does this give?

Since the vast majority of WC3 users and modders use Windows, their line breaks will be saved as CR+LF (per default). But what if we previously, in our war3map.j source file, used CR for our line breaks, what happens then? It depends, but most often the file editor will load the file correctly, but later when saving it CR+LF will be used to encode any line breaks. (JassCraft, for instance, works this way. And I dare say it's the most popular Jass editor out there.) So, how do we exploit this?

All we have to do to exploit the above weakness is to make sure our string literal is less than 1024 characters in length when saved using CR to represent our line breaks (btw Jass has no problem handling line breaks within string literals in the war3map.j source file, so there’s no need to use "\n" or anything like that), yet exceeds 1023 characters in length when CR+LF is used to encode any line breaks. Thus the string literal should contain at the very least one CR, preferably lots of them, and be at least (1024 - [Number of CRs]) characters long. Just try to make the actual text make sense, as to hide its real intent.

You may have to use a hex editor (or an optimizer with this functionality) to assert those line breaks become only CRs and not CR+LFs in the file. If done correctly, when your average cheater/modder tries to hack your map by extracting, modifying and reimporting the war3map.j, even though his code works like a charm, your code will cause the map to crash because he introduced errors in it without even knowing it just by saving your war3map.j.

Easy as pie!
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
Learn how to script and make a sysytem of your own, you say you wont just sit around and do nothing, but instead you sit around and ask some one else to do it. If you are so serius about this then make your own system. If you don't have the skills to do it then learn the skills.

There is no need to protect a map, optimizing one is ok cause it reduces file size, but no matter how much you do your map will always be hackable. To use some of your own words, pro's make a tuturial on how to hack protected maps. Well they can easily do the same thing with any system you can come up with.

If people want to edit a map then they will find some way to do it, all your doing is waisting your time and waisting our time with this. There is no such thing as a anti cheat system, and even if your system does keep the cheats out for a week or month, what is to stop a host from simply custom kicking a player who is better then he is.
 

crabbb622

New Member
Reaction score
9
Learn how to script and make a sysytem of your own, you say you wont just sit around and do nothing, but instead you sit around and ask some one else to do it. If you are so serius about this then make your own system. If you don't have the skills to do it then learn the skills.

There is no need to protect a map, optimizing one is ok cause it reduces file size, but no matter how much you do your map will always be hackable. To use some of your own words, pro's make a tuturial on how to hack protected maps. Well they can easily do the same thing with any system you can come up with.

If people want to edit a map then they will find some way to do it, all your doing is waisting your time and waisting our time with this. There is no such thing as a anti cheat system, and even if your system does keep the cheats out for a week or month, what is to stop a host from simply custom kicking a player who is better then he is.

...I'm going to have to say that Ouguiya is justified because you spelled waste wrong. Twice, actually. And he's not wasting my time. Okay, maybe he is, but I AM ENJOYING IT.
 

Ouguiya

New Member
Reaction score
11
There is no such thing as a anti cheat system, and even if your system does keep the cheats out for a week or month, what is to stop a host from simply custom kicking a player who is better then he is.


A great way of demolishing one's motivation you have there, without ever saying anything constructive, I must admit that :D. Fortunately, I am not one to be stopped by persistent nagging by someone who for some reason or the other doesn't seem to like me :p.


On to some more Anti-Cheating ^^:

I looked into bob's idea a bit, and so far, it appears to be the best I could find.

I will certainly use it (thanks Bob, for your great idea!)

Also, I will certainly use Crabb's idea to make it even harder to break the protection, it should come in handy.

As to Legacyspy's quote, it seems really brilliant, yet another thing I would like to include. I will try it, but it seems to require some more knowledge than the one I know. I will have to do some more research, mainly because I do not really understand how to "convert" the line breaks from CR to CR+LF

Thank you all very much for your suggestions. They have been very useful thus far. Naturally, I am always thankful for more suggestions on how to improve the Anti-Cheat system.

Thanks!

Yours,

Ouguiya
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
I don't like or hate you, you are just a random person asking other people to do some thing that has been asked to be done before, if you would have simply clicked on the search botton you could have seen anti-cheats that were already made.

Every word I posted was true, anti cheats don't work and hence are a waist of time.

If you are serius about this then make it your self, we will be more then happy to help you if you run into trouble while triggering, but don't ask us to serve up a custom system to you on a platter.

The website is called the helper, not the giver.
 

BlightWarden

New Member
Reaction score
6
Protecting your map is a smart idea. If you don't protect your map, there will be a dozen broken versions of it within a week. The more people play broken versions the less they will participate when they see the map name. Whether it is a legit protected version or not.

Yes, there will always be people who know how to break a protection, but that group is smaller than the other more common group of lazy players who like to mod semi popular maps. I know many people find maps they like and instantly check if its protected or not so they can mod it to their benefit.

Just to name a few: Footman wars, Castlefight, Green TD, Hero Wars Legends, DBZ (I forget the title) Starwars footie wars, Dota, Battleships, Risk and tank wars. I'v logged in and seen many discussions on bnet on which maps are not protected and how they made (BS) maps rigged so they could win anytime they want. These are not genius map deprotectors either, they are just bored/frustrated players with nothing better to do.

I'v played in countless rigged/broken versions of maps trying to find the legit ones, which are rarely hosted when "noobs" can fill up the game log with their rigged versions.

You don't spend hundreds of hours making a map for others to enjoy just to have it wrecked by jerks. Any map I release will be protected as best as can be or it will not be released. It doesn't matter how popular a map is, if someone likes it, but for some reason wants to change it and its not protected, they will rig it. This is much more common than some might think or want to admit.

As for providing people with help on this site, If someone is unclear on how to do something and another person knows how to do it and refuses because they don't want to, then that person should just let the original poster seek help from others. I for one would not have gotten as far as I have without very helpful folks willing to walking me, step by step, through trigger crafting.

Bottom line is, if someone wants to protect their map and it gives them a sense of peace and security, there is no reason to try to talk them out of it. That in itself seems like the type of behavior one would expect from those who rig maps.

So + rep to Ouguiya for being an outgoing and helpful person.:thup: Keep up the good work and good attitude and don't let the jerks get to you.:)
 

crabbb622

New Member
Reaction score
9
I don't like or hate you, you are just a random person asking other people to do some thing that has been asked to be done before, if you would have simply clicked on the search botton you could have seen anti-cheats that were already made.

Every word I posted was true, anti cheats don't work and hence are a waist of time.

If you are serius about this then make it your self, we will be more then happy to help you if you run into trouble while triggering, but don't ask us to serve up a custom system to you on a platter.

The website is called the helper, not the giver.

Well maybe he wants to make his own original anti-cheat system. This is merely a casual sharing of ideas. And how many times have we heard "The website is called the helper, not the giver". Yeah, real original.
 

WindexIsBack

New Member
Reaction score
100
Btw, when you've "detected" a cheat map, do an infinite loop.
loop
exitwhen 5 == 8
endloop

It'll crash the game - I recommend using variables which area pain to find, or (once gain) a big equation to mask what the function is actually doing..
 

killingdyl

Active Member
Reaction score
6
im just throwing out a wild idea. most cheats will use "-" at the begining, so just crash the game if they use and dashes.
If you have any commands with it you can put in an "if all conditions, else" action into one of ur big triggers that way it will be a pain in the ass to find.
 

black.sheep

Active Member
Reaction score
24
Btw, when you've "detected" a cheat map, do an infinite loop.
loop
exitwhen 5 == 8
endloop

It'll crash the game - I recommend using variables which area pain to find, or (once gain) a big equation to mask what the function is actually doing..

Make a demon hunter to cast mirrior image whist using metamorphs in the loop aswell! Kekekekekeke
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top