AntiXray ((Neo)Forge)

AntiXray ((Neo)Forge)

242k Downloads

Pretty nasty exploit/workaround

TreeOfSelf opened this issue ยท 5 comments

commented

So someone on my server let me know, and I tested myself. You can actually get around the anti-xray pretty easily within a good distance around yourself.

All you need to do is go into freecam, turn on xray, and punch blocks in freecam. It will work on blocks pretty close by and reveal the actual blocks around them. This of course, could also easily be automated by a hacked client so you could just walk around and bypass xray around you.

(And when I say around you, I mean even pretty far away, just can't be crazy far away, but it works even for blocks you are not close to and cannot see at all).

commented

This behavior is copied from paper. See their documentation: https://docs.papermc.io/paper/anti-xray/

Range Extension: While Anti-Xray alone will prevent the majority of users from Xraying on your server, it is not by any means infallible. Because of how Anti-Xray is (and has to be) implemented, it is possible to, on a default server, extend the range of real ores you can see by a not insignificant amount. This can be mitigated by any competent anti-cheat plugin; however, this is not included out of the box.

This should ideally be solved by an anti-cheat mod. I would expect GrimAnticheat to provide this. They have recently started supporting the fabric modding platform!

commented

This behavior is copied from paper. See their documentation: https://docs.papermc.io/paper/anti-xray/

Range Extension: While Anti-Xray alone will prevent the majority of users from Xraying on your server, it is not by any means infallible. Because of how Anti-Xray is (and has to be) implemented, it is possible to, on a default server, extend the range of real ores you can see by a not insignificant amount. This can be mitigated by any competent anti-cheat plugin; however, this is not included out of the box.

This should ideally be solved by an anti-cheat mod. I would expect GrimAnticheat to provide this. They have recently started supporting the fabric modding platform!

It doesn't. Because your mixin doesn't check if its valid it just happens at TAIL, so as long as that event fires in any way it will happen. Even cancelling the entire method at HEAD unconditionally, your mixin still happens. I see you just want a port of the Paper anti-xray, in that case, it may be better to very specifically mixin to where the actual block breaking action actually happens rather then on the entire method.

commented

Something like this actually allows it to be cancelled by Grim, and honestly doesn't this make more sense? Was there ever a point to having this run for ABORT_DESTROY_BLOCK & STOP_DESTROY_BLOCK?
#71

commented

Should also be noted, GrimAC isn't a perfect solution for this. It will cancel very obvious START_DESTROY_BLOCKs and is preferable over vanilla, but I am still easily able to reveal the location of this diamond ore through the ground.

Image Image
commented