Jump to content


Photo

Game Maker Obfuscator - Protect your GM source


  • Please log in to reply
994 replies to this topic

#31 JakeX

JakeX

    GMC Member

  • New Member
  • 548 posts

Posted 01 May 2008 - 10:39 PM

Huh. The other day I was wondering if anyone would make an obfuscation program for Game Maker files - guess this is the answer, mm?
Anyway, for anyone who's not really sure what this does, it takes your gm6 files, looks through them, and renames everything so that none of the resource and variable names make any sense. It's harder to figure out what your code is supposed to do when it uses variable names like Fd3_37Q, yes?

As for what Chronic said about duplicate resource names, I think any Game Maker user who makes those sort of mistakes isn't really in a position to be worried about people wanting to decompile their game anyway.

Edited by JakeX, 01 May 2008 - 10:40 PM.

  • 0

#32 Dmaster270

Dmaster270

    GMC Member

  • New Member
  • 1736 posts

Posted 01 May 2008 - 10:46 PM

Huh. The other day I was wondering if anyone would make an obfuscation program for Game Maker files - guess this is the answer, mm?
Anyway, for anyone who's not really sure what this does, it takes your gm6 files, looks through them, and renames everything so that none of the resource and variable names make any sense. It's harder to figure out what your code is supposed to do when it uses variable names like Fd3_37Q, yes?

@last sentence
Which is exactly why you should use this right before you compile the exe.
  • 0

#33 JakeX

JakeX

    GMC Member

  • New Member
  • 548 posts

Posted 01 May 2008 - 10:50 PM

If the author has any sense of logic, this program won't overwrite the original source file.
  • 0

#34 Schreib

Schreib

    Valen Shadowbreath

  • GMC Member
  • 1455 posts
  • Version:Unknown

Posted 01 May 2008 - 11:06 PM

Of course it will not, as I stated in my first post.

I think I quite throroughly explained what an obfuscator does in paragraph I, however.
  • 0

#35 candc32

candc32

    GMC Member

  • GMC Member
  • 895 posts

Posted 01 May 2008 - 11:26 PM

WOW, that is really neat; you should definitely make a GMK compatible version.
EDIT:
also, if it is possible, you should make it rename the sub folders to further confuse hackers/decompilers.
EDIT2:
if you are using D&D with things like the show message it will Obfuscate them as well.

Edited by candc32, 01 May 2008 - 11:46 PM.

  • 0

#36 Tahnok

Tahnok

    Friendly Madman

  • GMC Member
  • 1821 posts
  • Version:Unknown

Posted 01 May 2008 - 11:29 PM

Thank you! I've been waiting for this. If it worked with GM7 then it would be perfect.

As a note to other users, running a gmk through LGM to get the gm6 will cause this program to error unless you open the gm6 in GM and save it again.

Also, it seems to mess up with case statements that contain a default case (it replaces the "default" keyword).
  • 0

#37 Schreib

Schreib

    Valen Shadowbreath

  • GMC Member
  • 1455 posts
  • Version:Unknown

Posted 01 May 2008 - 11:32 PM

Thank you! I've been waiting for this. If it worked with GM7 then it would be perfect.

As a note to other users, running a gmk through LGM to get the gm6 will cause this program to error unless you open the gm6 in GM and save it again.

Also, it seems to mess up with case statements that contain a default case (it replaces the "default" keyword).

Thank you. These are the kinds of posts I need. I'll have this fixed right away.

also, if it is possible, you should make it rename the sub folders to further confuse hackers/decompilers.

This is not required, because GM discards the resource tree when compiling. That means that when you decompile an exe, all resources will lie in a big clump and will not be organized as before. I had that in plan before I discovered this.
  • 0

#38 Qwertyman

Qwertyman

    C&D Games

  • New Member
  • 1178 posts

Posted 01 May 2008 - 11:36 PM

Thats why this tool won't work if for some reason you need to have your (eg, sprite and object) resources named the same (btw, the tool does warn you about this if it finds dupe resource names).

That's a bad idea in general, so it's probably a good thing the tool warns you.
  • 0

#39 theweirdn8

theweirdn8

    Unrivaled Legend

  • GMC Member
  • 4097 posts
  • Version:GM8.1

Posted 02 May 2008 - 03:11 AM

OMG COME ON PEOPLE REPORT!
  • 0

#40 IsmAvatar

IsmAvatar

    Good Samaritan

  • GMC Member
  • 2411 posts
  • Version:GM8

Posted 02 May 2008 - 03:13 AM

