• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Maphack Detection

Status
Not open for further replies.
Level 7
Joined
Mar 6, 2006
Messages
282
I think about this all the time, and wonder why people don't talk about this, so if you have any methods that you know about or care to share, then do so!

Anywho, I'll start with my recent findings of detecting selection hack. Selection hack is when you can select units that are not normally visible to you, which means that a maphack is being used.

I found two viable ways to detect this:

Method 1.) When you force a player to select a unit with SelectUnit(), then the game will return true for IsUnitSelected() regardless of hacks. But... anyone who is NOT using selection hack will fire the event EVENT_PLAYER_UNIT_DESELECTED immediately after SelectUnit() was run.

Players who don't fire EVENT_PLAYER_UNIT_DESELECTED are maphacking.

Method 2.) I'll explain this one with steps.

ClearSelection() for player.
Do SelectUnit() on a visible unit owned by the player.
Do SelectUnit() on another unit that's fogged and owned by an enemy of the player.
* The game thinks that both the visible player owned unit, and non-visable enemy owned unit are selected

The game returns true for IsUnitSelected() on the enemy unit.

Now force the player to press Stop on his unit.

If the player is hacking, then the enemy unit is never removed from selection, and returns true for IsUnitSelected()

If the player is not hacking, then the enemy unit is removed from selection upon the order 'Stop', and will return false for IsUnitSelected()


Now you may be thinking, what if they used safeclick? As of right now, safeclick is pretty buggy and has been abandoned in almost all current maphacks. I haven't done much testing with safeclick, but I'm confident that the methods I described above can be reversed to exploit safeclick users. I could be wrong when I say that I don't think there's many people using safeclick, so if you know something, let me know. As of now, I'm not worried about it.

And lastly, what if they aren't using selection hack, but still have maphack on? Well, there used to be corrupted models that would crash maphackers when they saw them, but they seem non-existent now.

Truth is, they still work and a few maps have them. All the current maphacks don't work on those maps. I'm wondering why this hasn't become a standard for anti-maphack, or if anyone actually knows about it.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
well, the thing about models could be doable, if you have model that can crash your game if you view it, you could place unit to some cliff where normal players will never see it and force the camera position to the are, if the unit is fogged, nothing and if it isnt, the game will crash

now just find model that crashes the game :D

the method 1 is nice found
 
Level 7
Joined
Mar 6, 2006
Messages
282
There's a Korean dota map that uses such a model, and I found similar models in a number of other maps. They crash just the maphacker when viewed; it works perfectly.

I'm starting to think that no one talks about this because maphacks will be modified to negate these methods if they're made public.

I'm also wondering if, whoever updates the dota maps, knows about it.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
if you could get somehow corrupted model that crashes the game regardless if you are map hacker or not, and you only map it visible to map hackers(putting the unit on cliff for instance), then there is pretty much no solition to that for him
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
if you are asking me, I cant, Im so noob at modelling that monkey could make better model in less time :D
but as DysfunctionaI said, there msy be someone who knows what crashes the game when rendered

actually I think if you try to render model with more than 100K(100,000) polygons, the game will crash, but I never tested it so no promises
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Or just let people map hack. If they are causing problems then ask them to stop and if they refuse ban them from the robot. The type of person who uses map hacks is hardly discrete about it and will usually blatantly show he is using it, even admitting to it.

I used to run into map hackers all the time before Blizzard applied warden to Custom games (although it sounds like they stopped that). Did not used to let them ruin my fun.
 
Level 6
Joined
Jul 30, 2013
Messages
282
i would think that "pro modeling" would refer to the artistic side of the models, animations, the overall look and smoothness etc.

i would think that such kind of proficiency is irrelevant when just hunting for some irregularity that crosses some unchecked limit. thus anybody could do it via trial and error or better.. if the limit is known..

