• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

warcraft 3 map protection like maniac with saw

Status
Not open for further replies.
Level 4
Joined
Aug 16, 2012
Messages
31
there's a map called maniac with saw on hive and it's well protected unopenable in mpq editor , i want my maps like this , because although my maps are optimized people can still edit them with jasscraft and mpq editor and thus removing or adding triggers , how can i prevent them from that like maniac with saw?
 

EdgeOfChaos

E

EdgeOfChaos

Bottom line is, if WC3 can open the map file, so can anyone else. Protection just makes it take more effort. There are no exceptions to this rule, as the library that blizzard uses to open map files is publicly available (storm.dll).

If you want a protection like theirs, you can corrupt the mpq header. There are plenty of tutorials on how to do this. Though be aware that it will not discourage people who know how to break it.
 
Level 4
Joined
Aug 16, 2012
Messages
31
Bottom line is, if WC3 can open the map file, so can anyone else. Protection just makes it take more effort. There are no exceptions to this rule, as the library that blizzard uses to open map files is publicly available (storm.dll).

If you want a protection like theirs, you can corrupt the mpq header. There are plenty of tutorials on how to do this. Though be aware that it will not discourage people who know how to break it.

nah maniac with saw can be opened in wc3 but no one can edit it , no one can even open it , i don't want any tutorial i want a specific tutorial to make it be protected exactly the same way like maniac with saw , if there is give me one
 

EdgeOfChaos

E

EdgeOfChaos

Ok here you go. The protection they used was something called Spazzler. It corrupts the MPQ so it can't be opened by most means, but there still are definitely ways to break it. Also, this map protection is not new. It has been around for about 6 years, I think, and was used by maps like FOC, Castle Fight, Vamp Fire.. Most people don't bother with it though, as it's unnecessary effort and won't necessarily stop people anyways.

After some work, I have a copy of Maniac With Saw, openable by MPQ Master. I will not post it here, as I respect the map makers, but I have a screenshot:
http://imgur.com/XzEAk2O
Or, with all directories expanded: http://imgur.com/6CMi816
Also, note: MPQ View breaks protections like this: http://forum.wc3edit.net/useful-tools-f69/anti-cortector-t6303.html

The basics are this. Blizzard invented storm.dll, a mpq library that can open absolutely anything. It's not stoppable. Therefore, when other people use this dll, you can't really ever stop them from opening a map. And people know how to use it, this is the source if you're wondering: https://github.com/ladislav-zezula/StormLib
If you want, I can give a longer explanation; I love the theory behind these protections and the breaking of them, but I don't want to be boring..

As for how to apply the protection. Download a tool called Spazzler. If you want to try it manually, download this guide and reverse it (the guide is on how to break the protection): http://forum.wc3edit.net/deprotection-cheating-f64/how-to-unhex-mpq-somj2hm16-t28627.html
Spazzler download is here right on the Hive: http://www.hiveworkshop.com/forums/warcraft-editing-tools-277/spazzler-wc3-map-corruptor-157045/

But honestly, overall:
I think map protection is a bit overrated
 
Last edited by a moderator:
Level 11
Joined
Jun 2, 2013
Messages
613
Sure, there's plenty of ways to "protect" a map...Vexorian's Map Optimizer makes it "unopenable" in the editor as well. But again, like it's mentioned above, it never is truly 100% protected and there currently isn't a way to do it.

Not to mention open source maps help keep the warcraft community going. It's where a lot of inexperienced mappers learn how certain things are done...

I guess the question is why do you want to keep it out of other people's hands?

After all, Sharing is caring.
 
Level 4
Joined
Aug 16, 2012
Messages
31
Ok here you go. The protection they used was something called Spazzler. It corrupts the MPQ so it can't be opened by most means, but there still are definitely ways to break it. Also, this map protection is not new. It has been around for about 6 years, I think, and was used by maps like FOC, Castle Fight, Vamp Fire.. Most people don't bother with it though, as it's unnecessary effort and won't necessarily stop people anyways.

