• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 17:07
CEST 23:07
KST 06:07
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Maestros of the Game: Week 1/Play-in Preview12[ASL20] Ro24 Preview Pt2: Take-Off7[ASL20] Ro24 Preview Pt1: Runway132v2 & SC: Evo Complete: Weekend Double Feature4Team Liquid Map Contest #21 - Presented by Monster Energy13
Community News
LiuLi Cup - September 2025 Tournaments2Weekly Cups (August 25-31): Clem's Last Straw?39Weekly Cups (Aug 18-24): herO dethrones MaxPax6Maestros of The Game—$20k event w/ live finals in Paris49Weekly Cups (Aug 11-17): MaxPax triples again!15
StarCraft 2
General
Production Quality - Maestros of the Game Vs RSL 2 Heaven's Balance Suggestions (roast me) Maestros of the Game: Week 1/Play-in Preview Team Liquid Map Contest #21 - Presented by Monster Energy Weekly Cups (August 25-31): Clem's Last Straw?
Tourneys
Maestros of The Game—$20k event w/ live finals in Paris RSL: Revival, a new crowdfunded tournament series LiuLi Cup - September 2025 Tournaments Sea Duckling Open (Global, Bronze-Diamond) Sparkling Tuna Cup - Weekly Open Tournament
Strategy
Custom Maps
External Content
Mutation # 489 Bannable Offense Mutation # 488 What Goes Around Mutation # 487 Think Fast Mutation # 486 Watch the Skies
Brood War
General
ASL20 General Discussion BGH Auto Balance -> http://bghmmr.eu/ BW General Discussion Pros React To: herO's Baffling Game BSL Polish World Championship 2025 20-21 September
Tourneys
[Megathread] Daily Proleagues Is there English video for group selection for ASL Small VOD Thread 2.0 [ASL20] Ro24 Group F
Strategy
Simple Questions, Simple Answers Muta micro map competition Fighting Spirit mining rates [G] Mineral Boosting
Other Games
General Games
General RTS Discussion Thread Stormgate/Frost Giant Megathread Nintendo Switch Thread Path of Exile Warcraft III: The Frozen Throne
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread Canadian Politics Mega-thread YouTube Thread
Fan Clubs
The Happy Fan Club!
Media & Entertainment
[Manga] One Piece Anime Discussion Thread Movie Discussion! [\m/] Heavy Metal Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread High temperatures on bridge(s)
TL Community
The Automated Ban List TeamLiquid Team Shirt On Sale
Blogs
Collective Intelligence: Tea…
TrAiDoS
A very expensive lesson on ma…
Garnet
hello world
radishsoup
Lemme tell you a thing o…
JoinTheRain
RTS Design in Hypercoven
a11
Evil Gacha Games and the…
ffswowsucks
INDEPENDIENTE LA CTM
XenOsky
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1126 users

[R]Maphack Source code

Forum Index > BW General
Post a Reply
statix
Profile Blog Joined October 2004
United States1760 Posts
May 20 2016 13:48 GMT
#1
Since coming back to BW I've found it's nearly impossible to get a normal game going on battle.net without someone blatantly hacking.

I make a living as a programmer and I want to look into developing my own version of an anti-hack/utility. I'm mostly wanting to do this because it seems like a fun little project.

I don't know anything about the way that these hacks manipulate StarCraft but I figure if I know the exploits that current hacks are using I can put measures in place to detect them and possibly prevent them.

Does anyone know if any source code for maphacks is available? Does any documentation exist for creating tools like this so that I have a jumping off point?

Thanks.

SCC-Caliban
LetaBot
Profile Blog Joined June 2014
Netherlands557 Posts
May 20 2016 16:14 GMT
#2
The BWAPI has the "complete map information" flag which allows it to access every piece of information from the opponent.
If you cannot win with 100 apm, win with 100 cpm.
hellokitty[hk]
Profile Joined June 2009
United States1309 Posts
Last Edited: 2016-05-20 16:46:15
May 20 2016 16:46 GMT
#3
Just don't play on battle.net, easy.
People are imbeciles, lucky thing god made cats.
xboi209
Profile Blog Joined June 2011
United States1173 Posts
May 20 2016 18:03 GMT
#4
The problem with detecting maphacks is that you can't analyze game packets to determine if someone is map hacking, thus requiring everyone in the game to run your antihack so that it can scan the process's memory. ICCup achieves this by doing a MD5 checksum in StarCraft.exe's memory space.