also FYI. via JASS it is trivial to crash (or desync if u wanna be polite :p) a persons war3 with no ill effects to other players. but that probably wasn't under discussion anyway.. (but anti-maphack that would need reliably finding the persons to drop/crash).
 
Level 7
Joined
Mar 6, 2006
Messages
282
Afaik, with current maphack features, JASS can only detect selections from a maphack. You can that off in most maphacks, so they're usually undetected by JASS natives.

There are quite a few programs that actually run these JASS natives in C++ to detect maphackers in game, but again, it only works if they have fogged selections turned on. Just search for "warcraft 3 fog click detector". Dr Super Good, I think you greatly underestimate how many people maphack online :(

Replay parses do something very similar, where they check all the selections and match them to emulated fog.

Having the map itself force all the players into these hacked selections is the best way to go about this though.

So selections aside, I guess models are the next best thing. Waffle has a point about testing the limits of what can be rendered in a model, I'm gonna do that.

An example is attached. Give this model to a unit, then make it do this animation:

call SetUnitAnimationByIndex( unit, 0)
 

Attachments

  • SpecialDummy.mdx
    2 KB · Views: 121
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Dr Super Good, I think you greatly underestimate how many people maphack online :(
I used to play WC3 when there were a lot of people online so I doubt it. I think you are just worrying too much or placing too much concern in a WC3 map.

Having the map itself force all the players into these hacked selections is the best way to go about this though.
Too bad most map hacks allow you to disable fog selection for that very reason. In fact that is how I remember them.
 
Level 7
Joined
Mar 6, 2006
Messages
282
I used to play WC3 when there were a lot of people online so I doubt it. I think you are just worrying too much or placing too much concern in a WC3 map.

It's easy to not be bothered if you're not playing with these people. And, I'm placing just as much concern as I would for a triggered spell, except this should be easier. The fact that people like dotacash go out of their way to watch people play to check for maphacks, is reason enough for me to be concerned about a new approach to the problem.

Too bad most map hacks allow you to disable fog selection for that very reason. In fact that is how I remember them.

The next line in that post covers that.

Contrary to my usual approach i have to agree with DSG on this.

What exactly are you agreeing with? Something that's possible, and could potentially help people, but let's not do it because it's too much effort?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
I assure you that most people who are map hacking do it so obviously that you can detect it manually without using a map hack. Map hacks also mostly avoid direct modification with the game, some even generating their own mini-map that is overlaid directly through the GPU. As such it is not possible to detect all map hacks in game.

The best solution against map hackers is to simply not play with them. I have seen people leave games on the side of a map hacker (their ally was map hacking) to go to a RM without the guy.

The fact that people like dotacash go out of their way to watch people play to check for maphacks
What a sad little person...
 
Level 19
Joined
Mar 18, 2012
Messages
1,716
Personally it wouldn't bother me, having a map hacker in my game as long as it is not competitive. Nowadays I wouldn't play any wc3 games alone anyway, but team up with a bunch of friends.

Also I would rather endure 1000 hackers over kicking out 1 innocent because the script failed for whatsoever reason.

I have to agree with Dr Super Good and muzzel you care too much about custom games.
 
There is way around corrupted models.

Periodically order player owned unit to attack another
passive unit or whatever you want. Make it so that
attacked unit stay in fog (so attacker can't attack).
If you cheat unit will die and you can do whatever you
want with hacker.

Test map with ISEEDEADPEOPLE.

Off course this is simple test map. You will need to use
real dummy units, hide them well on some hidden place
bla bla bla.
 

Attachments

  • test.w3x
    16.5 KB · Views: 72
Level 7
Joined
Mar 6, 2006
Messages
282
But custom games ARE warcraft 3 modding!

While you guys think I'm caring too much, I think you're not caring enough, so let's just agree to disagree and I'll go at this alone.

@ Kobas, thanks but maphacks actually don't let you target anything in the fog. Broodwar maphacks did that, not Wc3 tho.
 
Status
Not open for further replies.
Top