RM Susano'o (New Encryption System for RMXP)

Image


First of all, sorry about my English, I'm Brazilian and I don't practice it too much. Well, this is my solution for protecting our games, it doesn't uses RGSSAD method neither modifications on the RGSS Library. I waited two years to publish it, only to make sure that the games will be enough protected. I can't say too much about it, but I can tell you what it is good for:
* For real protecting your game of any decompiling methods.
* For on-line games w/ update support (since the encrypted files aren't in one big file, it's easier to make little updates).
* For running your game as fast as one using RGSSAD because it only uses C++ methods.
* For making what RGSSAD, BlockXP and DRGSS didn't done.

+Codename: RMSusano'o
+Engine: RPGMaker XP
+Author: PedroHLC
+Version: 0.7.3 - BETA
+First public publish: 05/12/2011
+Last public publish: 07/10/2011
+Thanks for: HugoLnx for starting the project, for the ones that helped me some ideas Anderson Porto and
DarkD.Vicious. And thanks for "灼眼的夏娜" too, he's extraordinary work helped me too much.
Well, I didn't put on the credits yet because I forget, but will be on the next version the thanks for Drago del Fato and ForeverZer0 that gotten how to discovery the real password in the version 0.7.2

Download 4SHARED.COM (size: 1646 Kb)
See source on ImageRM-Susano-o

Any other information that you may need (like the tutorial) is in this file. Thanks you for reading this topic, for any help or if you need to tell me a bug, comment in this topic or send me a message: [email hidden] .
Soon in RMVX too...
Image
I recive this erros sometimes when i play some SE.
This error might happen when calling Audio.se_play method, it might happens with other Audio module calls but never happened to me.

I couldn't find any pattern to explain this, all i know is that the problem isn't with the sound file itself, since it plays when called in another situation
Atoa wrote:
Image
I recive this erros sometimes when i play some SE.
This error might happen when calling Audio.se_play method, it might happens with other Audio module calls but never happened to me.

I couldn't find any pattern to explain this, all i know is that the problem isn't with the sound file itself, since it plays when called in another situation

Ohh sorry :grin: , I forgotten to fix this, try runinng it as an administrator, tonight I fix it and update the file.
Great, this one of the few things we need to relase a demo of final fantasy essence.

This one provides a really good protection, don't expect any noobsh people to steal resources or cheat =P
I will definitely use this when I release a tech demo, hopefully by the end of this year.
Looks good. Question: does it also protect music files?
@gravija
it protect everything, the whole audio, graphics and data folders
i like the program, alot more then most ive seen. one thing i have to say though, running through using it the first time was a pain in the ass(mostly because, even though i am the admin of my computer, your program wouldn't let me do anything to it(run, copy, delete, anything)<-due to being locked by sys admin)

but once i made it bend to my will it ran amazing :D
Really cool. I'm going to use it then!
Sounds great, but expect someone to have a go at breaking it eventually, it's inevitable. :p

But it's cool to see stuff like this done. Lack of proper encryption is one of the big turnoffs for a lot of people.
Thanks everybody for the interest! 😀 I recently formatted my computer, so now I have to download the VS to rebuild it, so the new update will only be available tomorrow or tonight; I'm really happy w/ all this interesting thanks for all again :grin:
I like to share the things I make, and anything else I have is RTP
or made by others...

But when people have Custom works & they don't want others to
steal it, something like this comes along and people are all over it.

😀
Question: Will this work with the Unsafe Loading Script? :)

  1. #--------------------------------------------------------------------------
  2. # * Alias Objects
  3. #--------------------------------------------------------------------------
  4. alias mb_unsafeLoading_load_data  load_data  unless $@
  5. #--------------------------------------------------------------------------
  6. # * Load_Data ( filename )
  7. #--------------------------------------------------------------------------
  8. def load_data(filename)
  9.   # If the file is in the folder
  10.   if FileTest.exist?(filename)
  11.     # Load the one in the folder
  12.     obj = nil
  13.     File.open(filename, "rb") { |f|
  14.       obj = Marshal.load(f)
  15.     }
  16.     return obj
  17.   # If the file is not in the folder, run as normal
  18.   else
  19.     return mb_unsafeLoading_load_data(filename)
  20.   end
  21. end
Expand to see the code.


And also, is there a way NOT to replace Game.exe? Because I protect the Game.exe with DRM.
You know how Enterbrain used the 'Dead Cafe'? (lol) What if there was an option to put in your own number/letters to make decryption harder, so you cant use the same decrypter for all games?

Also, I can't seem to get it to run - It just goes 'RGSS Player is not responding' as soon as I run the application, admin or no admin.
i dont want to sound like a a hole, but did you add the rgss code from the read me to your project? that would prob be the most likely cause.
Twin Matrix wrote:
Question: Will this work with the Unsafe Loading Script? :)

Sorry, That's not a good idea

ZenVirZan wrote:
You know how Enterbrain used the 'Dead Cafe'? (lol) What if there was an option to put in your own number/letters to make decryption harder, so you cant use the same decrypter for all games?

