• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 16:30
CEST 22:30
KST 05:30
  • 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
Serral wins Maestros of the Game 213ByuL, and the Limitations of Standard Play3Team Liquid Map Contest #22: Results and Winners7Code S Season 2 (2026): RO4 and Finals Preview12TL.net Map Contest #22 - Voting & Ladder Map Selection7
Community News
MC vs IdrA, Boxer vs Nal_rA to be Legacy Matches @ BlizzCon315.0.16 Hotfix (June 30) - Balance + Bug Fixes35Weekly Cups (June 22-28): Zergs thrive in new patch5[TLMC] Summer 2026 Ladder Map Rotation05.0.16 patch for SC2 goes live (8 worker start)99
StarCraft 2
General
Serral wins Maestros of the Game 2 Weekly Cups (June 22-28): Zergs thrive in new patch MC vs IdrA, Boxer vs Nal_rA to be Legacy Matches @ BlizzCon 5.0.16 Hotfix (June 30) - Balance + Bug Fixes HomeStory Cup In Early July
Tourneys
HomeStory Cup 29 Douyu Cup 2026: $20,000 Legends Event (June 26-28) Vespene Cup #1 — $300+ USD, July 10 Crank Gathers Season 4: BW vs SC2 Team League RSL Revival: Season 6 - Qualifiers and Main Event
Strategy
[G] Having the right mentality to improve
Custom Maps
New Map Maker - Looking for Advice - Love or Hate Work In Progress Melee Maps [D]RTS in all its shapes and glory <3
External Content
The PondCast: SC2 News & Results Mutation # 532 Nuclear Family Mutation # 531 Experimental Artillery Mutation # 530 One For All
Brood War
General
FlaShFTW vs A.Alm Grudge Match Event BW General Discussion Farewell Beloved Starcraft (Youtube Videos) BGH Auto Balance -> http://bghmmr.eu/ ASL 22 Proposed Map Pool
Tourneys
Escore Tournament StarCraft Season 2 The Casual Games of the Week Thread [Megathread] Daily Proleagues [ASL21] Grand Finals
Strategy
Simple Questions, Simple Answers Creating a full chart of Zerg builds Relatively freeroll strategies Why doesn't anyone use restoration?
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Dawn of War IV Summer Games Done Quick 2026! ZeroSpace at Steam NextFest - Last free demo
Dota 2
Looking for a Dota Mentor Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
NeO.D_StephenKing vs This Guy From 1 Million Dance TL Mafia Community Thread TL Mafia Power Rank Vanilla Mini Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Canadian Politics Mega-thread The Games Industry And ATVI Men's Fashion Thread
Fan Clubs
The HerO Fan Club! The herO Fan Club!
Media & Entertainment
Movie Discussion! Series you have seen recently... [Req][Books] Good Fantasy/SciFi books [TV/BOOK] *SPOILERS* Game of Thrones Discussion
Sports
McBoner: A hockey love story Formula 1 Discussion 2024 - 2026 Football Thread TeamLiquid Health and Fitness Initiative For 2023 Cricket [SPORT]
World Cup 2022
Tech Support
How to clean a TTe Thermaltake keyboard? Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Listen To The Coaches!
TrAiDoS
An Exploration of th…
waywardstrategy
I'm an arrogant trash talke…
FlaShFTW
Gauntlet SC2: A Retrospectiv…
Ctone23
ramps on octagon
StaticNine
Funny Nicknames
LUCKY_NOOB
Evil Gacha Games and the…
ffswowsucks
Customize Sidebar...

Website Feedback

Closed Threads



Active: 15421 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
Canada2040 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
Georgia458 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)2656 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
10339 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
Next event in 3h 30m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Railgan 85
ZombieGrub28
StarCraft: Brood War
Dewaltoss 108
Rock 16
Bale 13
Dota 2
Gorgc3663
LuMiX1
Counter-Strike
summit1g6179
fl0m1450
Super Smash Bros
hungrybox396
Mew2King82
Heroes of the Storm
Liquid`Hasu318
Other Games
Grubby3511
FrodaN2079
ToD248
C9.Mang0173
ArmadaUGS123
KnowMe108
mouzStarbuck83
UpATreeSC58
JuggernautJason21
Organizations
Dota 2
PGL Dota 2 - Main Stream161
Other Games
angryscii10
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 18 non-featured ]
StarCraft 2
• TaKeSeN 166
• Hupsaiya 55
• Adnapsc2 15
• HeavenSC 8
• Kozan
• Migwel
• AfreecaTV YouTube
• intothetv
• sooper7s
• IndyKCrew
• LaughNgamezSOOP
StarCraft: Brood War
• FirePhoenix9
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Other Games
• imaqtpie990
• Scarra490
• Shiphtur403
Upcoming Events
Replay Cast
3h 30m
HomeStory Cup
14h 30m
Replay Cast
1d 3h
HomeStory Cup
1d 14h
OSC
1d 16h
WardiTV Weekly
3 days
The PondCast
4 days
Replay Cast
5 days
CrankTV Team League
5 days
Replay Cast
6 days
[ Show More ]
CrankTV Team League
6 days
Liquipedia Results

Completed

YSL S3
Douyu Cup 2026
Murky Cup 2026

Ongoing

IPSL Spring 2026
Acropolis #4
CSL Season 21: Qualifier 2
SCTL 2026 Spring
HSC XXIX
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026

Upcoming

CSL 2026 Summer (S21)
Escore Tournament S3: W2
ASL Season 22:Wild Card Qualifier
CSLAN 4
Blizzard Classic Cup 2026
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
RSL Revival: Season 6
CranK Gathers Season 4: BW vs SC2 Team League
Light Tournament 2026
Eternal Conflict S2 Finale
Eternal Conflict S2 E3
Eternal Conflict S2 E2
Heroes Pulsing #3
Eternal Conflict S2 E1
FISSURE Playground #5
BLAST Open Fall 2026
Esports World Cup 2026
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
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 © 2026 TLnet. All Rights Reserved.