Report why? This is not a bad tool, it's a good tool. It *hinders* hackers - it's a *counter* measure against the decompiler.
  • 0

#41 t3mp3st

t3mp3st

    Damaged's Tool

  • Retired Staff
  • 2026 posts
  • Version:Unknown

Posted 02 May 2008 - 03:23 AM

OMG COME ON PEOPLE REPORT!



Report who? At least one local moderator (myself), and an Administrator (Chronic), already replied to this topic. If anything, staff might get upset about you filing a false report, and calling this project a 'decompiler'. READ.
  • 0

#42 Dmaster270

Dmaster270

    GMC Member

  • New Member
  • 1736 posts

Posted 02 May 2008 - 03:39 AM

OMG COME ON PEOPLE REPORT!



Report who? At least one local moderator (myself), and an Administrator (Chronic), already replied to this topic. If anything, staff might get upset about you filing a false report, and calling this project a 'decompiler'. READ.

He's mistaking that changes a GameMaker file for good, for a GameMaker file for bad. He probably messed up his file, and now is made cause he doesn't have his old one anymore. And he can't tell what each variable is.
  • 0

#43 bearSoft

bearSoft

    GMC Member

  • New Member
  • 1002 posts

Posted 02 May 2008 - 09:11 AM

Exelent job Schreib! This is just what i talked about when the pested decompiler was released. I sugested manual Obfuscation of the files before release (biiig job:), but this is neat. Just important to remember the limitation for inside strings.
A list over gm-functions that need to be avoided is needed.
Alone the posibillity to remove all comments is valuable. ...a feature that really ought to be implicite in the gm-build to exe process.. pfuii yyg.. pfyiii.. +booo
  • 0

#44 Schreib

Schreib

    Valen Shadowbreath

  • GMC Member
  • 1455 posts
  • Version:Unknown

Posted 02 May 2008 - 09:18 AM

Seriously though, this looks like a pretty good program for protecting you're games from being stolen/edited, too bad it doesn't work on GMK. Does this stuff up resources like sprites, etc. and if so, how does the program recognise them?

It does stuff their names up if you choose that option. The program runs through all code and arguments to find anywhere where those names need to be replaced, so it's not a problem. Otherwise there would be no point with renaming them.
  • 0

#45 Zeop

Zeop

    GMC Member

  • New Member
  • 192 posts

Posted 02 May 2008 - 09:26 AM

I just wonder, will this also mess up strings?

Cause it would be quite sad if you made the string"Congrats you beat the game" And it made it into some.. funny text.
  • 0

#46 xDanielx

xDanielx

    GMC Member

  • GMC Member
  • 1002 posts
  • Version:Unknown

Posted 02 May 2008 - 10:14 AM

A list over gm-functions that need to be avoided is needed.
Alone the posibillity to remove all comments is valuable. ...a feature that really ought to be implicite in the gm-build to exe process.. pfuii yyg.. pfyiii.. +booo

Unfortunately the problem doesn't really have a solution. Interpreter-dependent functions -- i.e. variable_global_exists, variable_local_exists, variable_global_get, variable_global_array_get, variable_global_array2_get, variable_local_get, variable_local_array_get, variable_local_array2_get, variable_global_set, variable_global_array_set, variable_global_array2_set, variable_local_set, variable_local_array_set, variable_local_array2_set, execute_string, execute_file, object_event_add, timeline_moment_add, room_set_code -- depend on resource names being known at programming time. Consider this code:

sfx = 'iab' + 'le';
some_val = variable_local_get( 'som' + 'e_' + 'var' + sfx );

There's no plausible way for an obfuscator to avoid breaking code like the above, unless it decides not to obfuscate "some_variable". But if it can't decipher the name of the variable to begin with, it won't know not to obfuscate it.
  • 0

#47 Blijbol

Blijbol

    Happy business

  • GMC Member
  • 313 posts

Posted 02 May 2008 - 11:51 AM

There's no plausible way for an obfuscator to avoid breaking code like the above, unless it decides not to obfuscate "some_variable".

Good idea. Add an input field to the obfuscator in which we can type variable names that we do not want to become obfuscated. Problem solved. :medieval:
  • 0

#48 anonymouss

anonymouss

    Wanna Play?

  • New Member
  • 1018 posts

Posted 02 May 2008 - 11:56 AM

I tested this program on a few simple games, and it sure got me. The source code is rendered nearly impossible to read, by anyone other than the amazingly desperate.

As for everyone saying to convert it for GM7- I suggest going over and actually reading the EULA that you are legally bound to.
  • 0

#49 Blijbol