If you have good knowledge of assembly and hooking, please contact me since I'm interested in capturing game packets to write functions to detect other hacks.
http://www.reddit.com/r/broodwar/
RoomOfMush
Profile Joined March 2015
1296 Posts
May 20 2016 18:13 GMT
#5
There is nothing you can do against certain kinds of hacks, the reason for this is simple:

All the information is available on the computer of the hacker. The full map, with all units, all buildings, all research, all resources, etc is available in memory. All the hacker has to do is read his own memory. You can NOT detect if a remote computer is reading its own memory. You can NOT detect what the remote computer is doing with the read data. You can NOT prevent a remote computer from reading its own memory.

Some hacks manipulate the game directly (by rewriting their own memory) thus they make everything accessible within the game. These kinds of hacks can be detected by the game itself by checking its own memory for any changes. Of course, the anti-hack can be hacked to disable it again. Another problem is that the hacker needs to have the anti-hack installed and running to check for the hack. If YOU run your anti hack it does absolutely nothing to prevent somebody else from hacking.

But even if the hacker is running an anti-hack and is not overwriting his own memory with malicious code he can still simply read the memory and display it some other way. He could have a second monitor showing him all the information. There is absolutely NOTHING an anti-hack can do against that. You can not prevent a hacker from reading his own memory and showing it to him.

The only way to prevent these kinds of hacks effectively is to change the entire architecture of the application and re-write it from scratch. Something that is not going to happen.
razorsuKe
Profile Blog Joined July 2008
Canada2000 Posts
May 20 2016 20:37 GMT
#6
There used to be several anti-hack tools available and I'm betting that they are still effective now.

First off there were highly effective anti-hack observer maps that would drop a player if it detected a hack. I believe it would drop an observer too if they had one on (say like a rally-point hack or drop hack)
It was available for several popular maps at the time like:
RoV, BlueStorm, Paranoid Android, python, lt, to name a few off the top of my head.
I still have these maps, if you are interested I can upload them.

There was also 3rd party tools you could use to detect hacks, it would alert you of what hack was used.
BWHF comes to mind, it was highly effective at detecting auto-mine and used a system that detected if an opponent clicked a unit/building that they wouldn't otherwise be able to see under fog-of-war / shroud-of-darkness.
It also added the player's nickname to a database and would alert you if you were to come across said hacker again.
However, if a player was smart and used a map hack without clicking on opponent's units/buildings, it wouldn't detect it.

Then there were other 3rd party programs that I have forgotten now because Blizzard banned every single user that used a 3rd party tool, whether that tool was a hack or anti-hack or not even a hack like chaos launcher/penguin plug. I remember several legit users lost their account with many games on it, while hackers didn't care too much since they usually had only a few games on there anyways.

I believe those anti-hack tools detected whether a specific hack was running, rather than trying to determine if map hack was being used, as stated by users above, a simple map hack could be impossible to detect.
EntusGalleries.com - CJ Uniform Sale
AleXoundOS
Profile Joined January 2011
Georgia457 Posts
May 21 2016 18:00 GMT
#7
On May 21 2016 03:13 RoomOfMush wrote:
The only way to prevent these kinds of hacks effectively is to change the entire architecture of the application and re-write it from scratch. Something that is not going to happen.

What architecture would you suggest?
https://bwapi.github.io - An API for interacting with Starcraft: Broodwar (1.16.1)
RoomOfMush
Profile Joined March 2015
1296 Posts
Last Edited: 2016-05-21 18:26:23
May 21 2016 18:20 GMT
#8
On May 22 2016 03:00 AleXoundOS wrote:
Show nested quote +
On May 21 2016 03:13 RoomOfMush wrote:
The only way to prevent these kinds of hacks effectively is to change the entire architecture of the application and re-write it from scratch. Something that is not going to happen.

What architecture would you suggest?

The most popular system for multiplayer RTS games is the Deterministic Lock-Step system. In this system every single machine runs the entire game. They all play the game in parallel. Each machine does the same operations in the same order with the same outcome and this way we can all play the same game.
To make this work each machine sends the user input to all other machines. When every machine has the user input from all players it will calculate the next "step" of the game. It will actually wait for all messages (thats why when one player lags everybody has to wait).

The obvious result is that each machine has access to everything that is happening in the game. You have the entire map with all units, all buildings, all resources, etc, because you are running the entire game locally.