Well, in the Compiler.exe, it makes you a question 'Digite uma senha(tamanho de 3 caracteres)' in english it means 'Type a password w/ at least 3 numbers/letters'

ZenVirZan wrote:
Also, I can't seem to get it to run - It just goes 'RGSS Player is not responding' as soon as I run the application, admin or no admin.

Did you followed all steps in readme.txt ?

EDIT: Updated to 0.7.2 SE bug removed!
Oh... Why is it a not a good idea? lol

[edit] NVM, the encryption works way different from what I thought. This is interesting... Is there a way to encrypt only certain files? Example: I want to update just actors.rxdata, is there a way to encrypt the new actors.rxdata only? Not the ENTIRE project again.
Twin Matrix wrote:
NVM, the encryption works way different from what I thought. This is interesting... Is there a way to encrypt only certain files? Example: I want to update just actors.rxdata, is there a way to encrypt the new actors.rxdata only? Not the ENTIRE project again.

Yes, but you'll need to encrypt actors.rxdata and scripts.rxdata and make sure that you're scripts.rxdata do not load the others rxdata files....

EDIT: If you really wants to use that unsafe loading script, you can change it method name from 'load_data' to 'load_unsafescript' for example; but it will probability run in the original state.
and what is 'NVM' ?
Well, what I'm asking is how I can encrypt actors.rxdata only? For example, I do this:

- Copy the project and encrypt it entirely using your readme.txt instructions.
- Edit the actors.rxdata of the unencrypted project version.
- I want to replace the actors.rxdata of the encrypted version, with the new unencrypted version.
How do I encrypt just actors.rxdata? Or is that not possible?

As for unsafe loading, actually, if I can encrypt just actors.rxdata I don't need it anymore. ^^ It was just so I can give people small fixes, like fixing one map, or just skills, etc.

NVM = nevermind :)

[EDIT] Actually, hold on, I'm not sure if the encryption works in the first place... :/

---------------------------
Sweet Lily Dreams
---------------------------
Script 'FmodEx' line 426: RuntimeError occurred.

File not found: "Audio\BGM\EV-SweetDreams"
---------------------------
OK
---------------------------

[EDIT 2] Okay, what the heck... I replaced the encrypted Audio folder with the old, unencrypted version so that works now... But images don't even load? I don't get an error message, they just don't display. o_O
The file's there alright? o.o
Twin Matrix wrote:
Well, what I'm asking is how I can encrypt actors.rxdata only? For example, I do this:

- Copy the project and encrypt it entirely using your readme.txt instructions.
- Edit the actors.rxdata of the unencrypted project version.
- I want to replace the actors.rxdata of the encrypted version, with the new unencrypted version.
How do I encrypt just actors.rxdata? Or is that not possible?

As for unsafe loading, actually, if I can encrypt just actors.rxdata I don't need it anymore. ^^ It was just so I can give people small fixes, like fixing one map, or just skills, etc.

NVM = nevermind :)

[EDIT] Actually, hold on, I'm not sure if the encryption works in the first place... :/

---------------------------
Sweet Lily Dreams
---------------------------
Script 'FmodEx' line 426: RuntimeError occurred.

File not found: "Audio\BGM\EV-SweetDreams"
---------------------------
OK
---------------------------

[EDIT 2] Okay, what the heck... I replaced the encrypted Audio folder with the old, unencrypted version so that works now... But images don't even load? I don't get an error message, they just don't display. o_O
The file's there alright? o.o


Let's resolve it in parts :P
1) If you use the same encryption password, you can substitute the files by other more updated for example. Marshal files in Data have to be encrypted if they're going to be called w/ 'load_data' method.
2) It works, the problem maybe w/ this 'FmodEx', maybe incompatibility...
3) The images are working here, did remembered to you put the 'scripts4graphics.txt' in you're script like I sad in the 'readme.txt'?
If you need help w/ this same problem, again, contact me through private message...
Hm, sorry for sounding like an idiot XD
I was talking about the Game.exe that came with it. Not my own project.
Testing with my own project now.

Edit: Nah, not working. I did everything, and ran the Encrypter and got a 'noobpass' variable may be corrupted error. Okay, so I ran it in compatibility with Win XP and it encrypted. I had NOT copied over the Modded Game.exe with it. After the encryption, I ran the Game.exe (RMXP Original) and it said something in another language I'm guessing said it couldn't load/find scripts. So i copied over the Modded Game.exe and then it just had the error I mentioned before, about it crashing as soon as it starts.

This is an awesome script (and I have an online game, all the more useful) but it just doesnt work for me.
Am I doing something wrong?
Its a little bug that occurs if you give it an invalid password. (its also a security risk, by the way)
The password can only be 3 digits, so if you give it more or less, it tells you that you need to redo, and after doing so correctly, the bug occurs.
No, i made a password 'AO7' first shot, it encrypted and still doesn't work. It does the same thing as when you try and run the Game.exe from the RAR.
ZenVirZan wrote:
No, i made a password 'AO7' first shot, it encrypted and still doesn't work. It does the same thing as when you try and run the Game.exe from the RAR.