Blijbol

    Happy business

  • GMC Member
  • 313 posts

Posted 02 May 2008 - 12:00 PM

By the way, I'm unable to run this thing. I get the following error:

Java Virtual Machine Launcher
Could not find the main class. Program will exit.


Any suggestions?
  • 0

#50 Lukearentz

Lukearentz

    My Two Cents

  • New Member
  • 2587 posts

Posted 02 May 2008 - 12:19 PM

This is a good idea, I have thought also about manually changing things which is a large job.
I did consider just using long weird names ect from the start, yet that makes it harder for the programmer.
9.99/10... :medieval: Cause nothing is perfect

Good Work.
  • 0

#51 laigonaz

laigonaz

    GMC Member

  • New Member
  • 525 posts

Posted 02 May 2008 - 12:22 PM

Instead of reporting, we should pin this or do something so it won't get forgotten
  • 0

#52 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 02 May 2008 - 12:24 PM

You plan .gmk support, right?

This is a useful tool.
  • 0

#53 Somelauw

Somelauw

    GMC Member

  • GMC Member
  • 1096 posts
  • Version:Unknown

Posted 02 May 2008 - 12:31 PM

You can still use functions like variable_local_set(), but you must be consistent.
if not variable_local_exists("foo")
	 variable_local_set("foo", "bar")

Should work.
  • 0

#54 anonymouss

anonymouss

    Wanna Play?

  • New Member
  • 1018 posts

Posted 02 May 2008 - 12:44 PM

You plan .gmk support, right?

This is a useful tool.

That would be illegal, if I am correct. Read the EULA.
  • 0

#55 Somelauw

Somelauw

    GMC Member

  • GMC Member
  • 1096 posts
  • Version:Unknown

Posted 02 May 2008 - 12:58 PM

You plan .gmk support, right?

This is a useful tool.

That would be illegal, if I am correct. Read the EULA.

No. The source is your property, so you can do with it whatever you want. The EULA only states that decompiling created games is illegal.

3.3. Neither you nor any third party may modify, adapt, decompile or reverse engineer the Games.

# the Games and all materials accompanying the Games shall include a notice and End User Licence Terms: (i) identifying the rights of YoYo Games and that they include, are based on and made using the Software; (ii) that such end user will have no right to modify, adapt, decompile or reverse engineer the Games or make any use of the Software contained therein nor to permit anyone else to do so; and (iii) that such end user must not remove, disable, modify, add to or tamper with any program code or data, copyright, trademark or other proprietary notices and legends contained within the object (compiled) code of the Software;
# you will not distribute or make avail


Even if the EULA would have said it's illegal, then it would be in conflict with other dominant laws.
  • 0

#56 Schreib

Schreib

    Valen Shadowbreath

  • GMC Member
  • 1455 posts
  • Version:Unknown

Posted 02 May 2008 - 01:35 PM

I will have to do some rechecks on whether to add GMK support. I will have a talk with IsmAvatar and YoYoGames about it.

The obfuscator ignores all strings now, simply typing them out as they were. This means that indeed, variable_local_exists, execute_string and the like won't work. But you shouldn't use those functions anyway. :medieval: The only bigger problem is when people want to use paul32's excellent mapping scripts.

Anyone interested in suggesting more ideas is welcome to PM me.
  • 0

#57 Erik Leppen

Erik Leppen

    GMC Member

  • GMC Member
  • 2467 posts
  • Version:GM:Studio

Posted 02 May 2008 - 02:10 PM

By the way, I'm unable to run this thing. I get the following error:

Java Virtual Machine Launcher
Could not find the main class. Program will exit.


Any suggestions?

The exact same error happens here too. Could you (Schreib) provide us a .zip file? This sounds quite useful namely.

Edited by Erik Leppen, 02 May 2008 - 02:10 PM.

  • 0

#58 Kyle_Solo

Kyle_Solo

    GMC Member

  • GMC Member
  • 1071 posts
  • Version:Unknown

Posted 02 May 2008 - 02:27 PM

Java Virtual Machine Launcher
Could not find the main class. Program will exit.

I had that error, but after I installed the latest version of Java it went away.
  • 0

#59 laigonaz

laigonaz

    GMC Member

  • New Member
  • 525 posts

Posted 02 May 2008 - 02:28 PM

I think you need the latest version of java
  • 0

#60 Schreib

Schreib

    Valen Shadowbreath

  • GMC Member
  • 1455 posts
  • Version:Unknown

Posted 02 May 2008 - 02:45 PM

GMC'ers have a tendency to pull away from paragrah V. :medieval:
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users