Skip to content

Feat: (Passive Anticheat) Update, Features, New confs.#73

Merged
jackpoz merged 166 commits into
TrinityCore:3.3.5-passive_anticheatfrom
acidmanifesto:3.3.5-passive_anticheat
May 19, 2022
Merged

Feat: (Passive Anticheat) Update, Features, New confs.#73
jackpoz merged 166 commits into
TrinityCore:3.3.5-passive_anticheatfrom
acidmanifesto:3.3.5-passive_anticheat

Conversation

@acidmanifesto

@acidmanifesto acidmanifesto commented Mar 1, 2022

Copy link
Copy Markdown
Contributor

Issues addressed

Changes proposed:

  • Anticheat Passive implemented
  • Automatic Moderation options
  • False Positives Reduced Greatly
  • Actual Detections improved upon drastically
  • Reports to GM's online or Automatically takes actions thru jail\kick\ban.
  • Teleport Helpers Added in.
  • If you are in .GM on it should not flag you or report you.
  • Configuration reloadable via .reload conf gm cmd
    image

Detections Provided:

  • Fly hack
  • Teleport Hack
  • Jump Hack
  • Speed Hack
  • Ignore Control (Move while rooted) Hack
  • Water Walk Hack
  • Teleport Z pane Hack
  • Ignore Z Axis Hack
  • Anti-Swim Hack
  • Gravity Hack

image

Understanding the Report Tables

Characters DB:
players_reports_status Table: is that logged anticheat stats for the players current active sessions.
daily_players_reports Table: is the log of the players life time anticheat stats that is logged until purged.
image

Know false positives \ Feature Concerns:

  • Ignore Control:
    Excessive Latency will cause false flags, if the lag is that bad they shouldnt even be playing on the server but it was shown that was the case in CC

  • Ignore Z-Axis Hack:
    On occaussion depending on player's build at times the player may get hit with a false positive based on if there are "potholes" in the maps\vmaps. Updating maps\vmaps ot latest will help reduce this, ensure compile and maps are at latest.

  • Auto Moderation Jail Feature
    If offender is a DK in the DK Starter Area they will be shackled on the spot and not teleported. Its the way the core handles keeping the DK in it's zone until successifully completed.

  • Following will Jail Break a player out:
    [x] Summoned by a GM (.sum)

Apply SQLs Files

  1. Files are located in the sql folder.
  2. Apply sql/character.anticheat.sql to the trinity_characters DB.
  3. Apply sql/world.anticheat.sql to the trinity_world DB.

GM cmds included:

  • .anticheat global Informs you if anticheat is turned on
  • .anticheat player Tells you current auto reports
  • .anticheat delete PLAYERNAME Deletes reports on player from anticheat system
  • .anticheat purge completely clears the player_daily_reports table
  • .anticheat jail Sends Player to gm jail which then shackles them and hearthstone binds them to gm jail with deserter
    auras being applied indef to them to prevent them from queuing a jail break
  • .anticheat parole Recommended to be used in gm jail, teles to faction capital and rebinds hearthstone there while clearing
    their reports while clearing their deserter auras
  • .anticheat warn Sends player warning message that they are being monitored
  • anticheat handle 0/1 Zero turns off anticheat, 1 turns on anticheat.
    image

World Console Logging:

Anticheat Logging\Appenders
Currently spams into its own file
If you want world console spam just use Logger.anticheat=3,Console Server Anticheat
Thanks to Smerdokryl from TC Discord

Appender.Anticheat=2,3,15,anticheat.log,a
Logger.anticheat=3,Server Anticheat

image

RECOMMEND CONF SETTINGS
Confs are reloadable with .reload conf

#    Anti-Cheat System
#
#     Anticheat.Enable
#        Description: Enables or disables the Anticheat System functionality
#        Default:     1 - (Enabled)
#                     0 - (Disabled)

Anticheat.Enable = 1

#     Anticheat.ReportsForIngameWarnings
#        Description: How many reports the player must have to notify to GameMasters ingame when he generates a new report.
#        Default:     70

Anticheat.ReportsForIngameWarnings = 70

#     Anticheat.MaxReportsForDailyReport
#        Description: How many reports must the player have to make a report that it is in DB for a day (not only during the player's session).
#        Default:     70

Anticheat.MaxReportsForDailyReport = 70

#     Anticheat.ReportinChat
#       Description: min and max total reports to trigger gm chat message spam.
#       Default:     So with 70 being min and 80 being max, it will spam gm in chat 10 times.
#                    Anticheat.ReportinChat.Min = 70
#                    Anticheat.ReportinChat.Max = 80

Anticheat.ReportinChat.Min = 70
Anticheat.ReportinChat.Max = 80

#     Anticheat.AlertFrequency
#       Description: Once Ingame warngings and report in chat min is met, this will throttle to alert the gms every other count
#       Default:     So with 1 being the default, u will get a message alert for every 1 violations.
#       Anticheat.AlertFrequency = 1

Anticheat.AlertFrequency = 1

#     Anticheat.WriteLog
#       Description: Enable writing to log when a player is detected using hacks
#       Default:    0 - (Disabled)
#                   1 - (Enabled)

Anticheat.WriteLog = 1

#     Anticheat.Detect
#       Description: It represents which detections are enabled (ClimbHack disabled by default).
#       Default:    1 - (Enabled)
#                   0 - (Disabled)

Anticheat.DetectFlyHack = 1
Anticheat.DetectWaterWalkHack = 1
Anticheat.DetectJumpHack = 1
Anticheat.DetectTelePlaneHack = 1
Anticheat.DetectSpeedHack = 1
Anticheat.DetectClimbHack = 1
Anticheat.DetectTelePortHack = 1
Anticheat.IgnoreControlHack = 1
Anticheat.DetectZaxisHack = 1
Anticheat.AntiSwimHack = 1
Anticheat.DetectGravityHack = 1

#     Anticheat.StricterFlyHackCheck
#       Description: Checks moveflag ascending (may give false positives)
#       Default:    0 - (Disabled)
#                   1 - (Enabled)

Anticheat.StricterFlyHackCheck = 1

###################################################################################################
#     Automatic Moderation Features
#
#     Anticheat.KickPlayer
#     Anticheat.ReportsForKick
#
#       Description: Enables and Auto kick when reports reach threshhold
#       Default:    0 - (Disabled)
#                   1 - (Enabled)
#       Default:    70 - (Kicks at 70 auto reports)
#

Anticheat.KickPlayer = 0
Anticheat.ReportsForKick = 70

#     Anticheat.BanPlayer
#     Anticheat.ReportsForBan
#
#       Description: Enables and Auto ban when reports reach threshhold
#       Default:    0 - (Disabled)
#                   1 - (Enabled)
#       Default:    70 - (Bans at 70 auto reports)
#

Anticheat.BanPlayer = 0
Anticheat.ReportsForBan = 70

#     Anticheat.JailPlayer
#     Anticheat.ReportsForJail
#
#       Description: Enables and Auto Jail when reports reach threshhold
#       Default:    0 - (Disabled)
#                   1 - (Enabled)
#       Default:    70 - (Jails at 70 auto reports)
#

Anticheat.JailPlayer = 0
Anticheat.ReportsForJail = 70

#     Anticheat.AnnounceKick
#     Anticheat.AnnounceBan
#     Anticheat.AnnounceJail
#       Description: Send a message to all players when a user kicked, banned, jailed.
#       Default:    0 - (Disabled)
#                   1 - (Enabled)

Anticheat.AnnounceKick = 0
Anticheat.AnnounceBan = 0
Anticheat.AnnounceJail = 0

# Anticheat Logging\Appenders
# Currently spams into its own file
# If you want world console spam just use Logger.anticheat=3,Console Server Anticheat