I'm trying to understand your problem, let's see, you put the 'AO7' as the password, in the end of the process, you'll a new file, called 'key.cfg' (do not delete this file, never), and when you try to run the program, it says that it's not responding? Have you tested it w/ an empty project? if it doesn't work too, can you post you're 'debug.txt' file? Have you tried to encrypt a project in your computer and let anyone else test it for you?
@Twin Matrix
I see you're using FMod for sound. Probably some kind of Audio module rewrite. That script is NOT compatible with this. You will need to modify it if you want it to be used with this.

@PedroHLC
I wanted to do this kind of protection you made for a long time. From what I saw your program is encrypting every resource file in the project with a key that project maker specified.
This is a good thing, the bad thing about this program, the key is stored in a key.cfg file and despite you KINDA encrypting it, it can be broken easily.

Here this Ruby script reads the key.cfg and writes out the key:

  1.  
  2. # Key.cfg reader
  3.  
  4. start_c = 54;
  5.  
  6. v = File.open("key.cfg", "r")
  7. g = v.readlines()
  8. v.close
  9.  
  10. m = ""
  11. for i in 0..((g[0].length / 3) - 1)
  12.  min = i * 3
  13.  max = i * 3 + 2
  14.  m += ((g[0][min..max]).to_i - start_c).chr
  15.  start_c += 1
  16. end
  17.  
  18. puts "Key:" + m
  19.  
Expand to see the code.


So you might spend a little more time working on making a better key protection. :)

So as a suggestion try:
- Encrypting a key.cfg with an internal encryption program key. That would make it more secure.
- Ask for a longer password, at least 6 characters. 3 characters encryption is easily broken by brute-force password checking.

Also a question from myself. Is this a complete rewrite of the Game.exe with your functions or you used some other kind od protection?
If you rewritten it. You can make this even better if you modify some classes to SPEED up the Game.exe, for instance, using DirectX instead of GDI+ for image drawing. :)

Hope I helped you.
Drago del Fato wrote:
@PedroHLC
This is a good thing, the bad thing about this program, the key is stored in a key.cfg file and despite you KINDA encrypting it, it can be broken easily.
Also a question from myself. Is this a complete rewrite of the Game.exe with your functions or you used some other kind od protection?
If you rewritten it. You can make this even better if you modify some classes to SPEED up the Game.exe, for instance, using DirectX instead of GDI+ for image drawing. :)

Hope I helped you.

As I said for other one in chaos, there is no motive to get the key back to it original state, you can't do anything w/ it and I need this size for other things.... And, this just a Game.exe rewrite not RGSS, so i don't know any ways of using the DirectX in this case, sorry :P
If you used the key in any way to modify the .rxdata, then it is a huge security threat. People don't need to crack the executable to to crack the program. After discovering how the Marshal data is changed, its a small matter to inject some scripts into it that will output all the files using the embedded decryption process. You wouldn't need to try and chase pointers around, you can do it plain old Ruby.
@PedroHLC
I can't do anything with it? XD
Are you sure about that? XD

Oh that's a baaad way to think. Let me give you this scenario....

1. Create a new project
2. Put a code similar to this in a "special place" in Scripts.rxdata. XD
  1.  
  2.   def copy_file(src, dest)
  3.    o_f = File.open(src, "rb")
  4.    d_s = File.open(dest, "wb")
  5.    d_s.write o_f.readlines
  6.    o_f.close
  7.    d_s.close
  8.   end
  9.  
  10.   def decrypt(arg1)
  11.       if File.exist?('./' + arg1 + '.rmi')
  12.         decrypt_img(arg1)
  13.         entini($TEMPIMG)
  14.         copy_file($TEMPIMG, './' + arg1 + "_d.png")
  15.       end
  16.    end
  17.  
  18.   # After this goes the code which gets all the files from Data, Graphics, Audio folder.
  19.   # Then uses above method to decrypt them.
  20.   # I don't really want to write that, it's long and pointless thing to do for this post. So I'll skip it. :)
  21.  
Expand to see the code.


3. Encrypt the whole projects USING the key which I got from a project that I want resources from.
4. Copy & Paste encrypted Scripts.rxdata to that project and I can easily get stuff from it when I run it.

You can do lots of other things with it when you have access to Scripts.rxdata. :)
So like ForeverZer0 said, when the key is found, it is easy to do the rest. :)
Drago del Fato wrote:
@PedroHLC
You can do lots of other things with it when you have access to Scripts.rxdata. :)
So like ForeverZer0 said, when the key is found, it is easy to do the rest. :)

'¬¬ I really forgotten this, I'm thinking about a solution, I believe I'll have to hide the key anyway :S, on the next version I'll change the formula too :S
if its not too much of a hassle i would like a much longer password length option

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=75623