Jump to content
Tuts 4 You

Make anticheat for unity engine


Recommended Posts

Hi im trying to code anticheat in c# for unity games 

But i cant detcted dll injection actually i try loaded dll and moudel but itsnt work becuse its mono inejection

Any buddy can help me?

Link to comment
  • 3 weeks later...

Before you potentially dump $50 on CodeStage, look around for free options. 
Most of what's offered in his library is already free. 

Protected memory/variables:
 - https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.protectedmemory
 - https://gamedev.stackexchange.com/a/9851 (Xor'd value, same as how CodeStage protects.)
 - https://www.alanzucconi.com/2015/09/02/a-practical-tutorial-to-hack-and-protect-unity-games/
 - https://github.com/Ymiku/SafeInt
 - https://github.com/pedro15/UniToolKit

Protected player prefs:
 - https://www.alanzucconi.com/2015/09/02/a-practical-tutorial-to-hack-and-protect-unity-games/
 - https://gist.github.com/ftvs/5299600
 - https://github.com/rawandnf/SecurePlayerPrefs
 - Any kind of encryption you prefer works for this.

Generate Code Hashes:
 - Use System.Reflection for this. (MethodBody -> GetILAsByteArray -> hash etc.)

Detect Speed Hack:
 - This is done by monitoring the ticks of an application in a timer/thread checking for any sudden increases that cause the timing of the app/process to be considered fast/slow. 
 - https://github.com/WizardVan/UnityDetector

Detect Wall Hacks:
 - This is done a number of ways depending on what kind of detection you are looking for.

Detect Injections:
 - Walk/monitor the app domains assembly list for unknown modules. (AppDomain.CurrentDomain.GetAssemblies())
 - Track a list of valid/allowed modules + checksum hashes.
 - Track IL edits to functions via hash checks.

Keep in mind all of this is bypassable, editable, etc. by a hack/cheat/mod so while you are adding a layer of security it will only work against certain people whom are not familiar with bypassing this kind of stuff.

  • Like 2
Link to comment
  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...