Rise 5.99 ClientSpoofer module 1 files, 71 lines

Rise 5.99 ClientSpoofer: Full Source Analysis

Rise 5.99's ClientSpoofer rewrites the client-brand and plugin-channel handshake so servers fingerprint a different client: onPacketSend intercepts every C17PacketCustomPayload and replaces…

dev/rise/module/impl/other/ClientSpoofer.java · GitHub source ↗

Published 2026-08-13 · Updated 2026-08-13

Analysis

Overview

Rise 5.99's ClientSpoofer rewrites the client-brand and plugin-channel handshake so servers fingerprint a different client: onPacketSend intercepts every C17PacketCustomPayload and replaces the channel and payload according to the selected mode, and onEnable prints a notification telling the player to rejoin because the brand is only exchanged at login. The six modes are Forge (payload string 'FML'), Lunar (channel REGISTER, raw bytes 'Lunar-Client'), LabyMod ('LMC'), PvP Lounge ('PLC18'), CheatBreaker ('CB') and Geyser ('Geyser'). The module touches no other packet: the keepalive stream, transactions and the rest of the connection stay untouched.

Dispatch and rewrite

onPacketSend tests for C17PacketCustomPayload and switches on the Mode setting. Every mode replaces the payload data, and the Lunar mode additionally replaces the channel with REGISTER while carrying the raw brand bytes as the payload; the other modes keep the original channel and only swap the data. The packet is mutated in place before it is queued, so the server sees a C17 that looks exactly like the spoofed client's announcement.

Payload encoding

createPacketBuffer distinguishes the two wire formats: with the string flag it writes a VarInt length prefix followed by the UTF-8 text (the FML, LMC, PLC18 and CB forms), and without it wraps the raw bytes with no length prefix (Lunar-Client and Geyser). The distinction mirrors how each real client announces itself: Forge registers the FML handshake with a length-prefixed string, while the Lunar and Geyser brands ride as raw channel names and payloads.

The rejoin contract and the untouched stream

The brand is sent once per connection during the login phase, as the MC|Brand payload and the FML handshake, so rewriting payloads mid-session never reaches the server; that is why the module demands a rejoin after enabling. C00 keepalives pass through unmodified, and the module never drops or reorders any packet, so the connection's timing and ordering stay vanilla. The practical consequence is that the spoof is only as good as the login-time payloads, and any server that recorded the pre-enable brand keeps the old fingerprint until the player rejoins.

source ClientSpoofer.java

ClientSpoofer.java71 lines · JavaOriginal ↗
1
/*
2
 Copyright Alan Wood 2021
3
 None of this code to be reused without my written permission
4
 Intellectual Rights owned by Alan Wood
5
 */
6
package dev.rise.module.impl.other;
7
8
import dev.rise.event.impl.packet.PacketSendEvent;
9
import dev.rise.module.Module;
10
import dev.rise.module.api.ModuleInfo;
11
import dev.rise.module.enums.Category;
12
import dev.rise.setting.impl.ModeSetting;
13
import io.netty.buffer.Unpooled;
14
import net.minecraft.network.PacketBuffer;
15
import net.minecraft.network.play.client.C17PacketCustomPayload;
16
17
@ModuleInfo(name = "ClientSpoofer", description = "Makes servers think you're on the specified client", category = Category.OTHER)
18
public final class ClientSpoofer extends Module {
19
    private final ModeSetting mode = new ModeSetting("Mode", this, "Forge", "Forge", "Lunar", "LabyMod", "PvP Lounge", "CheatBreaker", "Geyser");
20
21
    @Override
22
    protected void onEnable() {
23
        this.registerNotification("Rejoin for " + this.getModuleInfo().name() + " to work.");
24
    }
25
26
    @Override
27
    public void onPacketSend(final PacketSendEvent event) {
28
        if (event.getPacket() instanceof C17PacketCustomPayload) {
29
            final C17PacketCustomPayload packet = (C17PacketCustomPayload) event.getPacket();
30
            switch (mode.getMode()) {
31
                case "Forge": {
32
                    packet.setData(createPacketBuffer("FML", true));
33
                    break;
34
                }
35
36
                case "Lunar": {
37
                    packet.setChannel("REGISTER");
38
                    packet.setData(createPacketBuffer("Lunar-Client", false));
39
                    break;
40
                }
41
42
                case "LabyMod": {
43
                    packet.setData(createPacketBuffer("LMC", true));
44
                    break;
45
                }
46
47
                case "PvP Lounge": {
48
                    packet.setData(createPacketBuffer("PLC18", false));
49
                    break;
50
                }
51
52
                case "CheatBreaker": {
53
                    packet.setData(createPacketBuffer("CB", true));
54
                    break;
55
                }
56
57
                case "Geyser": {
58
                    packet.setData(createPacketBuffer("Geyser", false));
59
                    break;
60
                }
61
            }
62
        }
63
    }
64
65
    private PacketBuffer createPacketBuffer(final String data, final boolean string) {
66
        if (string)
67
            return new PacketBuffer(Unpooled.buffer()).writeString(data);
68
        else
69
            return new PacketBuffer(Unpooled.wrappedBuffer(data.getBytes()));
70
    }
71
}

What this file does

The module file is the entire implementation. onPacketSend holds the mode switch that rewrites every C17 payload, createPacketBuffer builds the two wire formats (VarInt-prefixed string versus raw bytes), and onEnable raises the rejoin notification that documents the login-phase constraint. There is no receive-side logic and no other packet type is touched; the file is a pure outgoing-payload rewriter whose only state is the Mode setting.

anticheat Countering Checks

The anticheat code that detects or counters the techniques this module uses. Full source, with the detection mechanism explained below each box.

anticheat Grim ClientBrand (brand claim recorder)

ClientBrand.java81 lines · Java
1
package ac.grim.grimac.checks.impl.misc;
2
3
import ac.grim.grimac.GrimAPI;
4
import ac.grim.grimac.checks.Check;
5
import ac.grim.grimac.checks.type.PacketReceiveListener;
6
import ac.grim.grimac.player.GrimPlayer;
7
import ac.grim.grimac.utils.anticheat.MessageUtil;
8
import com.github.retrooper.packetevents.PacketEvents;
9
import com.github.retrooper.packetevents.event.PacketReceiveEvent;
10
import com.github.retrooper.packetevents.manager.server.ServerVersion;
11
import com.github.retrooper.packetevents.protocol.packettype.PacketType;
12
import com.github.retrooper.packetevents.protocol.player.ClientVersion;
13
import com.github.retrooper.packetevents.wrapper.configuration.client.WrapperConfigClientPluginMessage;
14
import com.github.retrooper.packetevents.wrapper.play.client.WrapperPlayClientPluginMessage;
15
import lombok.Getter;
16
import net.kyori.adventure.text.Component;
17
18
public class ClientBrand extends Check implements PacketReceiveListener {
19
20
    private static final String CHANNEL = PacketEvents.getAPI().getServerManager().getVersion().isNewerThanOrEquals(ServerVersion.V_1_13) ? "minecraft:brand" : "MC|Brand";
21
22
    @Getter
23
    private String brand = "vanilla";
24
    @Getter
25
    private boolean hasBrand = false;
26
27
    public ClientBrand(GrimPlayer player) {
28
        super(player);
29
    }
30
31
    @Override
32
    public void onPacketReceive(final PacketReceiveEvent event) {
33
        if (event.getPacketType() == PacketType.Play.Client.PLUGIN_MESSAGE) {
34
            WrapperPlayClientPluginMessage packet = new WrapperPlayClientPluginMessage(event);
35
            handle(packet.getChannelName(), packet.getData());
36
        } else if (event.getPacketType() == PacketType.Configuration.Client.PLUGIN_MESSAGE) {
37
            WrapperConfigClientPluginMessage packet = new WrapperConfigClientPluginMessage(event);
38
            handle(packet.getChannelName(), packet.getData());
39
        }
40
    }
41
42
    private void handle(String channel, byte[] data) {
43
        if (!channel.equals(ClientBrand.CHANNEL)) return;
44
45
        if (data.length > 64 || data.length == 0) {
46
            brand = "sent " + data.length + " bytes as brand";
47
        } else if (!hasBrand) {
48
            byte[] minusLength = new byte[data.length - 1];
49
            System.arraycopy(data, 1, minusLength, 0, minusLength.length);
50
51
            brand = new String(minusLength).replace(" (Velocity)", ""); // removes velocity's brand suffix
52
            brand = MessageUtil.stripColor(brand); // strip color codes from client brand
53
            if (!GrimAPI.INSTANCE.getConfigManager().isIgnoredClient(brand)) {
54
                String message = GrimAPI.INSTANCE.getConfigManager().getConfig().getStringElse("client-brand-format", "%prefix% &f%player% joined using %brand%");
55
                Component component = MessageUtil.replacePlaceholders(player, MessageUtil.miniMessage(message));
56
57
                GrimAPI.INSTANCE.getAlertManager().sendBrand(component, null);
58
            }
59
            // Push the now-known brand into the session row. The initial onJoin
60
            // upsert ran from PlayerJoinEvent, before the brand packet arrived,
61
            // so client_brand was null on disk. observeBrandFromCheck re-issues
62
            // the upsert with the same session_id (idempotent) but the brand
63
            // column now filled in. NOOP impl skips the work entirely.
64
            GrimAPI.INSTANCE.getDataStoreLifecycle().liveWriteHooks().observeBrandFromCheck(player);
65
        }
66
67
        // https://github.com/MinecraftForge/MinecraftForge/issues/9309
68
        // "Forge 40.1.22 1.18.2+ has extended player reach"
69
        // quality development from forge devs
70
        // inbuilt reach hacks for over a year across 2 (3 if you include 1.19.3/1.20) major versions
71
        // Fixed in 1.19.4 possibly? Definitely fixed in 1.20+.
72
        final boolean hasReachHacks = brand.contains("forge")
73
                && player.getClientVersion().isNewerThanOrEquals(ClientVersion.V_1_18_2)
74
                && player.getClientVersion().isOlderThan(ClientVersion.V_1_19_4);
75
        if (hasReachHacks && GrimAPI.INSTANCE.getConfigManager().isBlockBlacklistedForgeClients()) {
76
            player.disconnect(MessageUtil.miniMessage(MessageUtil.replacePlaceholders(player, GrimAPI.INSTANCE.getConfigManager().getDisconnectBlacklistedForge())));
77
        }
78
79
        hasBrand = true;
80
    }
81
}

How it counteracts this module

Grim's ClientBrand is the C17-side consumer of the brand claim. It listens for the MC|Brand plugin message (minecraft:brand on 1.13+), strips the length byte and color codes, records the brand string on the player, strips the Velocity suffix, and emits a staff alert in the configured client-brand format unless the brand is in the ignored-client list; a payload longer than 64 bytes or empty is recorded as 'sent N bytes as brand'.

Against the spoofer, the Forge mode makes the server record the brand 'FML' and alert 'joined using FML', and rewriting every C17 can produce the over-length path when a mode's data is written over a longer original payload. The honest limit is that the check validates the claim's shape, not its truth: it has no behavioral fingerprint to compare against, so a well-formed fake brand is recorded and alerted, and detection of the spoof itself falls to consistency checks outside this class.

anticheat Photon BrandChannelData (bounded brand history)

BrandChannelData.java47 lines · Java
1
package de.photon.anticheataddition.user.data.subdata;
2
3
import de.photon.anticheataddition.modules.sentinel.ParsedPluginMessageListener;
4
import de.photon.anticheataddition.user.User;
5
import de.photon.anticheataddition.util.datastructure.buffer.RingBuffer;
6
import org.bukkit.entity.Player;
7
import org.jetbrains.annotations.NotNull;
8
9
/**
10
 * Represents a data class to manage and save brand channel messages.
11
 */
12
public class BrandChannelData
13
{
14
    // Use a RingBuffer here as a malicious client could spam the brand channel with messages.
15
    private final RingBuffer<String> brandChannelMessages = new RingBuffer<>(10);
16
17
    // This method is private as only the listener below is supposed to add messages.
18
    private void addBrandChannelMessage(String message)
19
    {
20
        brandChannelMessages.add(message);
21
    }
22
23
    public boolean hasBrandChannelMessage(String message)
24
    {
25
        return brandChannelMessages.contains(message);
26
    }
27
28
    public String listBrandChannelMessages()
29
    {
30
        return String.join(", ", brandChannelMessages);
31
    }
32
33
    /**
34
     * Listens for brand channel plugin messages and updates the {@link User}'s {@link BrandChannelData} accordingly.
35
     */
36
    public static class BrandChannelMessageListener implements ParsedPluginMessageListener
37
    {
38
        @Override
39
        public void onPluginMessageReceived(@NotNull String channel, @NotNull Player player, @NotNull String message)
40
        {
41
            final var user = User.getUser(player);
42
            if (user == null) return;
43
44
            user.getBrandChannelData().addBrandChannelMessage(message);
45
        }
46
    }
47
}

How it counteracts this module

Photon's BrandChannelData keeps the per-user brand-channel history in a RingBuffer capped at 10 messages, with the comment that a malicious client could spam the brand channel, and the BrandChannelMessageListener appends every plugin message it parses.

The cap is the relevant mechanic for the spoofer: the module rewrites every C17 the client sends, so any sustained payload stream churns the ring and older claims fall out; hasBrandChannelMessage then answers whether a given claim is present, which Photon's sentinel checks consult. The entry is a record rather than a flag, so its countering value is the bounded history and the spam cap, not a violation.

anticheat NoCheatPlus KeepAliveFrequency (keepalive ledger, honest gap)

KeepAliveFrequency.java101 lines · Java
1
/*
2
 * This program is free software: you can redistribute it and/or modify
3
 *   it under the terms of the GNU General Public License as published by
4
 *   the Free Software Foundation, either version 3 of the License, or
5
 *   (at your option) any later version.
6
 *
7
 *   This program is distributed in the hope that it will be useful,
8
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
 *   GNU General Public License for more details.
11
 *
12
 *   You should have received a copy of the GNU General Public License
13
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
14
 */
15
package fr.neatmonster.nocheatplus.checks.net;
16
17
import org.bukkit.entity.Player;
18
19
import fr.neatmonster.nocheatplus.checks.Check;
20
import fr.neatmonster.nocheatplus.checks.CheckType;
21
import fr.neatmonster.nocheatplus.players.IPlayerData;
22
import fr.neatmonster.nocheatplus.utilities.CheckUtils;
23
24
public class KeepAliveFrequency extends Check {
25
26
    public KeepAliveFrequency() {
27
        super(CheckType.NET_KEEPALIVEFREQUENCY);
28
    }
29
    
30
    /**
31
     * Checks hasBypass on violation only.
32
     * @param player
33
     * @param time
34
     * @param data
35
     * @param cc
36
     * @return If to cancel.
37
     */
38
    public boolean check(final Player player, final long time, final NetData data, final NetConfig cc, final IPlayerData pData) {
39
        final long now = System.currentTimeMillis();
40
        final long joinTime = pData.getLastJoinTime();
41
        if (joinTime > 0L && now < joinTime + cc.keepAliveFrequencyStartupDelay) {
42
            return false;
43
        }
44
        if (data.keepAliveExpectedResponse && !data.keepAliveDuplicateId) {
45
            return false;
46
        }
47
        data.keepAliveFreq.add(time, 1f);
48
        final float first = data.keepAliveFreq.bucketScore(0);
49
        
50
        if (first > 1f) {
51
            // Trigger a violation.
52
            final float fullScore = data.keepAliveFreq.score(1f);
53
            if (isModeledBoundaryBurst(data, fullScore, first)) {
54
                return false;
55
            }
56
            final double vl = Math.max(first - getFirstBucketViolationLimit(data), fullScore - data.keepAliveFreq.numberOfBuckets());
57
            final boolean cancel = executeActions(player, vl, 1.0, cc.keepAliveFrequencyActions).willCancel();
58
            return cancel;
59
        }
60
        return false;
61
    }
62
63
    private boolean isModeledBoundaryBurst(final NetData data, final float fullScore, final float first) {
64
        // KeepAlive model: if outgoing tracking is unavailable, only treat small monotonic id bursts as timing leftovers.
65
        if (data.keepAliveDuplicateId || fullScore > data.keepAliveFreq.numberOfBuckets() + 2f) {
66
            return false;
67
        }
68
        // Folia/netty can timestamp two adjacent valid replies in the same millisecond; do not cancel a single pair.
69
        return first <= 2f || isUntrackedMonotonicBurst(data, fullScore, first);
70
    }
71
72
    private boolean isUntrackedMonotonicBurst(final NetData data, final float fullScore, final float first) {
73
        if (data.keepAliveOutgoingSeen || fullScore > data.keepAliveFreq.numberOfBuckets()) {
74
            return false;
75
        }
76
        if (!data.keepAlivePacketIdAvailable || !data.keepAlivePreviousPacketIdAvailable) {
77
            return false;
78
        }
79
        if (data.keepAlivePacketId <= data.keepAlivePreviousPacketId) {
80
            return false;
81
        }
82
        return first <= getFallbackFirstBucketLimit(data);
83
    }
84
85
    private float getFirstBucketViolationLimit(final NetData data) {
86
        if (data.keepAliveDuplicateId) {
87
            return 1f;
88
        }
89
        if (!data.keepAliveOutgoingSeen
90
                && data.keepAlivePacketIdAvailable
91
                && data.keepAlivePreviousPacketIdAvailable
92
                && data.keepAlivePacketId > data.keepAlivePreviousPacketId) {
93
            return getFallbackFirstBucketLimit(data);
94
        }
95
        return 2f;
96
    }
97
98
    private float getFallbackFirstBucketLimit(final NetData data) {
99
        return Math.max(3f, Math.min(6f, data.keepAliveFreq.numberOfBuckets() / 4f));
100
    }
101
}

How it counteracts this module

The C00 side is where the spoofer is provably invisible. NoCheatPlus's keepalive ledger records every outgoing S00 id, matches each incoming C00 echo against the pending list, and flags only unexpected or duplicate replies and bursts of two or more replies in one second.

The spoofer never touches keepalives, so the ledger sees a textbook 1:1 echo stream and stays silent by design; the entry is included as the honest boundary that delimits what a payload rewriter does not change. Any serverside detection of the brand spoof must therefore come from the C17 consumers (ClientBrand, BrandChannelData), never from connection-timing checks.

← Back to Analysis Hub