Elikill58 / Negativity

Github of Negativity, a Minecraft AntiCheat. Premium at 8€:
https://spigotmc.org/resources/86874/
241 stars 64 forks source link

Bypasses with fly #348

Open ghost opened 1 year ago

ghost commented 1 year ago

Which platform are you using ?

No response

Versions of Negativity and of the server

My version is: 1.13

What were you doing while finding bypass ?

video bypass: https://workupload.com/file/5e84j48cfaG

Which client with which mode ?

bladecore private, module:


import com.bladecore.client.event.events.MoveEvent
import com.bladecore.client.event.events.PlayerPacketEvent
import com.bladecore.client.module.AbstractModule
import com.bladecore.client.setting.setting
import com.bladecore.client.utils.player.MovementUtils
import com.bladecore.client.utils.player.MovementUtils.isInputting
import com.bladecore.client.utils.threads.safeListener
import net.minecraft.network.play.client.CPacketPlayer
import kotlin.math.cos
import kotlin.math.sin

object NegativityFly: AbstractModule("NegativityFly", "Negativity Fly", Category.MOVEMENT) {
    private val speed by setting("Speed", 1.0, 0.1, 10.0, 0.05)

    private var ticks = 0
    override fun onEnable() {
        ticks = 0
    }
    init {
        safeListener<MoveEvent> {
            ticks++
            if (isInputting()) {
                mc.player.motionX = -sin(MovementUtils.calcMoveRad()) * speed
                mc.player.motionY = 0.01
                mc.player.motionZ = cos(MovementUtils.calcMoveRad()) * speed
            } else {
                mc.player.motionX = 0.0
                mc.player.motionY = 0.001
                mc.player.motionZ = 0.0
            }

            if (mc.gameSettings.keyBindJump.isKeyDown) {
                mc.player.motionX = 0.0
                mc.player.motionY = 0.0
                mc.player.motionZ = 0.0

                when (ticks % 20) {
                    10 -> {
                        connection.sendPacket(
                            CPacketPlayer.Position(player.posX, player.posY + 0.1, player.posZ, true)
                        )
                        mc.player.setPosition(player.posX, player.posY + 0.1, player.posZ)
                    }

                    11 -> {
                        connection.sendPacket(
                            CPacketPlayer.Position(player.posX, player.posY + 0.42, player.posZ, true)
                        )
                        mc.player.setPosition(player.posX, player.posY + 0.42, player.posZ)
                    }
                }
            } else {
                ticks = 0
            }
        }

        safeListener<PlayerPacketEvent.Data> {
            if (!mc.gameSettings.keyBindJump.isKeyDown) return@safeListener
            it.packetManager.positionUpdateTicks = 0  //dont send position packets (each 20 ticks)
        }

        safeListener<PlayerPacketEvent.State> {
            if (!mc.gameSettings.keyBindJump.isKeyDown) return@safeListener
            it.isMoving = false //dont send position packets
        }
    }
}
CamperSamu commented 1 year ago

Fly (+ Air Jump) is bypassed by Meteor Client on Minestom too.

Negativity v2 compiled from source, Minecraft 1.19.2

Elikill58 commented 1 year ago

Fly (+ Air Jump) is bypassed by Meteor Client on Minestom too.

The v2 use same check code for all platforms as it's always the same client. It's seems logic that the issue appear everywhere :)

CamperSamu commented 1 year ago

The v2 use same check code for all platforms as it's always the same client. It's seems logic that the issue appear everywhere :)

I know, but Minestom can be a bit tricky and report inconsistent behaviour when compared to vanilla. Also regarding my report on fly: It gets detected if flying close to the ground, otherwise it sometiems gets detected as step or spider.

Pepeshki commented 1 year ago

Speed bypass - Following friction allows for insane speeds Fly bypass - NeruxVace on Liquidbounce (NeruxVace-Ticks: 2)