Checking client memory increase with Stats Service

The Stats Service has a function: GetTotalMemoryUsageMb, which I have been trying to use to detect injections from a popular injection tool called Synapse X.

It can be observed that the memory usage shown in the developer console hikes by around 200 MB when synapse is injected, but this doesn’t seem to be properly showing with GetTotalMemoryUsageMb.

For example, when an exploiter injected synapse, a localscript that printed their total Mb usage was printing in the 400s range, however their stream showed 600+ Mb on the developer console
image

Why does this discrepancy occur, and how is the developer console calculating the game MB?
Is there a more accurate way to obtain the proper Mb value?

1 Like

Hello Auruum!

Memory checks are very unstable and I would not rely on them to detect player injections as they can easily be spoofed and will provide many false positives.

Keep your game secure rather than write a hacky, unstable method using memory checks. It will save you so much more time in the end.

3 Likes