Knightmare Server-side Anti-Cheat Service [updated 11/30/2024]

To me, this is such an important aspect to anti-cheats. My general philosophy with them is to automate blocking the blatant stuff. Anything more nuanced can be dealt with manually. Also it is really nice to see the updates and responding to potential improvements in detail. Shows you care, so thank you for your work.

3 Likes

I’ve made a minor service update today. :face_with_raised_eyebrow:
If you are using the auto-update code version, then your servers are already protected. :+1: Instructions for setting up your game to auto-update with each version release is located at the first post on top.

If you prefer the manual update method, I’ve updated the download model at the top as well. Hopefully one day Roblox will give us the ability to release “public” packages to make updating easier with patching, but until then I use the hacky method. :rofl:

8/3/2024

  • Added FPS selector to Debug Window. You can control how fast the client is processing
    the debug data from the server. The max speed is 5 FPS and the lowest is 0 FPS that
    will freeze debug data processing.

This only affects the client, not the server. A large amount of debug data can be generated when testing with a lot of players, which might slow some older mobile devices to a crawl. This allows you to slow down the refresh speed to your client and reclaim some device speed, or even turn it off with the 0 setting if the mobile device is struggling even at the lowest setting of 1 FPS.

The new Debug Window will look like this. The text color will copy whatever you have set for the main debug window itself.
Knightmare_AntiCheat_DebugFPS1

Another service update today. :tada:
If you are using the auto-update code version, then your servers are already protected. :+1: Instructions for setting up your game to auto-update with each version release is located at the first post on top.

If you prefer the manual update method, I’ve updated the download model at the top as well.

8/17/2024

  • Added new configuration option for Teleport Anti-cheat to ignore other players during scans for collideable objects. This is useful for games where players are able to move through each other by design.
  • Updated Teleport Anti-cheat detection to perform additional scans from the hands and feet to check for colliedable objects. This helps to cut down on false detection events when players are moving around objects smaller than the player.
1 Like

Service update today. :tada:
If you are using the auto-update code version, then your servers are already protected. :+1: Instructions for setting up your game to auto-update with each version release is located at the first post on top.

If you prefer the manual update method, I’ve updated the download model at the top as well.

9/22/2024

  • Reduced WaitForChild time on the Character Model from 5 Seconds to 1 Second since scans are done 4 times per second, waiting longer is not really necessary.
  • When a Teleport Cheat is detected and the player is sent back to the last location before the event, their linear velocity is sapped to 0. This helps to stop players from getting caught in a mid-air loop where they are falling so fast, they keep triggering the teleport cheat thus never reaching the bottom of a long fall.

Explanation of recent changes:

  1. The first change of reducing the WaitForChild timeout for the Character Model is simply for efficiency reasons. When the player falls into a pit or some other way that destroys the character model, that leaves nothing to scan, so that player can be skipped until a valid Character Model is available for scanning. A sneaky player could technically hang their scanning routine by creating an infinite wait on the character model by leaving the server at just the right moment after their own character model was destroyed in-game and then returning. So the default timeout was used (5 seconds) to combat this type of direct attack on the anti-cheat service. Since scanning is done 4 times per second (not 5 seconds), the extra wait time isn’t really necessary to combat this type of exploit.
  2. The second update that saps the linear velocity of a player during a teleport cheat is to help developers with unique case where a (non-cheating) player is falling for a long distance and the teleport cheat detection will see this high rate of speed as a teleport cheat and attempt to force-teleport them back up in the air. The issue is that the momentum of the player is the same and thus gravity will keep accelerating the player faster and faster.

To the point where they get stuck in teleport cheat loop as per this example video I made below. In this example, I set the max teleport distance super low to trigger it with only a short falling distance, but the same can happen anywhere in a game map where the player can fall so far and so fast as to create a false teleport cheat event.

What has changed is that now upon a teleport cheat event detected, when the player is force teleported back, it also saps any linear velocity. This will allow the player to actually reach the bottom of a fall (or pit) without being stuck forever in the air. It’s not a perfect solution, but it can help developers having issues because of this without having to create some type of workaround.

The most useful being for Large Open Map Obby developers where they want to prevent cheaters from teleporting check point to check point, but don’t want to put up invisible walls or death boxes underneath or through-out the whole map.

Example video using the same Teleport Cheat settings but with the New Update, how the falling player will be treated. At least now, they can reach the bottom without getting stuck forever. :thinking:

1 Like

Service update today. :tada:
If you are using the auto-update code version, then your servers are already protected. :+1: Instructions for setting up your game to auto-update with each version release is located at the first post on top.

If you prefer the manual update method, I’ve updated the download model at the top as well.

