Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Protecting unreleased content behind a const boolean?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  

Is this a good way to protect your game?
yes
0%
 0%  [ 0 ]
no
0%
 0%  [ 0 ]
hack it and let me know later
0%
 0%  [ 0 ]
Total Votes : 0

Author Message
grease
How do I cheat?
Reputation: 0

Joined: 25 Mar 2023
Posts: 6

PostPosted: Thu May 16, 2024 2:43 pm    Post subject: Protecting unreleased content behind a const boolean? Reply with quote

So I have a game developer friend who was telling me about his game yesterday. He has a free demo you can play, but the rest of the content remains locked until you buy the full version. But what he was telling me was that the only difference between the free demo and the full version is that the demo has a const binary value (DemoMode) that he switches from true to false at compile time. This value is checked by code before loading levels to determine whether it will permit you to enter. I was like "That can't be secure" and I've been thinking about it ever since.

Here are some thoughts I had:

-Brute force change every value of one to zero and try clicking the button for locked content. (Dangerous)

-Reverse engineer Gamemakers level format and just force it to load the unreleased levels without checking the const.

-Find the code that checks the const value and inject something there to bypass it. (Need to find the value first, which is tricky when a value doesn't change)

He told me to go ahead and try to hack it because it's harder than it sounds, and I haven't been able to immediately for like the two hours I've been trying so hey maybe he's right. Does anyone have any thoughts or strategies to tackle this kind of problem?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4706

PostPosted: Thu May 16, 2024 3:10 pm    Post subject: Reply with quote

That depends on the programming language.

Good statically compiled languages can omit code depending on whether or not it's used. This can take into account expressions evaluated at compile time.
e.g. C++:
Code:
void bar();

int main(int, char**) {
    if (false) {
        bar();
    }
    return 0;
}
No code is generated in `foo` that relates to `bar`. The compiler doesn't even complain `bar` isn't defined.

Your "brute force" method is ridiculous. You have no idea how many "1" values there are, there's no guarantee a boolean is even expressed as 0 for false and 1 for true (typically any non-zero value is true), and you don't know the semantics the developer gave the bool ("isDemo" vs "isFullVersion"- maybe you need to change false to true instead)

"Just reverse engineer the game" is far more complicated than you think. It's sort of like saying you'll "just build a rocket to the moon." You need years of knowledge and experience to even understand what that entails.

Changing code would be the easiest thing you could do... assuming that code exists in the first place and wasn't optimized away.
Do you know what programming language / game engine is being used?

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
grease
How do I cheat?
Reputation: 0

Joined: 25 Mar 2023
Posts: 6

PostPosted: Thu May 16, 2024 4:08 pm    Post subject: Reply with quote

Yeah, he made it using GameMaker Studio 2. I hear that one compiles to C++.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4706

PostPosted: Thu May 16, 2024 7:06 pm    Post subject: Reply with quote

There are tools designed for reverse engineering game maker games. Maybe there's something for the version he's using.

In any case, no, this isn't a good way of enforcing a demo version of your game. Hell, the average crackme has better security than that. If you're really interested, start looking up tutorials for those. Maybe consider doing that in a VM if you start downloading random binaries from strange sites.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites