GrimAnticheat / Grim

Fully async, multithreaded, predictive, open source, 3.01 reach, 1.005 timer, 0.01% speed, 99.99% antikb, "bypassable" 1.8-1.20 anticheat.
GNU General Public License v3.0
993 stars 280 forks source link

Grim 2.3.45 AntiKB Bypass #1180

Open rgthddei67 opened 9 months ago

rgthddei67 commented 9 months ago

Describe the bypass and how to replicate it

package net.ccbluex.liquidbounce.features.module.modules.hyt

import net.ccbluex.liquidbounce.event.EventTarget import net.ccbluex.liquidbounce.event.PacketEvent import net.ccbluex.liquidbounce.event.TickEvent import net.ccbluex.liquidbounce.features.module.Module import net.ccbluex.liquidbounce.features.module.ModuleCategory import net.ccbluex.liquidbounce.features.module.ModuleInfo import net.ccbluex.liquidbounce.injection.backend.MinecraftImpl import net.ccbluex.liquidbounce.injection.backend.PacketImpl import net.ccbluex.liquidbounce.injection.backend.WorldClientImpl import net.ccbluex.liquidbounce.value.BoolValue import net.minecraft.network.play.client.CPacketPlayer import net.minecraft.network.play.client.CPacketPlayerDigging import net.minecraft.network.play.server.SPacketEntityVelocity import net.minecraft.network.play.server.SPacketExplosion import net.minecraft.network.play.server.SPacketPlayerPosLook import net.minecraft.util.EnumFacing import net.minecraft.util.math.BlockPos

/**

Grim version

2.3.45

Server version

1.8.8 Paper

Plugins

GrimAC ViaVersion HideandCustomPlugins LuckPerms LiteBans ProtocolLib

FirephoenixX02 commented 9 months ago

I dont think people posting full classes is a great idea, neither for preventing people bypassing the ac nor for readability. Atleast use something like pastes.dev or pastebin

c0dingnoobi commented 9 months ago

dup #1133 (as far as im reading correctly) yea ok nvm even the same person is linked as author

keksc commented 8 months ago

"skid by GaoWenBo" lmfao

ManInMyVan commented 7 months ago

Readable version of that class file:

package net.ccbluex.liquidbounce.features.module.modules.hyt

import net.ccbluex.liquidbounce.event.EventTarget
import net.ccbluex.liquidbounce.event.PacketEvent
import net.ccbluex.liquidbounce.event.TickEvent
import net.ccbluex.liquidbounce.features.module.Module
import net.ccbluex.liquidbounce.features.module.ModuleCategory
import net.ccbluex.liquidbounce.features.module.ModuleInfo
import net.ccbluex.liquidbounce.injection.backend.MinecraftImpl
import net.ccbluex.liquidbounce.injection.backend.PacketImpl
import net.ccbluex.liquidbounce.injection.backend.WorldClientImpl
import net.ccbluex.liquidbounce.value.BoolValue
import net.minecraft.network.play.client.CPacketPlayer
import net.minecraft.network.play.client.CPacketPlayerDigging
import net.minecraft.network.play.server.SPacketEntityVelocity
import net.minecraft.network.play.server.SPacketExplosion
import net.minecraft.network.play.server.SPacketPlayerPosLook
import net.minecraft.util.EnumFacing
import net.minecraft.util.math.BlockPos

@ModuleInfo(name = "HytFullVelocity", description = "7078z", category = ModuleCategory.NEWNO)
class HytFullVelocity : Module() {
  private val sendC03Value = BoolValue("SendC03", true)
  private val breakValue = BoolValue("BreakBlock", true)
  private val alwayValue = BoolValue("Alway", false)
  private var gotVelo = false
  private var lastWasTeleport = false
  override fun onEnable() {
    gotVelo = false
    lastWasTeleport = false
  }

  @EventTarget
  fun onTick(event: TickEvent?) {
    val thePlayer = mc.thePlayer ?: return
    val theWorld = mc.theWorld ?: return
    val timer = (mc as MinecraftImpl).wrapped.timer ?: return
    if (alwayValue.get() || gotVelo) {
      val connection = mc.wrapped.connection ?: return
      gotVelo = false
      if (sendC03Value.get()) {
        connection.sendPacket(CPacketPlayer(thePlayer.onGround))
        try {
          val f = timer.javaClass.getDeclaredField("field_74277_g")
          f.setAccessible(true)
          val t = f[timer] as Long
          f[timer] = t + 50L
        } catch (e: NoSuchFieldException) {
          e.printStackTrace()
        } catch (e: IllegalAccessException) {
          e.printStackTrace()
        }
      }
      val pos = BlockPos(thePlayer.posX, thePlayer.posY + 1.0, thePlayer.posZ)
      connection.sendPacket(
        CPacketPlayerDigging(
          CPacketPlayerDigging.Action.STOP_DESTROY_BLOCK,
          pos,
          EnumFacing.DOWN
        )
      )
      if (breakValue.get()) {
        (theWorld as WorldClientImpl).wrapped.setBlockToAir(pos)
      }
    }
  }

  @EventTarget
  fun onPacket(event: PacketEvent) {
    val thePlayer = mc.thePlayer ?: return
    val packet = (event.packet as PacketImpl<*>).wrapped
    if (packet is SPacketPlayerPosLook) {
      lastWasTeleport = true
    } else if (!lastWasTeleport && packet is SPacketEntityVelocity) {
      if (packet.entityID == thePlayer.entityId) {
        event.cancelEvent()
        gotVelo = true
      }
    } else if (packet is SPacketExplosion) {
      val veloPacket = packet
      if (veloPacket.motionX != 0f || veloPacket.motionY != 0f || veloPacket.motionZ != 0f) {
        event.cancelEvent()
        gotVelo = true
      }
    } else if (packet.javaClass.getName().startsWith("net.minecraft.network.play.server.SPacket")) {
      lastWasTeleport = false
    }
  }
  override val tag: String
    get() = "GrimAC"
}
ManInMyVan commented 1 month ago

dup #1133 (as far as im reading correctly) yea ok nvm even the same person is linked as author

This is the same bypass