An alternative is that the game runs on a server. Each machine sends the user input from its local player to the central server, the server calculates the new game state and then only sends back the information that is actually avaiable to the local player. This way every machine actually only knows the things its player is supposed to know. In a system like this all kinds of hacks would become much more difficult if not impossible. You could still cheat by having the computer "guess" positions and resources based on previous information but there is no guarantee for it to be accurate.

The problem is that the first system, the Deterministic Lock-Step, is rather simple to implement and very cheap on the resources. You only have to send tiny bits of data (the user input) compared to the entire game state. To give you some values: If we assume that we send the mouse position (x and y axis) and what buttons are pressed (and we even assume there is like 256 possible buttons) we are only looking at 40 bytes without doing any kinds of compression.

But if we send the whole game state we are looking at:
For each unit: hitpoints (2 bytes), energy (2 bytes), shields (2 bytes), face direction (4 bytes), position (8 bytes), owning player (1 byte), updates (? bytes), the current action being performed (? bytes) the current animation (? bytes) which gets us no less then 20 bytes and possibly much much more. This is for each single unit.

On top of that blizzard would have to pay money for the servers which now have to run the game. Right now they just connect players to bring them together. They dont have to actively do much. When suddenly all players are playing on blizzards computers instead blizzard would have to get 1000x more computing power. This would be outrageous costs.


What I could imagine would be a hybrid system with most games using the old Deterministic Lock-Step method but all 1v1 ladder games from masters or higher would use the advanced system to prevent cheating. This way blizzard could keep the cost relatively low while still offering anti-cheating methods for the people who need them most. They could even add an optional paid subscription where only players who pay a monthly fee (to keep the servers running) can play with the anti-cheating system.
This sure wouldnt give you perfect protection but it would already become much much better.

----------------------------------------------------------

An alternative to the above would be to make hacking more difficult. Basically, what happens right now, is that you (as a hacker) have to find out at which place within your RAM the important information (which you want to obtain) is stored. This is actually not that difficult. An experienced hacker can probably find that out by playing the game and monitoring changes to the RAM in real time to see which actions cause which changes. Once they know how the information is stored its absolutely no difficulty to just read it and then display it in some form or another.
But what blizzard could do is mandatory weekly updates which do absolutely nothing but screw around with the memory layout. This way the information would be someplace else entirely every single week. The hacking tools would need to adjust after each update. Sure, this would not be too much work for a hacker, but the point is that its still work. A hacker has to actually care and update his hacks every week if he wants to continue using it. And all other people who use this hack have to download it again and again and again to keep using it. This will discourage the more lazy users of hacks who just dont bother at some point. It will also make sure that once the hacker has no longer any interest in hacking SC2 his hacks wont work any longer.
For blizzard it shouldnt even be very hard to implement this since it is not a functional change in any way. I believe there are even professional tools out there right now which can do this for you. They simply take your compiled program and move code around to change the memory layout without changing the functionality.

This would be a much weaker protection than the above but it would be almost free. The best thing is that you can combine both of these to make it even more inconvenient for all those who are still trying to hack the above method.
TheLordofAwesome
Profile Joined May 2014
Korea (South)2655 Posts
May 21 2016 19:30 GMT
#9
The weekly update you suggest, to do nothing but randomize the locations in memory of the data relevant to the hacker, sounds like an awesome suggestion. Isn't that why the hacks always break after a big patch?

RoomOfMush
Profile Joined March 2015
1296 Posts
May 21 2016 19:44 GMT
#10
On May 22 2016 04:30 TheLordofAwesome wrote:
The weekly update you suggest, to do nothing but randomize the locations in memory of the data relevant to the hacker, sounds like an awesome suggestion. Isn't that why the hacks always break after a big patch?


That might be one reason why they break but of course there could be other reasons too. Any aggressive changes to the system will break the hacks since they most likely only read data statically instead of dynamically analyzing the program.

Those weekly patches would probably work initially but of course hackers aint stupid. They are going to figure things out and adapt. The reorganization of the memory layout should be truly random (or at least highly complex determinism) instead of fixed permutations or otherwise hackers are just going to see through the algorithms used and write their hacks to adapt dynamically.
xboi209
Profile Blog Joined June 2011
United States1173 Posts
Last Edited: 2016-05-21 20:20:14
May 21 2016 20:19 GMT
#11
On May 22 2016 04:30 TheLordofAwesome wrote:
The weekly update you suggest, to do nothing but randomize the locations in memory of the data relevant to the hacker, sounds like an awesome suggestion. Isn't that why the hacks always break after a big patch?


