Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Anti-Cheat Toolkit: stop cheaters easily!

Discussion in 'Assets and Asset Store' started by codestage, Aug 20, 2013.

  1. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    I see, just let me know if it will appear again and I'll be glad to help as much as I can.

    To see where the detection came from, just look at the stack trace of your Debug.Log() message, you'll be able to see where it was called from:

     
    elmar1028 likes this.
  2. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,318
    Much appreciated! I was able to detect the problem. Issue is coming from ObscuredInt.cs script, which I believe is used to encrypt int variables. After putting Debug.Loging it I found that issue was coming from my own script (where I used ObscuredInt).

    Basically my script is a part of prefab, which was then cloned and values were different for different prefabs. I believe this might be a bug your plugin is struggling with, something to do with prefabs.

    Wrong hack detection was fixed only by breaking prefab instance.

    Thank you for your support!
     
  3. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    Glad it sorted out!

    Thanks for your detailed report on your actions, it may help to improve this to avoid such issues in future.
    I've added it to my TODO, will see what can I do here.
     
  4. lilboylost

    lilboylost

    Joined:
    Feb 12, 2014
    Posts:
    266
    Does it support Time-hack? Like I give free gold every 24 hours to offline user. Offline user can easily change mobile date/time to keep gathering free gold and then turn back wifi on. How do I prevent(reduce) this in offline mode?
     
  5. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    Hey, @lilboylost !

    Unfortunately, there is no chance to totally prevent this in offline mode (even low-level timers can be altered on rooted device).

    However, I'm going to add detection of such cheating in future versions, it's on my roadmap.
     
  6. pea

    pea

    Joined:
    Oct 29, 2013
    Posts:
    98
    This may have been answered before, but I couldn't find it.

    In terms of using obscured types, in the following scenario, would it be wise to also obscure the function parameters, or is that not something that can be accessed using memory hacks?

    Code (CSharp):
    1. private ObscuredUShort difficulty;
    2.  
    3. public void setDifficulty(ushort level)
    4. {
    5.     this.difficulty = level;
    6. }
    To clarify, that would then become this:

    Code (CSharp):
    1. private ObscuredUShort difficulty;
    2.  
    3. public void setDifficulty(ObscuredUShort level)
    4. {
    5.     this.difficulty = level;
    6. }
     
  7. pea

    pea

    Joined:
    Oct 29, 2013
    Posts:
    98
    Another question. Just configuring the WallHackDetector and it always detects a wallhack, even with the example scene. As in, I load the example scene, wait a few seconds and it detects a wall hack.

    Am I doing it wrong? I have adjusted my Time and Physics settings. Maybe my collision layers? I've checked "Default" to collide with "Default", but that doesn't seem to resolve it.

    Editor Screenshot 1.png
     
  8. pea

    pea

    Joined:
    Oct 29, 2013
    Posts:
    98
    Ah, got it :) "Ignore Raycast" needs to collide with itself in the Physics settings.
     
  9. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    Hey, @pea !

    Thanks for your purchase and your questions.

    It's totally safe to use regular types in the arguments, though it's performance-wise to use obscured types in the arguments if you're passing obscured type to the function to avoid additional decryption and encryption cycles.

    In your case, if this.difficulty is a regular ushort, there is absolutely no difference since you'll have only 1 decryption cycle in any case.

    Yeah, WallHackDetector places all service objects it uses under the hood to the Ignore Raycast layer to help you avoid unnecessary collisions with your game objects. And it checks for the collisions between own service objects, so yeah, Ignore Raycast layer should be able to collide with itself to let WallHackDetector work properly (it's a default setting though).

    I'll add this information to the readme's troubleshooting section, thanks for pointing me to the possible issue.
     
  10. pea

    pea

    Joined:
    Oct 29, 2013
    Posts:
    98
  11. grofie

    grofie

    Joined:
    Dec 9, 2013
    Posts:
    16
    Hi Dmitriy,

    we got more problems with your plugin:

    The previous problem I posted still occurs (sorry, to lazy to find it again for quoting), but it seams to be totally random. Sometimes it's all okay, sometimes we even get it in on a standalone build. Then, after a second build it worked fine again. To avoid this, I keep sorting 'by hand' like I mentioned before.

    Another problem is the following: From one day to the other ObscuredTypeCheating always triggers on

    Code (CSharp):
    1. Array.Sort(m_TilesOrdered, (x, y) => (((Tile)x).Order - ((Tile)y).Order) );
    where Order is an ObscuredInt, used as a property and associated variable.

    Here is the stack trace:
    ByteRockers.AntiCheatDetector:OnObscuredTypeCheatingDetected() (at Assets/Byterockers/Scripts/AntiCheatDetector.cs:114)
    CodeStage.AntiCheat.Detectors.ObscuredCheatingDetector:OnCheatingDetected() (at Assets/CodeStage/AntiCheatToolkit/Scripts/Detectors/ObscuredCheatingDetector.cs:169)
    CodeStage.AntiCheat.ObscuredTypes.ObscuredInt:InternalDecrypt() (at Assets/CodeStage/AntiCheatToolkit/Scripts/ObscuredTypes/ObscuredInt.cs:152)
    CodeStage.AntiCheat.ObscuredTypes.ObscuredInt:eek:p_Implicit(ObscuredInt) (at Assets/CodeStage/AntiCheatToolkit/Scripts/ObscuredTypes/ObscuredInt.cs:172)
    ByteRockers.AbstractTile:get_Order() (at Assets/Byterockers/Scripts/MapEditor/AbstractTile.cs:58)
    ByteRockers.Category:<UpdateOrder>m__0(Tile, Tile) (at Assets/Byterockers/Scripts/MapEditor/Category.cs:53)
    System.Array:Sort(Tile[], Comparison`1)
    ByteRockers.Category:UpdateOrder() (at Assets/Byterockers/Scripts/MapEditor/Category.cs:53)

    This code did not change for while and was running without any problems for weeks, no idea what the reason for this could be and why it makes problems now.
    But of course, I hope you can find it out.. ;)

    Any progress with an own forum for the plugin? It really gets messy here, hard to find anything. :rolleyes:
     
  12. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    Hey, @grofie !

    Regarding first issue with Contains() - did you tried to use any of solutions I've suggested in the post #444?

    Regarding new issue - I'm sorry to hear that, it's a pretty strange issue and no one reported such issues before. Could you please send me unitypackage with repro case for deep examination?
    I'm not sure I can see the whole picture from your code snippet.

    Separate forum is a nice idea, but I don't have enough time for this now, I'm finishing ACTk update and wish to release it as soon as possible in first place.
    Along with setting all thing up, I'll need additional time to manage that forum, moderate it, etc. I'm afraid I just can't afford it now.

    And once again, thanks for all your feedback, I very appreciate you find some time to leave your reports and let me know about issues you're having.
     
  13. grofie

    grofie

    Joined:
    Dec 9, 2013
    Posts:
    16
    Yep, tried what you suggested, but the problem must be somewhere else. The list also gets initialized and filled long time after the ACT is setup.

    I am sorry but I cannot send you a package, I cannot let our project out without getting into trouble with my boss...

    But I managed to narrow down the problem: The Tile class containing the ObscuredInt is serialized, saved and loaded in an ScriptableObject inside a Resource folder. When I make a deep copy of this Tile before putting it in the list and sorting it, I don't get marked as cheater!

    But the encryption keys did not change, I still can use the Tiles normal except the cheat detection.

    Let me check something..

    Okay, I got it "fixed" now by running the following code (once) by an editor script:

    Code (CSharp):
    1. if (GUI.Button (new Rect(550, 40, 50, 20), "FIX"))
    2. {
    3.     foreach (Tile l_Tile in MapEditorConfiguration.Instance.Tiles)
    4.     {
    5.         l_Tile.Order = (int)l_Tile.Order;
    6.     }
    7. }
    MapEditorConfiguration is the serialized ScriptableObject I was talking about. Looks like after resetting the ObscuredInt it all works fine again, just wondering for how long.
     
  14. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    * Sigh * Thanks for letting me know this. If you'll have any additional information on this issue in future - feel free to write me. For now I wasn't able to reproduce it and figure out source of the problem. I'll keep trying though, have few more ideas to check.

    No worries, I'll try to reproduce it using new portion of the information you provided.

    Thanks for your efforts, I'm going to reproduce second issue and I'll let you know results of the investigation.
     
  15. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    Hey @grofie ,
    I did tried to reproduce the detector false positive without luck.
    I've created ScriptableObject with public variable of the serializable class with ObscuredInt as a nested public variable.
    Then I tried to change value of the ObscuredInt variable and log it at runtime after detection start - and everything works as expected so far.

    Is it possible you might deep copy not all fields of the obscured variable?
    Any additional information would help here.
     
  16. Kettlewell

    Kettlewell

    Joined:
    Jun 24, 2015
    Posts:
    19
    I'm getting this error repeated until it has been truncated after replacing all my PlayerPrefs to
    ObscuredPrefs.

    Code (csharp):
    1.  
    2. StackOverflowException: The requested operation caused a stack overflow.
    3. CodeStage.AntiCheat.ObscuredTypes.ObscuredPrefs.HasKey (System.String key) (at Assets/CodeStage/AntiCheatToolkit/Scripts/ObscuredTypes/ObscuredPrefs.cs:1306)
    4.  
     
  17. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    Hey, @Kettlewell !

    It looks really weird since this is how ObscuredPrefs.HasKey() looks like:
    Code (CSharp):
    1. public static bool HasKey(string key)
    2. {
    3.     return PlayerPrefs.HasKey(key) || PlayerPrefs.HasKey(EncryptKey(key));
    4. }
    There is no any ObscuredPrefs.HasKey() calls inside, only PlayerPrefs.HasKey() get called.
    Are you sure you had no other compilation errors or issues with namespaces?
    I'd be glad to take a look at the broken version of your project which outputs such error, if you able to send it to me.
     
  18. guzzo

    guzzo

    Joined:
    Feb 20, 2014
    Posts:
    79
    I am getting one weird false positive on ObscureType variable cheating after upgrading to Unity 5.2. It happens kinda randomly, after instantiating my GameObject. Any suggestion?
     
  19. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    Hey, @guzzo !
    Are you able to reproduce it with some periodicity or it's totally uncaughtable?
    And could you please share a bit more info on your case?
    Would be nice to know what fields do you have on your GameObject you're instantiating.
    Does it have any obscured vars as a public fields exposed to the inspector?
    Did you change those fields from inspector?
    Do you instantiate GameObject from a prefab?

    Thanks in advance. Feel free to contact me via skype for a faster chat conversation.
     
  20. guzzo

    guzzo

    Joined:
    Feb 20, 2014
    Posts:
    79
    Sure, sorry about that.

    Are you able to reproduce it with some periodicity or it's totally uncaughtable?
    I can't. It happens after instantiating a gameobject from a prefab, but most of the time works as expected (although it happens frequently enough to be a big issue for my game).

    And could you please share a bit more info on your case?
    This is the error log i get in the editor:

    AntiCheatScript:OnObscuredTypeCheatingDetected() (at Assets/Scripts/AntiCheatScript.cs:31)
    CodeStage.AntiCheat.Detectors.ObscuredCheatingDetector:OnCheatingDetected() (at Assets/CodeStage/AntiCheatToolkit/Scripts/Detectors/ObscuredCheatingDetector.cs:170)
    CodeStage.AntiCheat.ObscuredTypes.ObscuredInt:InternalDecrypt() (at Assets/CodeStage/AntiCheatToolkit/Scripts/ObscuredTypes/ObscuredInt.cs:154)
    CodeStage.AntiCheat.ObscuredTypes.ObscuredInt:eek:p_Implicit(ObscuredInt) (at Assets/CodeStage/AntiCheatToolkit/Scripts/ObscuredTypes/ObscuredInt.cs:174)
    HealthAndManaScript:UpdateMana() (at Assets/Scripts/GameLogic/HealthAndManaScript.cs:95)
    HealthAndManaScript:Update() (at Assets/Scripts/GameLogic/HealthAndManaScript.cs:37)

    And this is the line which is causing trouble: (there is another similar line for health before this one, that sometimes trigger the false positive too)

    Code (csharp):
    1. manaToAdd = (int)(deltaTime_Mana / (int)creatureInfo.manaRegenerationTime);
    where,
    manaToAdd is an int,
    deltaTime_Mana is a double,
    creatureInfo is another script,
    creatureInfo.ManaRegenerationTime is an ObscureInt

    Would be nice to know what fields do you have on your GameObject you're instantiating.
    I have many ObscureInt and ObscureFloat variables. Like 20 total. The issue only occurs after instantiating it (if it is instantiated correctly those lines keep executing without making any trouble), and from the line mentioned before which is in the same GameObject but in a different script. Before Unity 5.2 it didn't happen.

    Does it have any obscured vars as a public fields exposed to the inspector?
    Yes, most of them are public.

    Did you change those fields from inspector?
    Yes, I set their initial value from the inspector.

    Do you instantiate GameObject from a prefab?
    Yes

    Thanks!
     
  21. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    Thanks for your detailed answers, @guzzo !

    I'll try to reproduce this issue in the Unity 5.2 and will let you know the results.
    I'll ask you in advance - will it be possible to get your project or its repro part(s) for investigation in case I'll not be able to reproduce it myself?
     
  22. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    I did tried to reproduce the issue without luck. I made one prefab with 2 scripts attached. First with lots of obscured vars, second with Update() callback trying to make simple calculations using public obscured vars from the first script.
    And I made third script and attached it to the camera. It just starts obscured cheating detector and instantiates prefab with 2 scripts described above.

    I tried to change obscured values at the prefab inspector and re-run scene again and again, without any issues. I used Unity 5.2.0f3.

    Maybe I'm missing something in my setup?
    It would be much more productive to see your setup as is and try to reproduce issue using your project if it's possible (your project will be removed after investigation).
     
  23. guzzo

    guzzo

    Joined:
    Feb 20, 2014
    Posts:
    79
    It seems like it doesn't happen anymore, sorry. Trying to figure out what was happening, I realized that just 1 of the prefabs triggered the false positive, which is weird because the other ones are the same with different values.
    After changing 1 value to the prefab, the issue disappeared.

    In conclusion, I think there is nothing wrong with the plugin. Maybe the upgrade process messed my prefab up, i don't know.
     
  24. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    Hey, @guzzo !
    Thanks for letting me know this issue has gone, I hope it was some kind of Unity-side glitch as well.
    Anyway, it would be good to know if it will appear again.
     
  25. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    Hey guys!

    Now, when Asset Store has own public roadmap, you may see they are going to implement the separate forums for plugins, thus I'll wait for this feature and more likely will not create separate forum for ACTk myself.

    Until then just post your bug reports, feature requests and questions here.
     
  26. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    Hey guys!
    I'm glad to let you know update was just submitted for review!
    I'll make a post here as soon as it appear in the store with more details on this update.
     
    pea likes this.
  27. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    Yey, ACTk 1.5.0.0 finally available!

    Here is a quick overview of the most important changes:

    Overall detectors update
    Now you have more flexible and comfortable way to use detectors via Editor, so you can start them completely without code (the only code you need to write is actual reaction to the cheating).
    Just add detector to the scene, make sure you have Auto Run flag enabled (enabled by default) and set the detection UnityEvent.
    You even may end up not writing any cheating detection reaction if you need to do something very simple on detection, like disable some component in the scene or execute some existing method - just set it in the UnityEvent and you're done!
    Pure code approach still there of course.

    WallHackDetector update
    More robust and powerful WallHackDetector. Among other improvements for this detector, now you can detect 3 common types of wallhacking: walking through the walls (already was implemented in previous version, improved a bit in the update), shooting through the walls (new) and looking through the walls (new).

    I should say WallHackDetector is most advanced detector I ever made, especially the Wireframe module (detects looking through the walls), and it's possible you'll face false positives under some special conditions I've not covered in my tests. So please make sure you've tested your build on the target platform with enabled detector and have no any issues or false positives before releasing it to the public.

    Also make sure you really need wallhack detection (people use such cheats mostly on the PC / WebPlayer platforms) before using this detector since it uses physics, shaders and other heavy stuff under the hood which will consume some resources.

    Obscured types improvements
    Now you may hide your obscured types even from the unknown value search using the new RandomizeCryptoKey() API (see details in readme and API docs).
    Obscured vectors and double can now be exposed to the inspector.
    There are many fixes and improvements across different obscured types as well (see the full changelog below).

    ---

    This update also brings lots of other improvements and additions including better looking test scene, better conditionals handling, third-party integration packages improvements and many more.

    - Project updated to the Unity 4.6
    - TestScene changed to better represent ACTk features
    - Changes for all detectors:
    * new Detection Event exposed to the inspector
    * new Auto Start option (see readme for details)
    * improvements in placement algorithm
    * fixed incorrect behavior in rare cases after disabling and re-enabling
    * fixed incorrect behavior on scenes switch in some cases
    * inspector appearance improvements and fixes​
    - WallHackDetector changes:
    * new "Raycast" option to detect shooting through the walls
    * new "Wireframe" option to detect looking through the walls
    * new option maxFalsePositives allows to set allowed detections in a row
    * now you can separately control Rigidbody and Character Controller modules
    * now you can enable and disable all detection modules at any time
    * fixes and improvements
    * ACTK_WALLHACK_DEBUG conditional introduced, see readme for details​
    - InjectionDetector changes:
    * default whitelist updated (up to Unity 5.3 Beta 2)
    * workaround for the IL2CPP bug (Issue ID 711312)
    * debug conditionals renamed and their defines removed, use Player Settings
    * iOS support removed since this target doesn't allow to inject Assemblies​
    - Obscured vars changes:
    * RandomizeCryptoKey() API introduced to hide from 'unknown value' search
    * vars with same value are treated as equal now even if crypto keys differ
    * fixed bold texts in the inspectors of the prefabs with obscured vars​
    - ObscuredPrefs changes:
    * API change: DeviceID -> DeviceId
    * fixed incorrect Color storage in the unobscuredMode
    * fixed DeleteKey removed PlayerPrefs value with enabled preservePlayerPrefs​
    - ObscuredVector2 now can be exposed to the inspector
    - ObscuredVector3 now can be exposed to the inspector
    - ObscuredDouble now can be exposed to the inspector in Unity 5 and higher
    - ObscuredInt and ObscuredUInt are now able to explicitly cast to each other
    - ObscuredVector2 now able to implicitly cast to the Vector3
    - ACTK_EXCLUDE_OBFUSCATION conditional introduced, see readme for details
    - PREVENT_READ_PHONE_STATE is ACTK_PREVENT_READ_PHONE_STATE now
    - BehaviorDesigner integration package changes:
    * RandomizeCryptoKey API for all SharedObscured types
    * WallHackDetector added to the example scene
    * fixed absent crypto key in the ObscuredPrefs example scene
    * fixes in comment docs
    * other minor fixes​
    - PlayMaker integration package changes:
    * added keepAlive and autoDispose options to detector actions
    * fixes in comment docs​
    - all detectors are now more correctly placed in the Component menu
    - you'll not see example scripts in the Component menu anymore
    - fixed possible cs0241 error in xxHash.cs file
    - fixed API compatibility issues
    - removed obsolete editor code
    - all editor code has proper Namespaces now
    - all examples code has proper Namespaces now
    - numerous optimizations and refactorings
    - additions and fixes in readme
    - additions and fixes in docs

    Have a great weekend!
     
    pea and hopeful like this.
  28. grofie

    grofie

    Joined:
    Dec 9, 2013
    Posts:
    16
    Hi Dmitriy,

    after the last update ObscuredLong's does not show up in the inspector anymore. The label is still there but the value field is missing.

    Keep up the great work,
    Cheers
     
  29. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    Hey, @grofie!

    Oh, but ACTk does not have property drawer for the ObscuredLong and never had it before.
    Are you sure you saw it working in previous version?
     
  30. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    Nevermind, @grofie
    I just rent for review this tiny update:

    1.5.0.1
    - ObscuredLong can now be exposed to the inspector
    - fixed wrong inspector height of the ObscuredVector2/Vector3 in not wide mode

    So you'll have ObscuredLong in the inspector soon! =)
     
  31. grofie

    grofie

    Joined:
    Dec 9, 2013
    Posts:
    16
    Hi Dmitriy,

    to be honest, no idea if it was there in previous versions, I just realized it shortly after the update. Thought it must me a basic feature though.

    But after the last update we have some real issues too:

    The "[ACTk] WallHack Detector (final) detection!" always triggers now. We made the update to the latest version last week, but since then the warnings are popping off in every scene. Even our loading scene (UI only) triggers this!

    What changed since then?
    Is there something new we have to take care?

    Kind regards
     
  32. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    Hey, @grofie

    WallHackDetector has new modules to detect new kinds of wallhacks.
    Looks like one of them gives you false positives :(
    More likely it's a Wireframe module since it's more complicated and has a potential for the false positives.
    If you're in rush, just disable new Wireframe module through the inspector or code:

    Code (CSharp):
    1. // disable modules after calling WallHackDetector.StartDetection
    2. WallHackDetector.Instance.CheckWireframe = false;
    It would help a lot if you share your Unity version and repro case to let me look what's wrong there.

    Thanks for your report anyway!
     
  33. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    Tiny ACTk update to the 1.5.0.1 is live now at the Asset Store:

    1.5.0.1
    - ObscuredLong can now be exposed to the inspector
    - fixed wrong inspector height of the ObscuredVector2/Vector3 in not wide mode

    P.S. issue with @grofie sorted out - it was incorrect physics layers configuration (Ignore Raycast should collide with itself in order to let WallHackDetector work properly).
     
    Last edited: Oct 27, 2015
  34. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    One more update is available at Asset Store.
    It has important fix for the possible WallHackdetector false positive when used in scenes with fog.

    1.5.0.3
    - WallHackDetector:
    * fixed false positive when used in scenes with fog (thx Andrey Pakhomov!)
    * minor resources usage optimizations​

    1.5.0.2
    - WallHackDetector:
    * added extra editor check for the proper Physics Layers settings
    * additional debug output​
    - minor refactorings
     
  35. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,043
    Does it work for Windows Store Phone8, Universal 8.1, Universal 10 ? Have you tested it for those platforms?
     
  36. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    Hey, @atmuc !

    It should work fine there, I've tested it on emulators and few customers reported it as working on Win Phone platform.
    Unfortunately can't say more since I don't have Win Phone devices to test it out myself.
     
  37. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,043
    Thanks for answer. if you tested on emulators it means you have no build errors. if you do not have build errors it generally works. my main problems are about build process. i assume you have no build error for both universal 8.1 and universal 10.
     
  38. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    Yes, it builds fine for all Windows Store platforms, including Universal 8.1 and Universal 10.
     
  39. Paradoks

    Paradoks

    Joined:
    Oct 13, 2009
    Posts:
    426
    Hi Dmitriy,

    I bought your plugin and it's great so far, i just have two questions/features requests:

    - Could you add a low level obfuscator ? changing only value type and name + simple fonction name
    ( not IEnumerators )
    - I am making a game using fog of war, i wandered, could it be possible like for wall hack to put an anti-maphack ?

    Thx, keep the good work !
     
  40. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    Hey, @Paradoks !

    Thanks for your purchase and for your questions / FR!

    Customers often ask me about such feature, let me shamelessly construct my answer from several quotes combined together:

    I had thoughts on obfuscator, but it's already not actual for some platforms and looks like it will be not actual in visible feature for other ones too.
    That's because IL2CPP builds do not have IL assemblies, so your code in IL2CPP build is much harder to analyse or edit comparing to the IL bytecode at the Mono assemblies. With IL2CPP it's like RE of the native binaries, which is not easy and requires some advanced skills and knowledge.

    So it's more likely not worth it. I may spend months on adding solid stable obfuscation of the managed assemblies to the ACTk but more and more people just don't need it as they move to the IL2CPP.

    Anyways, I'm waiting for this first:
    https://feedback.unity3d.com/suggestions/access-to-final-assemblies-before-they-put-in-build
    Since there is no way to reliably get the final assemblies right before they put in build without hacking Unity Editor itself which is not easy to maintain.
    Once it will be added, I'll see if it will worth it to add any obfuscation of the managed code.

    However IL2CPP is coming not really fast, so you definitively need to protect your code somehow today.
    Thus I'd recommend to use some third-party tool made specifically for this purpose.
    My personal favorite - Eazfuscator, but you're free to choose any other IL bytecode obfuscator compatible with Mono and Unity.

    It's really hard to say if it's possible at all, since different developers may use different approaches for the fog of war. Someone may use a texture for this, someone may use a shader, etc.
    Thus it's nearly impossible to make a single solution for all possible variations.

    In such cases I usually suggest to try make some custom solution for own needs. You may check out how the WallhackDetection works in the ACTk sources and make something similar for the fog of war to make sure it persists in the game at the needed moment. I'd be glad to help you out with advice(s) if you'll decide to make something of such kind, just drop me email or private message.
     
  41. Paradoks

    Paradoks

    Joined:
    Oct 13, 2009
    Posts:
    426
    thanks for the answer Dmitriy.

    I am building for webGl btw wich as i remember use IL2CPP, i didnt know it was that hard to read.
    So it is pretty much a good news !
    About the fog of war i will take a glance at the wallHack.

    I keep you informed.
     
    codestage likes this.
  42. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    Merry Christmas and happy New Year everyone!

    Since some of you asked for this, I'd like to let you know latest update allows you to work with raw ObscuredPrefs values:

    1.5.0.6
    - SetRawValue and GetRawValue APIs added to the ObscuredPrefs
    - fixed possible issues for the Unity 4.7
     
  43. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,043
    i can confirm that it works on Windows Phone 8, Apple TV, Android, iOS platforms. my game is using your asset and on store now.
     
    codestage likes this.
  44. DarkCooker

    DarkCooker

    Joined:
    Jan 7, 2015
    Posts:
    101

    Hi Dmitriy,

    I am new to use Anti-Cheat ToolKit. I would like to know if I change all important variables such as double, int and float to ObscuredDouble, ObscuredInt, and ObscuredFloat.

    e.g.

    Code (CSharp):
    1.  
    2. ObscuredDouble importantLevel = 0;
    3.  
    4. public void Upgrade() {
    5.        importantLevel ++;
    6. }
    7.  
    8. public ObscuredDouble Attack() {
    9.        ObscuredDouble damage = importantLevel * 3d;
    10.        return damage;
    11. }
    12.  
    Is it enough to protect the memory against hacking?
    Or I need to do more steps to protect the level and damage?

    Thanks very much!
    M40
     
  45. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    Hey, @M40 Dev !

    Yes, this is enough. And you may try to cheat it via CheatEngine to make sure you did it right.
     
  46. ask80me

    ask80me

    Joined:
    Sep 17, 2015
    Posts:
    43
    Hello. Discount PLEASE!!! Thank you for understanding.
     
  47. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    Hey, @ask80me !

    I'd be glad to participate in the sale, but it's not me who fills sales with assets. So I just can't say if ACTk will ever be on sale again and when it will be if it will.
     
  48. DarkCooker

    DarkCooker

    Joined:
    Jan 7, 2015
    Posts:
    101
    Thanks Dmitriy,

    How can I detect the program if it is being hacked to modify the variables and I can show a warning message?

    Thanks
     
  49. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,417
    @M40 Dev you may use the ObscuredCheatingDetector to detect such cheating attempts.
     
  50. DarkCooker

    DarkCooker

    Joined:
    Jan 7, 2015
    Posts:
    101
    Thanks Dmitriy,

    I am using ver 1.4.1.1. (purchased last year :p)
    I see the latest is 1.5.0.6. Am I safe to keep it as 1.4.1.1 because I don't want to break down my code which used a lot of ObscuredTypes... ?
     
unityunity