TruDan / NoCheatPE

Anti-Hacks / Anti-Cheat plugin for Minecraft Pocket Edition server, PocketMine
GNU General Public License v2.0
18 stars 7 forks source link

About vanilla cheat protection #3

Open shoghicp opened 9 years ago

shoghicp commented 9 years ago

While I try to create the PocketMine core as cheat-proof as possible in a simple way, more advanced plugins for the people that want them is good. Basics that are integrated in PocketMine are long range blocking, 3rd person interactions backwards, flight, collision detection and inventory transactions. It does not offer direct protection against other cheats harder to detect (or too specific for what I like), for example: turning too fast, speed, auto-aim, placing blocks too fast. This is better with an heuristic plugin (detecting continuous cheats instead of instant cheats, and having a vote).

What is the plan related to the implemented cheat protections (flight, fov) that are already correct? Flight uses a predictive approach, doing the physics calculation using an equation that will match except when the user is doing something wrong, and field of view using dot product and view direction vector against the source and interaction points. Not using them directly would be a bad idea as they take into account several issues and/or inconsistencies in the data automatically, and you won't get information about them. So, there should be a difference between vanilla protection (things that you don't need to implement, and even if you did, they would not work) and protection by plugins (that can complement what vanilla has, or add extra layers on top of that)

TruDan commented 9 years ago

The plan is to add extra layers on top, ive noticed fly is still possible in some ways like constant instant jumps etc. And also adding the event to the vanilla ones for other plugins to take action :p

shoghicp commented 9 years ago

Yep, you can jump constantly as I focus on having more false negatives than false positives, it only fires when it's sure of that (although the delay can be changed in the source, currently 1s but works well with half a tick, it's for lag)

Instant jumps can be detected using jump detection, and getting the starting motion then applying the motion equation (check vanilla flight protection) using it, like I do now using Player->setMotion()

TruDan commented 9 years ago

:D yeah the main aim of this plugin is to provide an event for other plugins to take action, when hacks or cheats are detected, with a severity level (from 0-10+) similar to NoCheatPlus in bukkit. And ill provide a default action for each event in config for those who dont want to code their own. I'd like to be able to call the vanilla cheat protections but i think I'd have to clone your cheat prevention code into our plugin, disable the vanilla one, just to run the event after

shoghicp commented 9 years ago

@TruDan You can't disable the vanilla cheat protection without breaking plugins that inherit Player :)

That's why I created this issue.

TruDan commented 9 years ago

Dang D: ill see what i can do, i want to avoid extending Player if i can