Yes but it also has the unfortunate consequence of breaking other "hacks" such as APM Alert and Lan Latency. I hope that Blizzard will release a patch soon because that would eliminate the majority of the bad hackers on the official Battle.net servers since no new hacks are being written and none of the current hacks would be updated.
http://www.reddit.com/r/broodwar/
Jealous
Profile Blog Joined December 2011
10170 Posts
May 22 2016 04:26 GMT
#12
On May 22 2016 05:19 xboi209 wrote:
Show nested quote +
On May 22 2016 04:30 TheLordofAwesome wrote:
The weekly update you suggest, to do nothing but randomize the locations in memory of the data relevant to the hacker, sounds like an awesome suggestion. Isn't that why the hacks always break after a big patch?


Yes but it also has the unfortunate consequence of breaking other "hacks" such as APM Alert and Lan Latency. I hope that Blizzard will release a patch soon because that would eliminate the majority of the bad hackers on the official Battle.net servers since no new hacks are being written and none of the current hacks would be updated.

That's kinda wishful thinking, because at any point in time there will be at least one butthurt nooblet out there who wants to feel like he's worth a damn in this world and will write the script to prove it on Battle.net East.
"The right to vote is only the oar of the slaveship, I wanna be free." -- бум бум сучка!
sabas123
Profile Blog Joined December 2010
Netherlands3122 Posts
May 29 2016 14:35 GMT
#13
On May 22 2016 03:20 RoomOfMush wrote:
Show nested quote +
On May 22 2016 03:00 AleXoundOS wrote:
On May 21 2016 03:13 RoomOfMush wrote:
The only way to prevent these kinds of hacks effectively is to change the entire architecture of the application and re-write it from scratch. Something that is not going to happen.

What architecture would you suggest?

An alternative to the above would be to make hacking more difficult. Basically, what happens right now, is that you (as a hacker) have to find out at which place within your RAM the important information (which you want to obtain) is stored. This is actually not that difficult. An experienced hacker can probably find that out by playing the game and monitoring changes to the RAM in real time to see which actions cause which changes. Once they know how the information is stored its absolutely no difficulty to just read it and then display it in some form or another.
But what blizzard could do is mandatory weekly updates which do absolutely nothing but screw around with the memory layout. This way the information would be someplace else entirely every single week. The hacking tools would need to adjust after each update. Sure, this would not be too much work for a hacker, but the point is that its still work. A hacker has to actually care and update his hacks every week if he wants to continue using it. And all other people who use this hack have to download it again and again and again to keep using it. This will discourage the more lazy users of hacks who just dont bother at some point. It will also make sure that once the hacker has no longer any interest in hacking SC2 his hacks wont work any longer.
For blizzard it shouldnt even be very hard to implement this since it is not a functional change in any way. I believe there are even professional tools out there right now which can do this for you. They simply take your compiled program and move code around to change the memory layout without changing the functionality.

This would be a much weaker protection than the above but it would be almost free. The best thing is that you can combine both of these to make it even more inconvenient for all those who are still trying to hack the above method.

If im not mistaken you should be able to do this each time you start a program:

https://en.wikipedia.org/wiki/Address_space_layout_randomization
The harder it becomes, the more you should focus on the basics.
RoomOfMush
Profile Joined March 2015
1296 Posts
Last Edited: 2016-05-29 14:46:09
May 29 2016 14:45 GMT
#14
On May 29 2016 23:35 sabas123 wrote:
Show nested quote +
On May 22 2016 03:20 RoomOfMush wrote:
On May 22 2016 03:00 AleXoundOS wrote:
On May 21 2016 03:13 RoomOfMush wrote:
The only way to prevent these kinds of hacks effectively is to change the entire architecture of the application and re-write it from scratch. Something that is not going to happen.

What architecture would you suggest?

