Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Mephisto on April 30, 2005, 02:07 PM

Title: Detecting Maphack in Custom Games
Post by: Mephisto on April 30, 2005, 02:07 PM
If I am the game host and I host a custom game is there a way I can judge whether someone used a maphack by reviewing a packet log or some other way?  I have reason to believe someone in my custom game was using a maphack but I don't have any hard proof other than the events which transpired in the game.
Title: Re: Detecting Maphack in Custom Games
Post by: UserLoser. on April 30, 2005, 02:23 PM
if they select a unit that isn't visible (i.e. covered by fog of war)
Title: Re: Detecting Maphack in Custom Games
Post by: iago on April 30, 2005, 02:34 PM
Which game are we talking about?  Starcraft, Diablo 2, Warcraft 3?  I seem to remember that they all have maphacks.

And yes, UserLoser has the correct solution for Starcraft.  It might work for War3, I can't say for sure. 

Are you talking about a game that already happened, or in general?  It sounds like the game already transpired, by your post, but I can't say for sure.
Title: Re: Detecting Maphack in Custom Games
Post by: UserLoser. on April 30, 2005, 02:36 PM
If the game already happened, like iago said, you could review the replay.  The ways replay data for War3 is stored is very similar to the way it's transfered over the network (same format).  All you would have to do is write a tool to read replay data and then see if they select anything in the game action/update message, which if I remember correctly is message 0x0c
Title: Re: Detecting Maphack in Custom Games
Post by: OnlyMeat on April 30, 2005, 05:21 PM
Quote from: UserLoser on April 30, 2005, 02:36 PM
If the game already happened, like iago said, you could review the replay.  The ways replay data for War3 is stored is very similar to the way it's transfered over the network (same format).  All you would have to do is write a tool to read replay data and then see if they select anything in the game action/update message, which if I remember correctly is message 0x0c

That will only work if the user of the maphack is naive. Most people know that replays record the click events, so they simply avoid doing this in game.

The only real way to confirm if someone is using a maphack is to create a memory validator program which monitors the client's address space for specific changes. I did a client/server one for starcraft a long time ago.
Title: Re: Detecting Maphack in Custom Games
Post by: iago on April 30, 2005, 06:20 PM
Quote from: OnlyMeat on April 30, 2005, 05:21 PM
Quote from: UserLoser on April 30, 2005, 02:36 PM
If the game already happened, like iago said, you could review the replay.  The ways replay data for War3 is stored is very similar to the way it's transfered over the network (same format).  All you would have to do is write a tool to read replay data and then see if they select anything in the game action/update message, which if I remember correctly is message 0x0c

That will only work if the user of the maphack is naive. Most people know that replays record the click events, so they simply avoid doing this in game.

The only real way to confirm if someone is using a maphack is to create a memory validator program which monitors the client's address space for specific changes. I did a client/server one for starcraft a long time ago.

Either everybody would have to be knowingly running it, in which case a clever hacker could just hack the program to show "everything's ok", or they'd be running it without knowing, in which case YOU'RE the one breaking the law.  In either case, you lose.
Title: Re: Detecting Maphack in Custom Games
Post by: raylu on April 30, 2005, 07:00 PM
Most custom maps use a way to detect map hackers. You set off a small area that nobody can see and put a unit on it that crashes SC (like independent CC, I think). The map hack will reveal it and crash SC.
Title: Re: Detecting Maphack in Custom Games
Post by: DeTaiLs on April 30, 2005, 08:07 PM
I dont know how well this works but if u got the replay it checks the replay for any activite that would be caused by cheating http://www.bwchart.com