After some work, I have a copy of Maniac With Saw, openable by MPQ Master. I will not post it here, as I respect the map makers, but I have a screenshot:
http://imgur.com/XzEAk2O
Or, with all directories expanded: http://imgur.com/6CMi816
Also, note: MPQ View breaks protections like this: http://forum.wc3edit.net/useful-tools-f69/anti-cortector-t6303.html

The basics are this. Blizzard invented storm.dll, a mpq library that can open absolutely anything. It's not stoppable. Therefore, when other people use this dll, you can't really ever stop them from opening a map. And people know how to use it, this is the source if you're wondering: https://github.com/ladislav-zezula/StormLib
If you want, I can give a longer explanation; I love the theory behind these protections and the breaking of them, but I don't want to be boring..

As for how to apply the protection. Download a tool called Spazzler. If you want to try it manually, download this guide and reverse it (the guide is on how to break the protection): http://forum.wc3edit.net/deprotection-cheating-f64/how-to-unhex-mpq-somj2hm16-t28627.html
Spazzler download is here right on the Hive: http://www.hiveworkshop.com/forums/warcraft-editing-tools-277/spazzler-wc3-map-corruptor-157045/

But honestly, overall:
thanks for the info , there's a trigger in my map that i don't want hackers to disable it , do you have a way to prevent them from doing so?
 
Last edited:

EdgeOfChaos

E

EdgeOfChaos

No, but you could make it difficult to disable. The first step is to use the map optimizer, that will protect your map and obfuscate the code making it hard to find. Then you could put some checks in the trigger.. For example, when the trigger runs, it sets a boolean to true. And then another trigger runs every 1 second and ends the game if the boolean is not true.

You could hide your scripts (war3map.j) in a zinc file, which might confuse some people. You could use Spazzler on your map; this might discourage some others.

But again: you will not stop a determined hacker.
 
All is fine for now. :)
But just as reminder not to change to a certain sub-topic:
- The topic of removing or circumventing map protection is not permitted.

I agree with EdgeOfChaos here.
You can make it harder for guys, but won't ever stop all.
I personaly don't agree with the mentality of "protecting" a map,
on other hand I respect other ones' opinions if they want.

But from my understanding it honers me if other people come and
open my map to get an idea of how to get something working.
It boosts the process of making quality maps.

One safe way to completly hide your idea is never to publish it.
But what's the sense of it then, right?

Anyhow, I think widgetizer was not noted yet here.
Widgetiger is actually there for decreasing loading time,
but it is also used as sort of protection and here and then.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,287
MPQEdit can open all MPQ archives and its maintainers try their best to keep it that way.

Some WC3 map archives require you to force version 0 because some idiots had the "bright idea" to corrupt the MPQ version field with that of World of Warcraft or StarCraft II but keep the same MPQ0 header structure. WC3 still can read such archives because the MPQ library adopts the approach that if the archive is newer than what it knows it will still try to open it as best it can. Readers that are compliant with a more recent version of the standard will break badly as the archive header does not correctly reflect the declared version (archive is corrupt). Of course such maps could break very badly if Blizzard ever decides to update the MPQ library to that used by their newer games which are aware of more recent versions of MPQ.

Do not think too much about trying to stop people from editing your map. No matter how many man days you spend trying to prevent them from doing so you will still end up losing. Rather invest that time improving the map and discouraging people from modifying it. If the map is competitive then use official host bots to drown out fake versions. If the map has save/load state then design it in such a way that it cannot be broken with hacked codes and that progress occurs fast enough for people to not see the need to cheat. In the end you must remember that this is just a Warcraft III map, a small part of a much bigger game.
 
Level 4
Joined
Aug 16, 2012
Messages
31
No, but you could make it difficult to disable. The first step is to use the map optimizer, that will protect your map and obfuscate the code making it hard to find. Then you could put some checks in the trigger.. For example, when the trigger runs, it sets a boolean to true. And then another trigger runs every 1 second and ends the game if the boolean is not true.

You could hide your scripts (war3map.j) in a zinc file, which might confuse some people. You could use Spazzler on your map; this might discourage some others.

But again: you will not stop a determined hacker.

maybe you can help me out with this , all the others who tell me to discourage people instead of stopping them makes me want to puke all over their faces , i want my map to be only played with 3 players minimum , and i don't want a hacker to disable that feature and plays it alone , so what i want to do is terminate the entire gameplay when there are less than 3 players , so if a hacker disables the 3 players trigger i want the map to destroy itself or something like that is it possible? without getting disabled
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,287
i want my map to be only played with 3 players minimum , and i don't want a hacker to disable that feature and plays it alone , so what i want to do is terminate the entire gameplay when there are less than 3 players , so if a hacker disables the 3 players trigger i want the map to destroy itself or something like that is it possible? without getting disabled
It is not possible. Computers just do not work like this. As long as the game can extract files from the map archive so can other tools. As long as files can be extracted they can be modified. Modified files can be placed into a new map archive. The game can also extract files from this new map archive so it can play the modified map.

Hence why you need to adopt a different approach.

all the others who tell me to discourage people instead of stopping them makes me want to puke all over their faces
And people with arrogance and grammar like yours make me doubt the future of humanity.

Just to add, make the triggers multiple times so destroying one won't be sufficient.
Except this greatly reduces maintainability of your map as well as wasting valuable development time. Many old games did this approach and most of the developers now regret doing it as it makes porting their games to modern systems near impossible. Spyro the Dragon 3 from Insomniac Games is most famous for this where they hard-coded in error checks at virtually every part of the game so much so that outside of original discs and original PS1s only some purposely built emulators can play the game.

Of course such an effective protection is not possible with WC3. You do not have access to the file data directly like you do when making real games.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,287
Do note that there is actually content protection built into the WC3 map format. This is used by Blizzard to prevent tampering around with melee maps and is what produces that official looking Blizzard logo.

The problem is that only Blizzard can use this sort of protection and it only works for their BattleNet melee system. Nothing stops tampered versions of melee maps being hosted in custom games, after all that is what the purpose of the custom game section is.

After the MPQ archive one can embed one or more security chunks to sign the map. They function using asymmetric security. Blizzard signed maps generate such a chunk using their private key (which only they know). WC3 has the accompanying public key hard-coded into it. WC3 checks if the chunk matches the archive content and if so it then shows up as an official Blizzard map. The archive content cannot be changed without the map chunk being invalidated and there is no way to generate a new security chunk without Blizzard's private key.

Once again this does not help you as it only applies to Blizzard maps as they own the private key, they have hardcoded their public key into the game and even then it does not stop people tampering with the map and hosting it in the custom game section.
 
Level 4
Joined
Aug 16, 2012
Messages
31
Do note that there is actually content protection built into the WC3 map format. This is used by Blizzard to prevent tampering around with melee maps and is what produces that official looking Blizzard logo.

The problem is that only Blizzard can use this sort of protection and it only works for their BattleNet melee system. Nothing stops tampered versions of melee maps being hosted in custom games, after all that is what the purpose of the custom game section is.

After the MPQ archive one can embed one or more security chunks to sign the map. They function using asymmetric security. Blizzard signed maps generate such a chunk using their private key (which only they know). WC3 has the accompanying public key hard-coded into it. WC3 checks if the chunk matches the archive content and if so it then shows up as an official Blizzard map. The archive content cannot be changed without the map chunk being invalidated and there is no way to generate a new security chunk without Blizzard's private key.

Once again this does not help you as it only applies to Blizzard maps as they own the private key, they have hardcoded their public key into the game and even then it does not stop people tampering with the map and hosting it in the custom game section.

what's a chunk? how do they generate that? , yeah it does not stop people from tampering with their maps but it does do something on the map once edited which is remove the logo! what i want to do is remove the entire gameplay! same method
 

EdgeOfChaos

E

EdgeOfChaos

That's not the same thing at all. And anyways it's irrelevant since you don't know the key. World Editor also can't generate a customized chunk in the mpq by default, and doing so with a hex editor would probably be unfeasible. You can't make your own key, as you would have to edit wc3's game.dll in order to make it do anything.

Anyways even if you managed to do what no mapmaker has ever done in the history of wc3 and made your map unhackable... it still wouldn't matter, because you can open up several instances of wc3 via kLoader and join the game 3 times. It's still technically single player, but the game would not realize it.

Is it really that important? What's the worst thing that will happen if someone loads it single player? That they play it differently than you intended? That's really not a disaster.
 
Last edited by a moderator:
Level 4
Joined
Jan 1, 2016
Messages
77
what is the final conclusion? Everyone talks a different thing. But one thing you all said is that there is no 100% protection, ok this i understand.
You are telling a lot of things and things and things... So someone can give me a conclusion? What is the best way and how can i protect my map with the harder way. Please tell me briefly. There is a lot of things and my mind is to slow to caught, i need someone who can tell me step by step to what to do. I have a GREAT map coming, i need to know what to do.
 

EdgeOfChaos

E

EdgeOfChaos

The best way? Use Vexorian's optimizer, but keep in mind that this is primarily for the loading time, etc, not the protection itself. You can use Spazzler on it too, if you want to. If you really want a sophisticated anti-cheat, that has to come from you, as there is no general "anti-cheat" to put in a map.

Protection is like locking your car doors. Sure, it's a good idea, but anyone can still easily get in.
 
Level 4
Joined
Jan 1, 2016
Messages
77
i'll be honest to you guys, i already unprotected some maps, but i never edited anything. I just took some ideias of editing, anyway this isn't a reason to justify, even to take an idea, unprotect a map is always uncomfortable.
 

EdgeOfChaos

E

EdgeOfChaos

Honestly, there is nothing wrong with learning from someone else's work. It's not like it harms them in any way. Actually, the current method I use for triggered spells with a duration is based off something I saw in an unprotected map. Anyways, if you know the basics of deprotection, then you also know the basics of map protection. If you want to put together a good protection, then use your knowledge to do something to the map, and then try deprotecting it without specifically using that knowledge, and see if you succeed (as in, see if you can make the programs used crash).
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,287
what's a chunk? how do they generate that? , yeah it does not stop people from tampering with their maps but it does do something on the map once edited which is remove the logo! what i want to do is remove the entire gameplay! same method
A chunk is a structured sequence of related bytes with a well defined length. The term is generally used when dealing with binary file formats. One might use the chunk divisions to process data. Data might also be managed or moved in chunks.

How they generate the chunks I am not certain as it is not an exposed feature of WC3. I am guessing they have a special in-house program to do it, possibly also tied with BattleNet management.

No it is not the same method... There is no coding in the game to do anything like that. The reason it does what it does is because Blizzard hard-coded it to do that.

What is the best way and how can i protect my map with the harder way.
Obsfucate trigger script and delete all worldedit only files. Only people with good knowledge of WC3 (such as myself, not that I do it) can then make changes. That is the best you can do.

You can use Spazzler on it too, if you want to.
I advise against that as there is a slight chance it might not be future proof.

i'll be honest to you guys, i already unprotected some maps, but i never edited anything. I just took some ideias of editing, anyway this isn't a reason to justify, even to take an idea, unprotect a map is always uncomfortable.
You cannot "unprotect" maps. Generally map "protection" involves deleting WorldEdit only data. This lost data cannot be recovered. Although you can get the map back into an editable state within WorldEdit, it will be missing all comments, trigger names, etc making it difficult to change.
 
Level 4
Joined
Jan 1, 2016
Messages
77
"Obsfucate trigger script and delete all worldedit only files."

What? I think that my triggers brain were obsfucated :S.

I'm retard, i need a complete tutorial.
 
Level 4
Joined
Aug 16, 2012
Messages
31
A chunk is a structured sequence of related bytes with a well defined length. The term is generally used when dealing with binary file formats. One might use the chunk divisions to process data. Data might also be managed or moved in chunks.

How they generate the chunks I am not certain as it is not an exposed feature of WC3. I am guessing they have a special in-house program to do it, possibly also tied with BattleNet management.

No it is not the same method... There is no coding in the game to do anything like that. The reason it does what it does is because Blizzard hard-coded it to do that.


Obsfucate trigger script and delete all worldedit only files. Only people with good knowledge of WC3 (such as myself, not that I do it) can then make changes. That is the best you can do.


I advise against that as there is a slight chance it might not be future proof.


You cannot "unprotect" maps. Generally map "protection" involves deleting WorldEdit only data. This lost data cannot be recovered. Although you can get the map back into an editable state within WorldEdit, it will be missing all comments, trigger names, etc making it difficult to change.

and why can't we hard code like they do?
 

EdgeOfChaos

E

EdgeOfChaos

@Old,
To obfuscate something is to make the code confusing and hard to read. This is accomplished by removing indentation, and giving functions and variables a nonsense name, and removing all documentation (comments). For example, if the code was something like this before:

JASS:
    function spellCast takes nothing returns nothing
        local real damage
        if(GetSpellAbilityId() == SPELL)then
            set damage = (GetRandomReal(2,3)*GetHeroStr(GetTriggerUnit(),true))
            call unitDamageTargetSpecial(GetTriggerUnit(),GetSpellTargetUnit(),damage)
            call unitApplyEffect(GetSpellTargetUnit(),EFFECT_PATH)
        endif
    endfunction
It might obfuscate to something like this:
JASS:
function xEV takes nothing returns nothing
local real VxE
if(GetSpellAbilityId()==AhT)then
set VxE=(GetRandomReal(2,3)*GetHeroStr(GetTriggerUnit(),true))
call nEX(GetTriggerUnit(),GetSpellTargetUnit(),VxE)
call XRt(GetSpellTargetUnit(),NEw)
endif
endfunction

The code is exactly the same to wc3, but one is obviously easier to read. Obfuscated code is far harder to understand, and therefore to edit. There's no need to do this manually of course, as Vexorian's map opzimizer does it.

About world editor only files. There are several files that the world editor writes and reads to when making a map, that are not required by wc3 to play the map. Some of these are significant, like the war3map.doo (preplaced units) file, and these simply cannot be "recovered", because protecting a map actually deletes these files. You can manually reconstruct them, but it takes a lot of work (reconstructing a war3map.doo file can take a month+). DSG is correct too, deprotection is a very poor way of editing a map. The real way to edit is to directly edit the files themselves, such as .j, .w3u, etc, and then re-import them.

@Trinin,
The hardcoding that DSG is talking about is coding in the Warcraft 3 game itself. Probably code placed in game.dll, which seems to be wc3's engine. Editing that dll itself would be an extreme amount of work, and take great skill at coding assembly language, but even then it wouldn't matter because you would have to force others to download your edited game.dll and play with it, or they would not share your added code. And Blizzard may do a checksum and ban you for editing the dll instantly anyways. Not to mention, such editing would definitely be illegal.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,287
and why can't we hard code like they do?
Oh I can, just like all software engineers can. If I made a game I would certainly add some form of cryptographic content protection into it to prevent tampering.

Warcraft III is Blizzards game. It is closed source and protected by copyright law. As such despite being able to add such features into software, I cannot add such features into Warcraft III.

Additionally I am a moderate support of open source software. As such I support Blizzard's design decision to not have such security systems in place.

And Blizzard may do a checksum and ban you for editing the dll instantly anyways.
Actually they log the mismatch occurrence. Otherwise people which suffered file corruption would be falsely banned.

More specifically they log in what way the file mismatches. If they find a trend of a certain mismatch they start to investigate. If they find out that they can create such a mismatch when using a cheat of sorts they will ban everyone who was logged with an occurrence of that mismatch in a massive wave. If you create a hack for personal use only there is a good chance you might not be banned unless you are caught cheating (they might not be able to tell the difference between a corrupt file and if it a hack so give you the benefit of the doubt, however if you are seen cheating they may investigate and ban you). If you use a publically available hack even once it is just a matter of time before you are banned. There is always a wave effect except for outlying cases to prevent hack developers from knowing their hack was detected.

Do note that new Blizzard games (and possibly WC3 soon) which use the BattleNet 2.0 launcher have additional checks for tampering. They might refuse to launch entirely or automatically fix detected deviations.
 
Level 2
Joined
Dec 29, 2014
Messages
7
Hi guys,
where i can find to download the mpq corruptor Somj2hM16 ?
thanks.
 
Status
Not open for further replies.
Top