10/2/2024

  • Minor Syntax Service update to keep it current with Roblox Code Etiquette.
  • Tracer Lines added to Teleport Debug for better Visual Tuning of anti-cheat service.
  • Added additional “maxShortRangeTeleport” check to better filter false events that trigger when a player moves around a sharp corner really fast.

Explanation of recent changes:

  1. This is a syntax update on using services in Roblox via their recommended code etiquette. It’s just how a developer assigns an object to the service without using shorthand. :thinking:
  2. This update will be very useful for Obby Developers (or anyone else really) as it gives visual tracers in-game when you enable debugging for the Teleport anti-cheat services. The tracers stay for 30 seconds so as not to pollute your world if you are setting off a lot of cheat detection events on purpose. :wink:
  3. This update helps Obby developers where players jumping or running around sharp corners triggers a false teleport cheat detection event. This update takes the current maxShortRangeTeleport and applies an additional check to the collide-able object by checking the distance where the “hit” takes place on that specific object. A player that is right against an object and moves around a sharp enough corner fast enough can create a collision of the raycheck because of the distance the player can cover between scans. The additional check simply looks at where the player was during the last scan, how much distance was between the player and the hit point on the object and if that distance is less than the developer maxShortRangeTeleport setting. This distance should be less than the distance of the two scans already, so logically, if the player was below this threshold, it was more likely because the player “moved” around the object and not directly through it. It’s not a perfect solution, but it helps a lot with false detection events in testing. It also gives more power to the maxShortRangeTeleport setting to help reduce false events.

Here are some example pictures below of the tracer lines:

My character clipped the side of this object and triggered a possible cheat detection. The tracers show where the anti-cheat was finding a collision via the yellow lines, the green line is where it found a path without a collision and considered it a false positive without punishing the player.
Teleport Tracer1

This was a teleport exception, so it colors it green. It still traces out the path to show the developer where the exception was allowed.

This is an active teleport cheat detected with the red line showing the first detection point, the yellow lines are where it tried to peak around the collisions with the head, hands and feet but still found no clear path, so it was considered a valid teleport cheat through a collide-able object.
Teleport Tracer3

Seem pretty promising, will be referencing this later on!

Service update today. :tada:
If you are using the auto-update code version, then your servers are already protected. :+1: Instructions for setting up your game to auto-update with each version release is located at the first post on top.

If you prefer the manual update method, I’ve updated the download model at the top as well.

10/11/2024

  • Clock Drift intergrated into Teleport Cheat Detection for more accurate measurements against the developer set maxShortRangeTeleport and maxLongRangeTeleport when the server speed is being affected by extreme load or external issues with Roblox.

Explanation of recent changes:
When the server is scanning, lag affects the players in different ways. What happens when the server itself is having speed issues? The recent Roblox issues was a good test case for me. :sweat_smile: Server speed fluctuates all the time and Clock Drift is already part of the Speed and Fly anti-cheat calculations because they deal with small distance measurements that can be affected by this.

The benefit is that during service outages, this stabilizes the calculations so that players are not unfairly punished because the server is just running really slow. Teleport cheat detection was left out since it was mainly checking to see if a player was just appearing behind collide-able objects via cheating. The distance checks were mainly for blatant cheating, so errors in those calculations didn’t affect them much if it was off by a 2 or 3 studs.

With the increase of Obby Developers using the anti-cheat (by a lot actually now that I can see download stats again for the anti-cheat service :wink:), these precision errors in distance are becoming more of an issue for them. All the more reason to increase the accuracy of the Teleport Distance checking by integrating Clock Drift. :smile:

Service update today. :tada:
If you are using the auto-update code version, then your servers are already protected. :+1: Instructions for setting up your game to auto-update with each version release is located at the first post on top.

If you prefer the manual update method, I’ve updated the download model at the top as well.

10/22/2024

  • Additional Teleport Cheat detection from hands and feet use original collision distance plus one stud distance to avoid short distance checks below the Roblox precision limit. Anything under the precision limit in Roblox resulted in a failed raycast that could be exploited to bypass Teleport cheat detection.
  • Teleport Cheat detection last valid position cool down added due to precision errors in position data. Roblox precision is limited to the thousandths decimal. With enough time and patience, one could eventually break through Teleport cheat detection because of these rounding errors.

Explanation of recent changes:
Both of these updates come from open discussion elsewhere about how to get around the Knightmare Anti-Cheat service. They probably should have not made it so easy for me to find it. :rofl:

Anyway, I was about to reproduce the issues myself, so getting a fix together only took a few hours of testing. :wink:

