Chaos Project

RPG Maker => General Discussion => Topic started by: poxy on July 30, 2010, 08:01:59 pm

Title: Encrypting RMXP Methods?
Post by: poxy on July 30, 2010, 08:01:59 pm
Does anyone know of a reliable way or a program to encrypt projects, that defeats the decrypter programs?

Or a good DLL packer, and if so could you pm it to me
Title: Re: Encrypting RMXP Methods?
Post by: G_G on July 30, 2010, 08:15:21 pm
I've been working on one in c++. I managed to encrypt the data of a png file but I havent found a way to decrypt it for usage in game xD
Title: Re: Encrypting RMXP Methods?
Post by: Zeriab on July 30, 2010, 08:19:30 pm
.gsub!(/./m, '')
Title: Re: Encrypting RMXP Methods?
Post by: Agckuu Coceg on July 30, 2010, 08:24:57 pm
Quote from: vgvgfWell, here is the idea of this protection explained:

[list=1]
  • You modify the Magic Key in the RGSS102E.dll or RGSS202E.dll
  • You encrypt your game with the same key (Use DRGSS for this or any other encryptor that allows custom key)
  • You then have to compress/pack/crypt the RGSS dll, otherwise, almost anyone can just jump to where the magickey is located with any hex editor, and obtain it easily.


[size=125]The advantages:[/size]
  • Decryptors can't be used directly to decrypt the .rgssad/.rgss2a if you don't have the custom magic key.
  • RGSSAD Extractor won't work, as it would be replacing the dll which contains the custom magic key.


[size=125]Problems:[/size]
  • The scripts still can be obtained from memory
  • If someone manages to decompress/unpack/decrypt the dll, they would be able to obtain the custom magic key
  • Someone with some debugger experience can obtain the magic key
  • Some compressors/encrypters/packers for dll will leave the rgss dll unusable in some computers


