Game Data Protection Methods

Discussion in 'RGSSx Script Support' started by ??????, Jan 4, 2013.

    Tags:
  1. Kread-EX

    Kread-EX You're all bakas Veteran

    Messages:
    863
    Likes Received:
    81
    First Language:
    French
    Crypt-EX uses an external program for the encryption. The decryption process is performed by a DLL, which is called by the loader script found in the provided rgss archive. Precisely, the script evaluates a Gzip compressed, base 64 encoded string.

    Once evaluated, it returns several objects:

    - A Win32API object, in other words, the DLL exported function (said function has void as return value, by the way).

    - A method call, named RGSS.execute - it's defined within the DLL itself so it will do nothing unless the function has been called.

    - A Binding object (the top-level one, created by rgss_main).

    - A filename. Not sure what is it exactly, maybe a temp one.

    - A line number. Again not sure why it is needed.

    Need to disassemble the DLL to really know what happens but well, it's a pain in the ass and I hate assembly. And it's against Whiteflute's TOS anyways.

    EDIT: Actually, I think the RGSS object is defined by the .rgss3d file.

    EDIT2: Ok, guys, even without disassembling the DLL nor dumping the memory it took me just 10 minutes to retrieve an encrypted resource. And making an automated system to do it is trivial too unfortunately. Bottom line: the best protection is notoriety.
     
    Last edited by a moderator: Jan 11, 2013
    #21
  2. Zeriab

    Zeriab Huggins! Veteran

    Messages:
    1,200
    Likes Received:
    1,255
    First Language:
    English
    Primarily Uses:
    RMXP
    Kread-EX, have you tested or noticed if it breaks in any particular cases such as running it on WinXP, Vista, 7, 8 as 32-bit/64-bit or if a redistributable is required?

    I.e. does using that tool limit the market?
     
    #22
  3. Kread-EX

    Kread-EX You're all bakas Veteran

    Messages:
    863
    Likes Received:
    81
    First Language:
    French
    I only have Win 7 64 bits atm so I can't really test. Things I do know is that the wfPcrypt dll returns 5.0 (Win 2000) with GetVersionEX and so do the two executables used for packing. I think there's little risk in assuming Whiteflute took such cases into consideration, though I can't be absolutely sure without testing myself.

    To go back to effectiveness, despite how easy it is to crack for someone who knows what they're doing, the average RM thief falls more under the noob category and this tool should be more than enough to stop that kind at least.
     
    #23
  4. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    i was messing around with that Crypt-Ex "tool" and for the life of me i cant get it to properly encrypt my project....

    im pretty sure im doing something wrong as all you guys seem to be able to get it working fine, but whenever i do it , my game simpy doesnt find ANY of the files needed, e.g graphics /audio ect ... everything that i assume in the .dat files.

    il put the readme through google translate and see if i get a better result .
     
    #24
  5. Rafael_Sol_Maker

    Rafael_Sol_Maker Almighty God Jabu Veteran

    Messages:
    122
    Likes Received:
    36
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    That's so strage, the author removed the download link without any further explanation... Peraphs it doesn't works as expected?

    Anyway, I would be grateful if someone give me some download link, as I want to check how this protection works. (An additional layer of protection for my RGSS300 project would be awesome.)
     
    #25
  6. Kread-EX

    Kread-EX You're all bakas Veteran

    Messages:
    863
    Likes Received:
    81
    First Language:
    French
    Last edited by a moderator: Jan 15, 2013
    #26
  7. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,067
    Location:
    Toronto
    First Language:
    English
    Well, there's a notice now that says it's been cracked lol
     
    #27
  8. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    yea i seem to have "captured" a virus while on the site yesterday... dunno if thats related or not...

    Also if its now cracked theres not much poiint in using it :p
     
    #28
  9. Kread-EX

    Kread-EX You're all bakas Veteran

    Messages:
    863
    Likes Received:
    81
    First Language:
    French
    >_<

    I hope it isn't my fault.
     
    Last edited by a moderator: Jan 15, 2013
    #29
  10. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
     lmao i was acctually thinking it may be because of the fact that some people (from this thread) where "testing" how unhackable it was.

    and considering you hacked it without dissassebling the dll i assume it would be ^_^ still, i wouldnt feel bad if i was you . if it was my antihack that had been hacked i would be asking you how you done it :p
     
    #30
  11. AzTech2064

    AzTech2064 Monster Post Veteran

    Messages:
    47
    Likes Received:
    1
    Location:
    Germany
    First Language:
    German
    well as long as there was no damage done, that counts under, what i would call "unharmfull hacking" simply testing out the limits of a system or programm^^
     
    #31
  12. Rafael_Sol_Maker

    Rafael_Sol_Maker Almighty God Jabu Veteran

    Messages:
    122
    Likes Received:
    36
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Thanks, Kread-EX. =D

    Well, if the method was already hacked, there's only the need to reforce the protection, nothing new in termos of security in the digital world.

    Counting on that most of the 'decrypter-guys' fall under the category of noobs with no knowledge about hacking that only uses *that tool* that only decrypt games with default protection methods...

    So, no problem here, this protection still works in most cases. Hardly a 'pro-hacker' have interests in copying scripts and resources from a RPG Maker game.

    And, after all, nothing is 100% secure when the subject is computers. I hope the protection come back with more strenght in the future.
     
    #32
  13. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    Still unsure what *that tool* is... :(
     
    #33
  14. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,067
    Location:
    Toronto
    First Language:
    English
    "That algorithm" had been released on a chinese blog a couple months after Ace came out, and whenever someone asked whether they can get "that tool" for unpacking Ace archive I would just direct them to the algo, but of course no one bothered implementing it themselves and just waited for someone to release a tool so that they can download and use.
     
    Last edited by a moderator: Jan 16, 2013
    #34
  15. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    lol. Dont get me wrong i have absolutely 0 interest in hacking another persons game, im being 100%selfish and thinking about my own project. i mean from the sounds of it, not only could people access my scripts / graphics. they could even then go and start making a game from it, imean it would be quite pointless the state my project is in right now, but im thinking of future releases. i mean, is there even a point in encrypting it ?
     
    #35
  16. Kread-EX

    Kread-EX You're all bakas Veteran

    Messages:
    863
    Likes Received:
    81
    First Language:
    French
    It looks cleaner. And if you go commercial, this might be mandatory depending of your asset's terms of use.
    Not just a tool, but a tool with a GUI. Command line is out of the question.
     
    #36
    Tsukihime likes this.
  17. GaryCXJk

    GaryCXJk Veteran Veteran

    Messages:
    88
    Likes Received:
    46
    Location:
    Zaandam, the Netherlands
    First Language:
    Dutch
    Okay, assuming OP is talking about memory hacking, which is what Cheat Engine does, there is a solution, although not very simple.

    Basically, Cheat Engine relies on data being on set places in memory. In most games, stuff like the amount of money or the character's stats have a static pointer, a static location on which the data is stored. I'll make it simple here, as I'm pretty tired and can't think straight.

    Objects in most OOP languages (Ruby is kind of OOP, where OOP stands for Object Oriented Programming) we work with pointers. Pointers point to a certain location in memory. These pointers point to a certain object, like an instance of Game_Player, or actual variables, like the amount of money one has. Now, because of this we can reference the same object from different locations.

    So, let's say we have this object:

    class Test def initialize @value = 0 end attr_accessor :valueendNow, when we create a Test object and store it in one variable, and then assign that object to another variable, see what happens:

    a = Test.newb = ap a, b# => 0# 0b.value = 1p a, b# => 1# 1So, as you can see, whenever I change the value of b, it also changes the value of a. This is because both a and b point at the same object. Some objects, however, like FixedNums, create copies when assigning, either pointing at a new object, or writing at the same pointer if the variable already exists.

    We can, however, exploit the above by creating a data holder class. What does this accomplish?

    Say we create a new object for the money. Now how this data is accessed in-game is up to you, I'm just going through it in the most basic way.

    class MoneyStorage def initialize(money = 0) @money = money end attr_accessor :moneyendNow, whenever the money amount changes, you don't just immediately add to the money value. Instead, create a new MoneyStorage object:

    current_cash = MoneyStorage.new(10)new_cash = MoneyStorage.new(current_cash.money + 10)current_cash = new_cashNow, the biggest disadvantage is the memory leaks, but with some good disposing it might be manageable. This way, things like cash and other stuff won't have a static place in memory, effectively making memory hacking applications useless and your game more prone to memory leaks.
     
    #37
  18. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    see, that is more along the lines of what i was originally thinking of, basically writing the methods in such a way that they had a slight ability to stop the most basic applications (such as cheat engine) from working the ay that they do. and achieving this by making some kind of checker for each value, to store both the shown value and the real value for each object and to check if the value is "the real value" and if not, changing it.

    i will have a fwe attempts at protecting some of the default engine things, like gold and stats and will report back what i find :)
     
    #38
  19. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,067
    Location:
    Toronto
    First Language:
    English
    In that case you could do what Tim suggested: write (or just get a copy of) a hash function. The hash function doesn't have to be strong or anything; at this point it probably doesn't even matter if they can find a collision. I mean I guess if someone REALLY wanted to edit it they'll work hard to get around your hash checker, but really lol


    Then, whenever something like gain_gold is called, you would hash the new gold value and store it somewhere. Whenever you retrieve the value of gold, you would hash it and check if it matches.


    I've never liked having to deal with checksums and if I ever see one I just forget about trying to mod a game and move on to something else that doesn't have a checksum.
     
    #39
  20. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    so...

    i was trying to change simple values in a default empty project last night, things like mhp and gold ( using cheat engine )

    and it just wasnt working...

    it would find the first values perfectly, and when i re-scanned for the next value it found nothing... every single time...

    I even went online and double checked that i was using cheat engine correctly.. which i was...

    This leads me to believe that rpg ace has some kind of default built in memory protection ?

    Or that i fail so badly that i cant even hack a game using cheat engine... ( i did hack some nds rom games which checking that worked fine )

    I did not export the project , so it was still running in "editor mode" e.g unencrypted. which may have had something to do with it, or maybe like i said above, there is some protection already implemented ... at least for some things...

    so yea, i didnt even get to the point of putting in the checksums, because i seen no point if i couldnt even hack the default engine ... lol
     
    #40

Share This Page