Skip to content
mileseverettPublic

About

Server-side anti-cheat for Counter-Strike 2 community servers, built for Metamod:Source.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

77 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CS2AC

Open-source server-side anti-cheat for Counter-Strike 2.

Build Version Detections Platform License

Counter-Strike is at its best when every shot, clutch, and win is earned.

CS2AC helps community servers keep it that way.

Install · See every detection · Pair it with CS2FOW

See it catch

CS2AC detecting a blatant snap-hit aimbot
AIMBOT
A blatant snap lands on target.
CS2AC detecting inhumanly precise target tracking
AIMLOCK
The crosshair follows a moving target with inhuman precision.
CS2AC detecting impossible anti-aim angles
ANTIAIM
Impossible angles, attack-return, jitter, and spin patterns.
CS2AC detecting automated bunny hopping
BHOP
Repeated frame-perfect hops and machine-like jump patterns.
CS2AC detecting repeated irregular airborne and no-scope results
IRREGULAR BEHAVIOR
Too many rage-level airborne and no-scope results.
CS2AC detecting bullets that disagree with visible aim
SILENTAIM
The bullets hit somewhere the visible aim never pointed.

CS2AC + CS2FOW

CS2FOW operating across Dust II long sightlines

Catch the cheat. Starve the wallhack.

CS2AC catches cheating behavior. CS2FOW stops hidden enemies from being sent to the cheater in the first place.

The Seventeen Detection Modules

Aim and accuracy

Aimbot. The player's aim moves sharply onto an enemy before a damaging shot. CS2AC checks whether this pattern occurs across separate shots.

Aimlock. The player's aim closely follows a moving enemy for an extended period. CS2AC measures how closely the aim follows the target over time, including when the target is behind a wall.

Silentaim. A damaging bullet lands away from the direction shown by the player's aim. CS2AC compares the aim at the moment of the shot with the bullet impact and resulting damage.

Inhuman Accuracy. The player maintains an unusually high hit rate across a longer series of aimed shots. CS2AC tracks those shots and how many of them cause damage.

Irregular Behavior. The player repeatedly lands difficult shots while airborne or without using a sniper scope. CS2AC counts both successful and missed attempts over time.

Movement

Autostrafe. The player repeatedly gains or preserves speed through highly consistent movement while airborne. CS2AC compares the player's movement, speed, and timing across each jump.

Bhop. The player repeatedly jumps again as soon as they touch the ground. CS2AC measures the time between landing and the next jump across consecutive hops.

Hyperscroll. The player sends unusually rapid bursts of jump inputs while landing. CS2AC checks those inputs together with the timing of the resulting jumps.

Nulls. The player switches between opposite movement directions with highly consistent timing while airborne. CS2AC compares the movement keys with the direction changes sent by the player.

Exploits and client behavior

Antiaim. The player's view spins, jitters, returns after an attack, or reaches angles outside normal play. CS2AC checks the view angles and their order across consecutive commands.

DLL Injection. The player's game subscribes to a group of events associated with injected client code. CS2AC checks those event subscriptions after the player joins and again while they remain connected.

Desubticking. The player's movement inputs repeatedly arrive without their normal timing between ticks. CS2AC checks the timing attached to each movement change.

Doubletap. The same weapon fires twice before its normal delay has passed. CS2AC compares the weapon and server tick of each consecutive shot.

Invalid CVar. The player's game reports a protected or monitored setting outside its accepted value. CS2AC requests these settings from the client and checks each reply.

Invalid Input. The player's button state does not match the recorded order of button presses and releases. CS2AC compares both parts of the command sent by the client.

Namechanger. The player changes their visible name repeatedly within a short period. CS2AC counts name changes for each connected player.

Subtick Spam. The player repeatedly sends many movement or aim changes at the same point within a tick. CS2AC checks how often these same-time input bursts occur.

One detection. Everywhere.

When CS2AC acts, it can do all of this at once:

  1. Announce the detection in public chat.
  2. Hold a clear center-screen alert for five seconds.
  3. Write the evidence and punishment result to the server console.
  4. Run your configured ban or kick command.
  5. Send a detailed Discord webhook report.
[CS2AC] detected AIMBOT on Player and punished.
CS2AC test announcement in public chat
CS2AC center-screen test announcement
Five-second center alert
CS2AC center-screen Aimbot detection
Detection sent
CS2AC announcing a detection on a whitelisted player
Whitelist stays visible

Whitelisting does not silence CS2AC. The detection still appears in chat, on screen, in the console, and in Discord; only the punishment command is skipped.

Quickstart

You need a Windows x64 or Linux x64 CS2 dedicated server running Metamod:Source 2.x.

  1. Open this repository's Releases tab and choose the matching Windows or Linux package.
  2. Extract it into the CS2 server root without rearranging anything. The package begins with the game folder.
  3. Edit game/csgo/cfg/cs2ac.cfg.
  4. Start the server.
  5. Run meta list, then cs2ac_status.

That is it. Players install nothing.

The default punishment commands are made for CS2-SimpleAdmin. Using another admin plugin? Replace the two commands in cs2ac.cfg with commands that plugin understands.

Configuration

The included cs2ac.cfg explains every option in plain language.

Setting Default What it does
cs2ac_enabled 1 Master switch for CS2AC.
cs2ac_whitelist empty SteamID64s that may be detected but must never be punished.
cs2ac_*_enabled 1 Enable or disable one detection module.
cs2ac_chat_announcements 1 Show detections in public chat.
cs2ac_center_announcements 1 Show the five-second center alert.
cs2ac_punishment_command css_addban ... Command used for permanent bans.
cs2ac_kick_command css_kick ... Command used for kick-only detections.
cs2ac_webhook_url empty Discord webhook that receives detection reports.
cs2ac_webhook_role_id empty Discord role to mention on a report.
cs2ac_webhook_server_address automatic Server address shown in Discord.
cs2ac_allow_sv_cheats_testing 0 Allow local detector testing with sv_cheats 1. Never enable this on a public server.

Punishment commands support {steamid64}, {userid}, and {detection}:

cs2ac_punishment_command "css_addban {steamid64} 0 CS2AC: {detection}"
cs2ac_kick_command "css_kick #{userid} CS2AC: {detection}"

Whitelist one account or a comma-separated list:

cs2ac_whitelist "76561198000000001,76561198000000002"

Discord in four steps

  1. Create a webhook in the Discord channel that should receive detections.
  2. Put its URL in cs2ac_webhook_url.
  3. Run cs2ac_reload.
  4. Run cs2ac_webhook_test.

Keep the webhook URL private. CS2AC never prints it back to the console.

CS2AC Discord detection report with player, evidence, punishment, map, and server details
Server commands
Command What it does
cs2ac_status Show whether CS2AC and its main features are working.
cs2ac_help List the available CS2AC commands.
cs2ac_reload Reload cs2ac.cfg.
cs2ac_check_config Find mistakes in the current configuration.
cs2ac_test_announcement Preview the chat and center-screen alert without detecting anyone.
cs2ac_webhook_test Send a test detection report to Discord.

FAQ

Do players install anything?

Nope. CS2AC lives entirely on the dedicated server, so players just connect and play as usual.

Does it work in Premier or Valve matchmaking?

No. CS2AC is made for community and dedicated servers you control. It cannot be added to Premier or Valve matchmaking.

Can it catch every cheat?

No. No anti-cheat catches everything. CS2AC can only judge the behavior that reaches the server; it does not read a player's files, memory, or desktop.

Despite the name, DLL Injection does not scan anyone's PC. It only checks suspicious game-event subscriptions that the client shares with the server.

Which detections ban and which only kick?

By default, Desubticking, Nulls, and Subtick Spam only kick. Every other detection uses the permanent-ban command.

Want different punishments? Change or empty either command. The detection announcements will keep working.

What happens to whitelisted players?

They can still trigger a detection, and everyone can still see it, but CS2AC stops before sending any punishment command.

Does it support FFA?

Yes. When mp_teammates_are_enemies is enabled, CS2AC treats other players as enemies just like the game does.

Does CS2AC advertise itself?

Yes, but it does not spam. Every six completed rounds, CS2AC shows this message once in chat and at the center of the screen:

[CS2AC] This server is protected by karola3vax's anti-cheat.

This small project credit is built in and cannot be turned off.

Want wallhack protection too?

CS2AC catches cheating behavior. CS2FOW stops your server from sending live enemy positions through solid walls and smoke.

They solve different problems, run entirely on the server, and can protect the same CS2 community server together.

Building from source

Clone the pinned submodules:

git clone --recursive https://github.com/karola3vax/CS2AC.git
cd CS2AC

Windows needs Python 3.8 or newer and Visual Studio 2022 with the C++ workload:

./build-windows.ps1

Linux needs Python 3.8 or newer and Docker:

./build-linux.sh

Both scripts make a directly installable package under the build folder's package/game directory. Linux builds inside the pinned Steam Runtime 3 SDK image.

Be part of it

Run CS2AC on a real server. Test it. Break it. Send useful reports.

If it earns a place on your server, star the repository and share your clips. That is how an open-source anti-cheat gets harder to bypass.

License

CS2AC is free and open-source software licensed under the GNU Affero General Public License v3.0. Dependencies keep their own licenses; see Third-party notices.

About

Server-side anti-cheat for Counter-Strike 2 community servers, built for Metamod:Source.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages