I've recently added md5() to my game and as I see, it works great and prevents the users from editing savefile. But however, I think they can bypass this.
since you have to have a default game hash variable in the game, I think you there is a way. I don't know if this is correct though since I don't know if I am actually using the proc right.
Whenever someone creates a new character, they are loaded with the default hash variable or a null hash variable right? So that there is not considered cheating. Let's say you save your character, and edit your character in a savefile editor. You see the hash variable and knows that either the hash has to be null or the default value so the system don't know and will set a hash for you when you login/save/write proc. If you login with a null hash or the default hash (it'll let you login cause it will think that you have a new character).
ID:153123
![]() Dec 26 2004, 11:10 am
|
|
Wizkidd0123 wrote:
md5() isn't meant to protect your game from savefile editing. Rather, it's meant to protect it from a type of program called a memory editor. Um, what? You could equally use it for either purpose. DarkGoku, I'm not quite sure what you mean. But if you mean that people can set the hash value in the savefile to null to bypass your system, then you need to check for null hashes and also treat those players as having cheated. If you have existing savefiles with no hashes, you need to go through them and add hashes to them. The easiest way to do this would be to go through every saved character, load it into the game, recalculate its hash, and save it back again. Of course, if you're saving client-side, or you have a lot of different savefiles on different hosts, that makes it more difficult. You may want to have a transition period for a while where null hashes will be accepted, but the savefile will be rewritten with a hash. Once you're confident that most players have hashed savefiles, start booting people (or whatever) when they log in with a null hash. (Explain to them in a text message why they're being booted, of course.) An easier but less than ideal solution is to just wipe all savefiles that don't have a hash; a "pwipe", in other words. But that's best avoided, especially if you have a large number of players. |
ZDarkGoku wrote:
Whenever someone creates a new character, they are loaded with the default hash variable or a null hash variable right? So that there is not considered cheating. Let's say you save your character, and edit your character in a savefile editor. You see the hash variable and knows that either the hash has to be null or the default value so the system don't know and will set a hash for you when you login/save/write proc. If you login with a null hash or the default hash (it'll let you login cause it will think that you have a new character). The only place you have to worry about default hash values causing trouble is if you're converting your game from a format that doesn't use hashes to one that does. As for new characters, the hash you assign to them should be based on their data at the time of a save. Or if you use this to protect from memory editors, the hash should be based on their current vars. In these cases you'll always know to create a new hash, because the character is new. In any case, hashing is useless as a technique if it's not implemented well in a game. md5() is a convenient tool, but if the tool isn't applied in a secure way, it won't provide extra security. Cryptography is tricky business, and no matter how good an encryption or hash you've got, the end result will only be as good as the program's ability to use it securely. Lummox JR |
md5 does have a flaw, but this isn't it :-)
http://developers.slashdot.org/article.pl?sid=04/12/07/ 2019244&from=rss |
Mmm....as I have no idea how it works, it makes me wonder if you could just create a file and add little bits of useless data to it until it created an equivalent hash?
|
You could, but hashing algorithms rely on making the likelihood of stumbling upon identical hashes very low; so you'd have to try several million times before you managed to do it. Not quite takes-longer-than-the-age-of-the-universe stuff, but pretty secure nonetheless. At least until common computer speeds get fast enough to crack it; at which point you've hopefully changed to a more complicated hashing algorithm long since.
|
Foomer wrote:
Mmm....as I have no idea how it works, it makes me wonder if you could just create a file and add little bits of useless data to it until it created an equivalent hash? Possibly, but only hashing an entire file would be vulnerable to this kind of exploit. If you hashed only parts of the data, it may well be impossible to produce an equivalent hash. Lummox JR |
Kunark wrote:
I'm just asking, is rc5 for encryption and md5 for memory editor protection? Nope, they're simply different designations of individual encryption algorithms. Technical MD5 Specification Technical RC5 Specification |
md5() isn't meant to protect your game from savefile editing. Rather, it's meant to protect it from a type of program called a memory editor.