Both issues steam from the precision limits in Roblox. When it comes to distances and part sizes, small numbers only make so much sense to a point. For that reason, Roblox limits part sizes to the thousandths decimal of precision. It makes sense from a technical stand point. From a cheaters perspective, this can be exploited in rather “creative” ways. :face_with_raised_eyebrow:

The first issue was short distance raycast. If you decrease the raycast distance small enough, you basically don’t get a raycast. Since these are important for Teleport Cheat detection, what exploiters were doing was getting a character as close as possible to a wall for example and with enough time, one could eventually get the anti-cheat service to make raycast so small, they fail automatically. Especially from the hands or feet for example. This allowed a “gradual” way to get through a wall or other solid object without the Teleport Cheat detection generating an event to check against.

This leads to issue number two, which was after a teleport cheat was detected and the player was forced back, with enough movement persistence, the variable that records the last valid position for the player could be chipped away at until it was moved close enough to said wall to get inside of it. That would allow the exploiting player to then get through the wall without being detected.

Both of these require some very fined tuned exploiting scripts to work in chosen games, they don’t usually work in any game being protected without some tuning first. Both of the changes I’ve made basically eliminate both of these by rounding all the precision up by 1 stud regardless and putting a cool down on last valid position updates when a player is detected as constantly trying to teleport cheat to eliminate the precision drift. :melting_face:

Service update today. :tada:
If you are using the auto-update code version, then your servers are already protected. :+1: Instructions for setting up your game to auto-update with each version release is located at the first post on top.

If you prefer the manual update method, I’ve updated the download model at the top as well.

My latest analytics now show that the Knightmare Anti-Cheat Service is now active on over +10 Million Roblox Servers daily. It fills me with great joy :innocent: that so many developers are now integrating my anti-cheat service into their games and all the crying exploit players that spam my inbox with complaints. :rofl:

11/26/2024

  • Changing Player Detection Ignore settings was not clearing previous data readings.
  • Jump Distance Debug info would remain active when Player was set to be ignored by the Jump anti-cheat service.

Explanation of recent changes:
Both of these are minor updates (code wise), but have useful reasons for the change.

  1. The first change is how ignoring players works. Normally, when you ignore a player for anti-cheat scanning, it usually applied for development or admin reasons. Many developers are finding this useful to create a “time-based” type of ignore in their games instead of just a one-off setting. A developer might want to ignore a single player for “Teleport” cheating for a few seconds and then want to turn it back on because a one-time exception is not enough. The issue before existed that when you “turn off” the cheat detection for that single player, the anti-cheat service still had the original data (location scans) in memory. When you turn it back on, the anti-cheat service would think the player “cheated” based of those old scans since the player has probably moved since then to somewhere else. The new behavior is to clear all “scan data” associated with the player that you disable scanning on. This way, when you turn it back on, it’s treated like a “new” player that just entered your game instead of one that seems to have moved beyond your set cheating limits.
  2. The last change is a minor debugging output issue. The Jump Distance Debug output would remain on for said player after you disabled scanning on that player. This change simply fixes that minor issue.

Service update today. :tada:
If you are using the auto-update code version, then your servers are already protected. :+1: Instructions for setting up your game to auto-update with each version release is located at the first post on top.

If you prefer the manual update method, I’ve updated the download model at the top as well.

11/30/2024

  • Clock Drift timeouts now set for most scanning services. Speed & Jump cheat scanning have a 1000 ms timeout and Teleport cheat scanning has a 300 ms timeout. When these timeouts are exceeded by the server, it resets scanning on the player. This prevents a server overload from creating false positives during cheat detection.
  • Custom Punishment for Teleport Cheat Detection now passes the Object Hit during the scan to this function for further use by the developer.

Explanation of recent changes:
Roblox Servers normally run at 60 FPS, but because they get busy running your game, the speeds can drop a little or a lot. These drops in speed affect the timing of anti-cheat scans and thus the reason that a clock drift variable is used to account for this. Two issues can arise from this, one that is beyond the control of the developer and the other is within their control.

When Roblox itself is having service issues and your game is suffering a massive dip in speed, the clock drift can only help so much. This is why a timeout has been added. When your game server has been slowed down so much that the anti-cheat service can’t even get 1 scan in a timely fashion, it will basically reset and ignore that player until the server speed is able to return to normal.

Otherwise, the long delays in scanning means a player can create false positives due to their client still running at full speed. This is really apparent on Teleport Cheat scanning because a player can run around a corner far away and if the next scan takes to long, it will think the player must have cheated through the wall to get that far way. :astonished:

On the other hand, if Roblox is NOT having server issues and your server is overloaded due to something in your game going out of control and eating all your system speed, the same thing can happen. At least in this example, the developer has a way to fix this. But, this also means this change will protect your game from this accidental run-away resource usage as well. :grinning:

1 Like