JonathanBerkeley / Quack

Quick Universal Anti-Cheat Kit. A collection of software aimed at demonstrating anti-cheat functionality & providing tools to aid anti-cheat development.
https://docs.quack.ac
MIT License
21 stars 5 forks source link

Automatic anti-cheat shutdown #14

Open dsienicki opened 1 year ago

dsienicki commented 1 year ago

I tried to add anti-cheat to a game on unity engine, the client loads the library but the quack-ac.exe process automatically closes after about a second

JonathanBerkeley commented 1 year ago

Hello, thanks for reporting this. Are you using QuackAntiCheat.cs for integrating into the Unity game, and attaching it to a game object (https://github.com/JonathanBerkeley/Quack/tree/main/Integration)?

If so, is there anything reported in the console in Unity? Is there any more information on the game you are trying to integrate to that might be relevant? Do you have any antivirus running, if so, does it report any detections when trying to use Quack?

Trying with the debug build of Quack client would give more information. Are you using the latest binaries from releases page or building it from source?

Note: Quack AC is a research project, it will offer limited protection against real world threats. Cheat developers could easily circumvent Quack AC, I don't recommend using it to try protect your game if you are releasing it to the public.

dsienicki commented 1 year ago

I added a script to the game that loads the Quack-Internal.dll library but nothing happens when I turn it on. I even tried injecting this dll into the current game process but also 0 response.

I am using Inertia game to apply this anticheat for my own learning. I built the program from source in debug version.

I do not have antivirus running in the background.

JonathanBerkeley commented 1 year ago

I will try to recreate this on my end with a fresh install of the repo and game, and get back to you. In the meantime, if you discover anything else that might be of interest related to this issue, please let me know. Thanks.

dsienicki commented 1 year ago

Hello thanks for your involvement. I would also like to mention that sometimes the game was able to shut down after a few seconds after dll injection without any visible window or process. Did you manage to figure something out?

JonathanBerkeley commented 1 year ago

Do you have Quack server running while doing this? Quack server acts as the control server to send heartbeats to, without a connection to it, quack-ac will exit. In debug mode this should be detailed, though.

If Quack server isn't running or isn't reachable, this is the line causing quack-ac to exit: https://github.com/JonathanBerkeley/Quack/blob/d26364065beedf0b9d8f3e26705db584b017fda4/Quack-client/task_dispatch.cpp#L32 You could verify this simply by building with a long Sleep here and see if the client waits that amount of time before exiting.

I would expect that in debug there would be messages about the failed connection prior to exit.

dsienicki commented 1 year ago

I was able to connect the server to anticheat and it actually sends information to it. But the problem is elsewhere Quack-ac.exe works normally until heartbeat uptime 14 then it shuts down without any error and quack-internal causes the game to close by missing heartbeats.