An alternative to the above would be to make hacking more difficult. Basically, what happens right now, is that you (as a hacker) have to find out at which place within your RAM the important information (which you want to obtain) is stored. This is actually not that difficult. An experienced hacker can probably find that out by playing the game and monitoring changes to the RAM in real time to see which actions cause which changes. Once they know how the information is stored its absolutely no difficulty to just read it and then display it in some form or another.
But what blizzard could do is mandatory weekly updates which do absolutely nothing but screw around with the memory layout. This way the information would be someplace else entirely every single week. The hacking tools would need to adjust after each update. Sure, this would not be too much work for a hacker, but the point is that its still work. A hacker has to actually care and update his hacks every week if he wants to continue using it. And all other people who use this hack have to download it again and again and again to keep using it. This will discourage the more lazy users of hacks who just dont bother at some point. It will also make sure that once the hacker has no longer any interest in hacking SC2 his hacks wont work any longer.
For blizzard it shouldnt even be very hard to implement this since it is not a functional change in any way. I believe there are even professional tools out there right now which can do this for you. They simply take your compiled program and move code around to change the memory layout without changing the functionality.

This would be a much weaker protection than the above but it would be almost free. The best thing is that you can combine both of these to make it even more inconvenient for all those who are still trying to hack the above method.

If im not mistaken you should be able to do this each time you start a program:

https://en.wikipedia.org/wiki/Address_space_layout_randomization


But then the code that performs the randomization is part of the program (SC2) and thus in the hands of the hackers. If you give the hackers your code then they will be able to reverse engineer it. If the randomization is purely random (and thus impossible to guess) and done by blizzard (on a secure server) you can be sure that hackers have to figure out the new layout instead of figuring out the algorithm.
Please log in or register to reply.
Live Events Refresh
Maestros of the Game
17:00
Group Stage - Group B
Zoun vs ByuNLIVE!
ComeBackTV 1071
SteadfastSC688
IndyStarCraft 246
BRAT_OK 128
Rex87
EnkiAlexander 72
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
SteadfastSC 688
IndyStarCraft 246
BRAT_OK 128
ProTech106
Rex 87
JuggernautJason83
CosmosSc2 38
StarCraft: Brood War
Britney 19637
Dewaltoss 121
Bonyth 112
sSak 22
NaDa 13
Counter-Strike
Stewie2K214
Heroes of the Storm
Liquid`Hasu453
Khaldor126
Other Games
Grubby2273
fl0m1589
Nathanias662
summit1g424
JimRising 317
C9.Mang0135
Livibee76
PPMD25
Organizations
StarCraft 2
angryscii 6
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 24 non-featured ]
StarCraft 2
• musti20045 32
• davetesta19
• StrangeGG 14
• Reevou 1
• LaughNgamezSOOP
• sooper7s
• AfreecaTV YouTube
• intothetv
• Migwel
• Kozan
• IndyKCrew
StarCraft: Brood War
• HerbMon 27
• FirePhoenix15
• Pr0nogo 4
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota22193
League of Legends
• Doublelift4212
• TFBlade539
Counter-Strike
• Shiphtur200
Other Games
• imaqtpie737
• Scarra395
• WagamamaTV347
Upcoming Events
CranKy Ducklings
12h 53m
RSL Revival
12h 53m
GuMiho vs Cham
ByuN vs TriGGeR
Cosmonarchy
16h 53m
TriGGeR vs YoungYakov
YoungYakov vs HonMonO
HonMonO vs TriGGeR
Maestros of the Game
19h 53m
Solar vs Bunny
Clem vs Rogue
[BSL 2025] Weekly
20h 53m
OSC
1d
RSL Revival
1d 12h
Cure vs Bunny
Creator vs Zoun
Maestros of the Game
1d 19h
Maru vs Lambo
herO vs ShoWTimE
BSL Team Wars
1d 21h
Team Hawk vs Team Sziky
Sparkling Tuna Cup
2 days
[ Show More ]
Monday Night Weeklies
2 days
The PondCast
5 days
Online Event
6 days
BSL Team Wars
6 days
Team Bonyth vs Team Dewalt
BSL Team Wars
6 days
Liquipedia Results

Completed

Proleague 2025-09-02
SEL Season 2 Championship
HCC Europe

Ongoing

Copa Latinoamericana 4
BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Qualifiers
ASL Season 20
CSL 2025 AUTUMN (S18)
LASL Season 20
RSL Revival: Season 2
Maestros of the Game
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1

Upcoming

2025 Chongqing Offline CUP
BSL Polish World Championship 2025: Warsaw LAN
BSL Season 21
BSL 21 Team A
Chzzk MurlocKing SC1 vs SC2 Cup #2
EC S1
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
MESA Nomadic Masters Fall
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.