[size=125]Tutorial for doing applying this protection method yourself:[/size]
Modifying RGSS dll
First, you will need an unpacked RGSS dll. Here are both xp and vx rgss dlls unpacked by me:
RGSS102E-uncompressed.rar (http://www.fileden.com/files/2007/2/10/757733/RMXP%20Others/RGSS102E-uncompressed.rar)
RGSS202E.rar (http://www.fileden.com/files/2007/2/10/757733/RMXP%20Public/RGSS202E.rar)

If you want to unpack the dll by yourself, use: Stripper_v213b9.rar (http://www.fileden.com/files/2007/2/10/757733/RMXP%20Others/Stripper_v213b9.rar)

You may try using the default rgss dll, but packing a packed dll isn't a good idea.

Then, you will need a hex editor, I recommend using: http://frhed.sourceforge.net/ (http://frhed.sourceforge.net/), but anyone will do.

Open the rgss dll with the hex editor and search for the 0xDEADCAFE key. But warning, the key is stored in little endian order, so you have to search for the inversed bytes FE CA AD DE (In frhed search for: <bh:fe><bh:ca><bh:ad><bh:de>), or if you have downloaded one of the rgss dll I uploaded you can use Go To (Ctrl+G), and for RGSS102E.dll go to 39628 or for RGSS202E.dll go to 43063.
(http://img710.imageshack.us/img710/8541/92530310.png)

So, now you want for example to use the key 0x12345678, then you have to write it in reversed byte order (Remember, 2 digits = 1 byte), that's 78 56 34 12.
(http://img541.imageshack.us/img541/8370/39579226.png)

Encrypt the game with your new magic key
Just use DRGSS (http://www.hbgames.org/forums/viewtopic.php?f=179&t=70525), and in the magic key field use your custom key (In this example 12345678)
(http://img695.imageshack.us/img695/5605/80349211.png)

Pack the RGSS dll
Warning, some packers will leave the rgss dll unusable for some pcs. Make sure that it work in differents computers before releasing a project with this protection.

So, you have to find a good packer, compressor, crypter for DLL. Here is a list: http://www.woodmann.com/crackz/Packers.htm (http://www.woodmann.com/crackz/Packers.htm)

Title: Re: Encrypting RMXP Methods?
Post by: Agckuu Coceg on July 30, 2010, 08:25:44 pm
Oh, double-post...
I just forgot something. Best packer for packing RGSS*dll - UPX. It's free.

http://upx.sourceforge.net/

Usually RGSS*dll packs with ASPack. But it's not freeware.
Title: Re: Encrypting RMXP Methods?
Post by: poxy on July 30, 2010, 08:30:55 pm
Yea, I've seen that topic. That's why I need a good .DLL packer (in pm, please). Thanks for the help but probably better to put that in spoilers.

Quote from: Darth Gir on July 30, 2010, 08:15:21 pm
I've been working on one in c++. I managed to encrypt the data of a png file but I havent found a way to decrypt it for usage in game xD


I've read your topic on that earlier. All I can say is good luck. It would be a really great tool for teh community. :]
Title: Re: Encrypting RMXP Methods?
Post by: Agckuu Coceg on July 30, 2010, 08:35:39 pm
Well, I think I answered this question.
Title: Re: Encrypting RMXP Methods?
Post by: G_G on July 30, 2010, 08:54:22 pm
It can still be unencrypted. Anyone can use vgvgf's rgssad extractor, or anyone can open a hex editor find the magic key and decrypt it. In case you havent seen his latest work, he updated his program for encrypting and decrypting.
Title: Re: Encrypting RMXP Methods?
Post by: Agckuu Coceg on July 31, 2010, 02:21:52 am
Quote from: Darth Gir on July 30, 2010, 08:54:22 pm
It can still be unencrypted. Anyone can use vgvgf's rgssad extractor, or anyone can open a hex editor find the magic key and decrypt it. In case you havent seen his latest work, he updated his program for encrypting and decrypting.



Yes, I know that DRGSS can also decrypting projects, but this is only if you know magic key of this project.

But it all depends primarily on the packer. Find magickey in packed*dll is not a very doable task. Besides, it stop at least 50-60% of "hackers", who even really a hex-editor can not understand. ^_^
Title: Re: Encrypting RMXP Methods?
Post by: G_G on July 31, 2010, 09:21:44 am
There are dll unpackers as well. Its really not that hard to find one. I'm just saying its still pretty difficult to protect your project.
Title: Re: Encrypting RMXP Methods?
Post by: WhiteRose on July 31, 2010, 11:45:14 am
I don't think there's any sure-fire way to completely protect your project from everyone. Even most commercial games can be (and in many cases, have been) hacked and decrypted. You can, of course, legally protect your materials by copyrighting them.
Title: Re: Encrypting RMXP Methods?
Post by: poxy on July 31, 2010, 01:40:44 pm
Besides the dll unpackers, packing the dll can cause issues with the way the game runs.

Quote from: Dartha Stewart on July 31, 2010, 11:45:14 am
I don't think there's any sure-fire way to completely protect your project from everyone. Even most commercial games can be (and in many cases, have been) hacked and decrypted. You can, of course, legally protect your materials by copyrighting them.


That's true, but at least I can try to make it harder for most people.

Just gonna have to hold out for G_G's encrypter...
Title: Re: Encrypting RMXP Methods?
Post by: G_G on July 31, 2010, 02:07:24 pm
Well I did have this data encrypter. Dont think I have it anymore. People could decrypt the game, but they wouldnt have any of the data but someone with scripting knowledge could still get the data.

That way was more of a detour then getting everything right away, that, and most people who decrypt games are just trying to leach stuff so they most likely wouldnt know how to get it.
Title: Re: Encrypting RMXP Methods?
Post by: vgvgf on August 13, 2010, 01:48:45 pm
Quote from: game_guy on July 30, 2010, 08:54:22 pm
It can still be unencrypted. Anyone can use vgvgf's rgssad extractor, or anyone can open a hex editor find the magic key and decrypt it. In case you havent seen his latest work, he updated his program for encrypting and decrypting.
If using the method Agckuu Coceg  mentioned, my rgssad extractor won't work, in case the RGSS dll is well packed after changing the magic key. Using a normal dll with the injected code for loading the "RGSSAD Extractor.rb" for getting the files, won't work because it will have a different magic key and will fail loading the RGSSAD. And, you need an unpacked dll for injecting the code for my RGSSAD Extractor. So the strenght of that method relies on how well was the dll packed (Still, skillful people may get the magic key without even unpacking the dll).