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 


Testing cheat protection for own unity game

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
BenT9
How do I cheat?
Reputation: 0

Joined: 03 Feb 2015
Posts: 2
Location: Germany

PostPosted: Tue Feb 03, 2015 8:11 pm    Post subject: Testing cheat protection for own unity game Reply with quote

Hey there,

I'm currently working on a game which is allready in pre-alpha. Because everything is client-side it's not really save. I'm working on two solutions for that.
I had an idea today and created a test scene in Unity. I sent it to two friends who tried to change the values via Cheat Engine. But both of them failed.

I hope this is the right subtopic for such stuff. Would be nice if someone of you could test the level and try to change values via Cheat Engine and post the cheat table.

But think at this, if the game crashed without error your account would be banned at the real game.

The test scene includes nickname, level, exp, hp and mp as values. It's complete isolated and has nothing to do with the game client.

Size:
20.1mb

Download:
file-upload.net/download-10250365/CheatTestLevel.zip. html

regards BenT9
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25788
Location: The netherlands

PostPosted: Tue Feb 03, 2015 9:16 pm    Post subject: Reply with quote

if your health is 118 this groupscan will find it:
4:118 f:118.0000

change them both at the same time (experience is a f:value f:value )

the username is more difficult. But just nop out protectedstring.tostring+22 (the jne that checks if the hash matches the hash of the current string) and you can easily edit it

Seriously dude,
Quote:

everything is client-side

I really really really recommend rethinking this if you plan on putting such a game online. It will block the inexperienced users, but eventually someone who has more experience and the means (multiple vpn's with multiple game accounts) and intent to cheat on it will be able to figure everything out, and may even take the time to wrote a script for it and share with other people

And if this is a single player only game, then don't bother. It will only piss of game modders and users and give you a really bad rep.
If it's about the final score that people might submit to a server, then instead of banning them, keep a secondary database table of scores only visible for those that are marked as cheater



tooeasyv2.png
 Description:
 Filesize:  46.71 KB
 Viewed:  8085 Time(s)

tooeasyv2.png



_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8585
Location: 127.0.0.1

PostPosted: Wed Feb 04, 2015 3:29 am    Post subject: Reply with quote

Unity as a whole is very insecure so do not plan on keeping any data that is sensitive handled by the client if this does plan on being a multiplayer game you make. For one, all of your data / code is put into Assembly-CSharp.dll and is by default 100% unprotected.

For example with this demo you posted, your code has:
- ProtectedFloat
- ProtectedInt
- ProtectedManager
- ProtectedString

As your custom protection objects. Because of it being in .NET its entirely viewable code wise. Such as:
Code:
// LoadProperties
public static void loadProperties()
{
   LoadProperties.properties.setNickname(new ProtectedString("TestUser"));
   LoadProperties.properties.setLevel(new ProtectedInt(1));
   LoadProperties.properties.setExp(new ProtectedFloat(100f));
   LoadProperties.properties.setHP(new ProtectedInt(100));
   LoadProperties.properties.setMP(new ProtectedInt(20));
}


All of this can be easily modified via an IL editor, or a rewriter such as Mono.Cecil.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
BenT9
How do I cheat?
Reputation: 0

Joined: 03 Feb 2015
Posts: 2
Location: Germany

PostPosted: Wed Feb 04, 2015 6:55 am    Post subject: Reply with quote

Hey,

thanks for your quick replies. Then I have to find a way to check this at the backend. Cause everyone can host a own game I also can't trust the server.

I just could say that every match is hosted at my server then I could do everything at the server. But that wouldn't be scalable for much hosted games.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8585
Location: 127.0.0.1

PostPosted: Wed Feb 04, 2015 7:44 am    Post subject: Reply with quote

If you want people to host a server themselves it's best to enforce the servers copy of the values rather then let the clients decide what's what. Although you will still have the issue of the host of the server being able to manipulate the data, it stops the widespread hacking on the server from many to one though.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
zm0d
Master Cheater
Reputation: 7

Joined: 06 Nov 2013
Posts: 423

PostPosted: Wed Feb 04, 2015 9:10 am    Post subject: Reply with quote

Doing some double checks might increase the security, too.
So, lets say Player X and Player Y play a strategy game against each other. Both of the palyers start with 10000 gold. Player X is going to build something for 1000 gold and has 9000 left. While Player X raised the building event, he transmitted an event ID to Player Y, who also calculates Player X' new gold value. So 10000-1000 = 9000. Now you WONT compare those values. Player Y checks for the validity of Player X' gold amount (e.g. equals/greater than 0). If so, everything is fine, if not, you know that Player X is cheating and you can take care of this. The thing is you never transmit the actual gold value of any player. You work with IDs. If you encrypt the data transmission, it's even more saver for sniffing attacks. It's overall really save to do so and there wont be a host being able to cheat. Smile)

Vulnerability:
Faking event ID: If you fake the transmitted event id (e.g. always sent the event-id for the lowest cost building) you could hack and probably never come below 0.
To avoid this, randomly sent parts of the event table from Player X to Player Y and compare if the event-ids match with the sent event-ids... Again here, the bad boy could fake those event tables on transmission, but it's getting more and more complicating.

Cat and mouse at it finest. Razz
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