Appender.Anticheat=2,3,15,anticheat.log,a
Logger.anticheat=3,Server Anticheat

###################################################################################################

Target branch(es): 335

Issues addressed: Update

Tests performed: (Does it build, tested in-game, etc)
Builds and performs

Known issues and TODO list:

  • Localize

Localize Trintiy_Strings

  • LOCALE_enUS = 0
  • LOCALE_koKR = 1
  • LOCALE_frFR = 2
  • LOCALE_deDE = 3
  • LOCALE_zhCN = 4
  • LOCALE_zhTW = 5
  • LOCALE_esES = 6
  • LOCALE_esMX = 7
  • LOCALE_ruRU = 8

Source:
Removed Unused voids. Uncommit movementinfo. Added new Confs, Removed BITMASK CONF for detection, bitmasking on this is just a mess to use.  Improved various cheat detections to reduce false positives and increase positive results. New teleport helper added to source and teleport hack detection, new ignore control hack detection as well (For the hackers that can ignore root, when in doubt do a .freeze and see if they can move from that).  GM Chat warning still needs a better way to spam it, right now it can only spam once auto warnings hit between a min and max.
Two force auto kick options available for fly hack and water walking hacks. With more feed back we can see about adding  a auto ban option and kick option for other detection types in case a need for automatic moderation is needed.
Improved Detections:
Climb hack improved formula for detection.
Water Walking we removed false positives and better check for water walking and spell auras.
Fly hack  added in stricter checks and improved logging.
Telepane Hack has improved logging.
Ignore Control Hack added which detects player position changes (x and y) when rooted and not in vehicle.
Teleport Hack implemented and detects reports  based on 50>= changes in x and y positions with in a movement step.
Ignore control and Teleport Hack does not have their own reporting and is put in temp reporting as the sql keeps having a crazy stroke with number reporting on those, so if the math doesnt add up when you do a .anticheat player for a report, then chances are they are using ignore control\teleport hack, which is why they have their own reporting message for onscreen spam and gm chat.
Speed hack improved detection and reduce false positives for falls and transports.

SQL Update:
Organized file names.
Update Character DB SQL so depreciation warnings no longer happen on MySQL 8.0
New World DB SQL to add Trinitycore String for in game GM chat warning.

Conf:
Removed Bit masking for anticheat detections and moved to Anticheat.Detect off and on per individual hack detections.
@acidmanifesto acidmanifesto changed the title Feat: Anti Cheat Update Feat: (Passive Anticheat) Update, Features, New confs. Mar 1, 2022
Comment thread sql/chatacter.anticheat.sql Outdated
@acidmanifesto

Copy link
Copy Markdown
Contributor Author

Now this PR is ready to go, really just asking for further feed back to avoid making 20 more prs when this gets merged.

This adds a exception to the Rogue's Killing Spree being hit as a Speed Hack
Mage's Blink ability was giving false flags for speed hack detection
Removed Anticheat.KickPlayerFlyHack and Anticheat.KickPlayerWaterWalkHack as them kicking on first detection was just stupid.
Added Autmatic Moderation Feature.
Anticheat.KickPlayer and  Anticheat.ReportsForKick, where you can enable kicking when the desire auto reports is met.
Anticheat.BanPlayer and  Anticheat.ReportsForBan, where you can enable banning when the desire auto reports is met.
Announce kick\ban server wide option added as well
@Aokromes

Aokromes commented May 9, 2022

Copy link
Copy Markdown
Member

it looks good to me, the single crash i had it was fixed, no issues for now.

@jackpoz

jackpoz commented May 17, 2022

Copy link
Copy Markdown
Member

@Aokromes is this good enough to me merged in your opinion ?

@Aokromes

Copy link
Copy Markdown
Member

it was 8d ago xd

@jackpoz

jackpoz commented May 19, 2022

Copy link
Copy Markdown
Member

Merging for the time being

@jackpoz jackpoz merged commit d534d6e into TrinityCore:3.3.5-passive_anticheat May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants