speige / WC3MapDeprotector

Warcraft 3 Custom Map deprotector
https://www.youtube.com/@ai-gamer
MIT License
17 stars 2 forks source link

Brute Force - Rainbow Tables #25

Open Mottemo opened 2 months ago

Mottemo commented 2 months ago

Hey Guy, since brute force is supported for finding file names, it would also be cool if you could use rainbow tables as an alternative. Is this helpful in such a scenario or is it only useful for calculating passwords? https://de.wikipedia.org/wiki/Rainbow_Table

speige commented 2 months ago

I've debated this many times but so far I've decided not to implement it. Theoretically it could be helpful however there are complications. on the Wikipedia article you referenced it mentions that rainbow tables generally only work for 14 length passwords maximum. This is because the computational power & storage requirements increase exponentially with each new character. Passwords are usually short because a user needs to type them.

Files in WC3 maps have a folder path which is part of the hash. A common folder name is war3mapimported, which is already 15 characters before we even add the file name & extension. But some files even have multiple subfolders and not all maps use standard folder names.

There is already a file included in the program called listfile.txt, it has a similar purpose to a rainbow table, but it's not quite the same. Instead of including every possible file name, it includes every real file name that I've found when deprotecting maps. I think it's a good compromise.

Theoretically the "Live Game Scanner" should be able to find the remaining unknown files. It should make all other forms of scanning unnecessary. Anything still not found is probably not actually used and can be deleted. So, I'm not sure the rainbow tables (or even brute force) would provide enough value to be worth the effort.

I'm leaving this issue open for now but I consider it low priority so i won't be working on it any time soon. Feel free to work on this yourself if you don't want to wait for me to have time to do it.