Rise 5.99 PingSpoof module 2 files, 123 lines

Rise 5.99 PingSpoof: Full Source Analysis

PingSpoof is a park-and-release buffer for the two reply packets the server uses to measure latency: onPacketSend intercepts every C00 keepalive echo and every C0F transaction confirmation, stores…

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

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

Analysis

Overview

PingSpoof is a park-and-release buffer for the two reply packets the server uses to measure latency: onPacketSend intercepts every C00 keepalive echo and every C0F transaction confirmation, stores the packet in a ConcurrentHashMap with an absolute release deadline (the Delay setting, 10 to 30000 ms, default 1000), and cancels the original send. onPreMotion walks the map and pushes expired entries back through PacketUtil.sendPacket. The buffer is cleared on disable and on world change, and an S08 receive handler resets a TimeUtil that is never read, so that branch is dead code. The critical detail is the release path: the flush goes through the evented send queue, and on this fork the send event fires inside the network dispatch before the write, with a cancelled event suppressing the write. The client's own convention (Blink, Speed Timer Bypass) is to flush with sendPacketWithoutEvent precisely to avoid re-buffering; PingSpoof does not, so each released C00 or C0F re-enters onPacketSend, is re-parked with a fresh deadline and cancelled, and never reaches the wire while the module stays enabled.

Park-and-release design

Every C0F or C00 that the vanilla code produces is intercepted once: the packet object becomes the map key, the deadline is System.currentTimeMillis plus the delay setting, and the event is cancelled so nothing is written. The flush in onPreMotion iterates the map, sends every entry whose deadline has passed and removes it. Because the map is keyed on the packet instance, a given reply is parked at most once per vanilla emission. onDisable and onWorldChanged both clear the map outright, which drops any still-parked replies, and the S08 branch merely resets the timer field that nothing ever reads, so the intended teleport-sync logic is inert.

Release path re-entry

The flush calls PacketUtil.sendPacket, which routes through addToSendQueue and the network dispatch, the same path every other send takes. The sibling Rise 6.1.30 fork shows the seam: NetworkManager.dispatchPacket constructs the send event, runs the module bus, and returns without writing when the event is cancelled. Rise 5.99 modules that buffer packets all flush through sendPacketWithoutEvent for exactly this reason, and PingSpoof is the exception. The consequence is a self-defeating cycle: the released C00 or C0F is re-intercepted in onPacketSend, gets a fresh deadline of now plus delay, and is cancelled again, so no delayed reply is ever actually sent. The server simply stops receiving keepalive echoes and transaction confirmations for as long as the module is enabled, and a stock server eventually times out a client that never answers keepalives.

Server-side footprint

With the module enabled the observable is silence on two channels: no C00 replies and no C0F replies arrive, so the server's measured ping never inflates (there is no late reply to measure), pending keepalive requests age out, and any anticheat transaction bookkeeping stays open. Toggling the module off clears the buffer and the next vanilla replies flow normally, which is why the footprint is a gap rather than a stream. The intended design, had the flush bypassed the event bus, would be a uniform delay applied to both reply classes, with the S08 reset marking teleport boundaries; the re-entry defect turns that design into a canceller.

source PingSpoof.java

PingSpoof.java80 lines · JavaOriginal ↗
1
package dev.rise.module.impl.other;
2
3
import dev.rise.event.impl.motion.PreMotionEvent;
4
import dev.rise.event.impl.other.WorldChangedEvent;
5
import dev.rise.event.impl.packet.PacketReceiveEvent;
6
import dev.rise.event.impl.packet.PacketSendEvent;
7
import dev.rise.module.Module;
8
import dev.rise.module.api.ModuleInfo;
9
import dev.rise.module.enums.Category;
10
import dev.rise.setting.impl.NumberSetting;
11
import dev.rise.util.math.TimeUtil;
12
import dev.rise.util.player.PacketUtil;
13
import net.minecraft.network.Packet;
14
import net.minecraft.network.play.client.C00PacketKeepAlive;
15
import net.minecraft.network.play.client.C0FPacketConfirmTransaction;
16
import net.minecraft.network.play.server.S08PacketPlayerPosLook;
17
18
import java.util.Iterator;
19
import java.util.Map;
20
import java.util.concurrent.ConcurrentHashMap;
21
22
@ModuleInfo(name = "PingSpoof", description = "Makes your ping higher for the server", category = Category.OTHER)
23
public final class PingSpoof extends Module {
24
25
    private final NumberSetting delay = new NumberSetting("Delay", this, 1000, 10, 30000, 1);
26
27
    private final ConcurrentHashMap<Packet<?>, Long> packets = new ConcurrentHashMap<>();
28
29
    private final TimeUtil timer = new TimeUtil();
30
31
    @Override
32
    protected void onDisable() {
33
        packets.clear();
34
    }
35
36
    @Override
37
    public void onWorldChanged(final WorldChangedEvent event) {
38
        if (mc.isSingleplayer()) return;
39
40
        packets.clear();
41
    }
42
43
    @Override
44
    public void onPreMotion(final PreMotionEvent event) {
45
        if (mc.isSingleplayer())
46
            return;
47
48
        for (final Iterator<Map.Entry<Packet<?>, Long>> iterator = packets.entrySet().iterator(); iterator.hasNext(); ) {
49
            final Map.Entry<Packet<?>, Long> entry = iterator.next();
50
51
            if (entry.getValue() < System.currentTimeMillis()) {
52
                PacketUtil.sendPacket(entry.getKey());
53
                iterator.remove();
54
            }
55
        }
56
    }
57
58
    @Override
59
    public void onPacketReceive(final PacketReceiveEvent event) {
60
        if (mc.isSingleplayer())
61
            return;
62
63
        if (event.getPacket() instanceof S08PacketPlayerPosLook) {
64
            timer.reset();
65
        }
66
    }
67
68
    @Override
69
    public void onPacketSend(final PacketSendEvent event) {
70
        if (mc.isSingleplayer())
71
            return;
72
73
        final Packet<?> p = event.getPacket();
74
75
        if (p instanceof C0FPacketConfirmTransaction || p instanceof C00PacketKeepAlive) {
76
            packets.put(p, (long) (System.currentTimeMillis() + delay.getValue()));
77
            event.setCancelled(true);
78
        }
79
    }
80
}

What this file does

The module holds the entire mechanism: a ConcurrentHashMap of parked replies with deadlines, a cancel branch for C00 and C0F in onPacketSend, a deadline sweep in onPreMotion, and clears on disable and world change. The Delay setting (10 to 30000 ms) sets the park time, and the same delay applies to both reply classes. The S08 handler and its TimeUtil reset are the dead part of the file: timer is written but never queried, so the teleport-sync intent has no effect. The sweep re-sends through PacketUtil.sendPacket, the evented path, which is the module's defining flaw: the released packet re-enters the cancel branch on this fork's send dispatch and is re-parked, so the delayed replies never leave the client.

source PacketUtil.java (flush path)

PacketUtil.java43 lines · JavaOriginal ↗
1
package dev.rise.util.player;
2
3
import lombok.experimental.UtilityClass;
4
import net.minecraft.client.Minecraft;
5
import net.minecraft.network.Packet;
6
7
@UtilityClass
8
public final class PacketUtil {
9
    private final Minecraft mc = Minecraft.getMinecraft();
10
11
    public void sendPacket(final Packet<?> packet) {
12
        mc.getNetHandler().addToSendQueue(packet);
13
    }
14
15
    public void sendPacketWithoutEvent(final Packet<?> packet) {
16
        mc.getNetHandler().addToSendQueueWithoutEvent(packet);
17
    }
18
19
    public void receivePacket(final Packet<?> packet) {
20
        mc.getNetHandler().addToReceiveQueue(packet);
21
    }
22
23
    public void receivePacketWithoutEvent(final Packet<?> packet) {
24
        mc.getNetHandler().addToReceiveQueueWithoutEvent(packet);
25
    }
26
    public class TimedPacket {
27
        private final Packet<?> packet;
28
        private final long time;
29
30
        public TimedPacket(final Packet<?> packet, final long time) {
31
            this.packet = packet;
32
            this.time = time;
33
        }
34
35
        public Packet<?> getPacket() {
36
            return packet;
37
        }
38
39
        public long getTime() {
40
            return time;
41
        }
42
    }
43
}

What this file does

The utility the flush depends on. sendPacket calls addToSendQueue, the normal evented path that runs the module bus before the packet is written, which is why a flushed C00 or C0F can be re-intercepted by PingSpoof's own onPacketSend. sendPacketWithoutEvent is the sibling that bypasses the bus, the one every other Rise 5.99 buffer-and-flush module (Blink, Speed Timer Bypass) uses to avoid exactly this re-entry. The class also carries receive helpers used by other modules and a TimedPacket holder that mirrors the park-and-deadline idea, but PingSpoof does not use it; the choice of sendPacket over sendPacketWithoutEvent is the whole difference between a working ping delay and a permanent reply canceller.

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 KeepAliveFrequency (keepalive reply ledger)

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

NoCheatPlus replaces accept-any-echo keepalive handling with an id ledger: the ProtocolLib adapter stores every outgoing S00 id in NetData.keepAliveRequests (pruned after 30000 ms, capped at 40 pending), and each incoming C00 is matched against it. A reply with a pending request sets the expected-response flag and is not counted; a reply with no pending request or a duplicate id is counted, and every reply is timestamped into an ActionFrequency(20, 1000) bucket window, with the newest-second bucket flagging above 1f. The module's actual behavior sends no replies at all, so the accumulator scores zero and the requests simply age out: the ledger is silent against pure suppression, which is its honest limit. Any reply that does leak through (a flush racing a disable, a C00 queued before the module toggled on) arrives after its request aged out and is counted as unexpected, which is the failure mode the check was built for.

anticheat PingSpoofA (transaction ping above keepalive ping)

PingSpoofA.java28 lines · Java
1
package xyz.elevated.frequency.check.impl.pingspoof;
2
3
import xyz.elevated.frequency.check.CheckData;
4
import xyz.elevated.frequency.check.type.PacketCheck;
5
import xyz.elevated.frequency.data.PlayerData;
6
import xyz.elevated.frequency.exempt.type.ExemptType;
7
import xyz.elevated.frequency.wrapper.impl.client.WrappedPlayInFlying;
8
9
@CheckData(name = "PingSpoof (A)")
10
public final class PingSpoofA extends PacketCheck {
11
12
    public PingSpoofA(final PlayerData playerData) {
13
        super(playerData);
14
    }
15
16
    @Override
17
    public void process(final Object object) {
18
        if (object instanceof WrappedPlayInFlying) {
19
            final long transactionPing = playerData.getTransactionPing().get();
20
            final long keepAlivePing = playerData.getKeepAlivePing().get();
21
22
            final boolean joined = playerData.getTicks().get() - playerData.getJoined().get() < 10;
23
            final boolean exempt = this.isExempt(ExemptType.LAGGING, ExemptType.TELEPORTING, ExemptType.TPS, ExemptType.CHUNK);
24
25
            if (!exempt && !joined && transactionPing > keepAlivePing && Math.abs(transactionPing - keepAlivePing) > 50) fail();
26
        }
27
    }
28
}

How it counteracts this module

Frequency's transaction-ping diverge check: on every flying packet, if transactionPing exceeds keepAlivePing by more than 50 ms the player fails, with exemptions for lag, teleporting, low TPS and chunk loading, and a 10-tick grace after join. The check is aimed at clients that delay transaction replies more than keepalive replies, which inflates the transaction measurement. PingSpoof parks both reply classes with the same delay, and in the working design the two measurements would inflate together, leaving only the tick-quantized flush skew (roughly one 50 ms client tick) at the threshold edge. With the re-entry defect both streams are suppressed, so transactionPing and keepAlivePing freeze at their pre-enable values and the divergence never appears. Either way the check stays silent; its value is the boundary it draws for asymmetric spoofs.

anticheat PingSpoofB (keepalive ping above transaction ping)

PingSpoofB.java28 lines · Java
1
package xyz.elevated.frequency.check.impl.pingspoof;
2
3
import xyz.elevated.frequency.check.CheckData;
4
import xyz.elevated.frequency.check.type.PacketCheck;
5
import xyz.elevated.frequency.data.PlayerData;
6
import xyz.elevated.frequency.exempt.type.ExemptType;
7
import xyz.elevated.frequency.wrapper.impl.client.WrappedPlayInFlying;
8
9
@CheckData(name = "PingSpoof (B)")
10
public final class PingSpoofB extends PacketCheck {
11
12
    public PingSpoofB(final PlayerData playerData) {
13
        super(playerData);
14
    }
15
16
    @Override
17
    public void process(final Object object) {
18
        if (object instanceof WrappedPlayInFlying) {
19
            final long transactionPing = playerData.getTransactionPing().get();
20
            final long keepAlivePing = playerData.getKeepAlivePing().get();
21
22
            final boolean joined = playerData.getTicks().get() - playerData.getJoined().get() < 10;
23
            final boolean exempt = this.isExempt(ExemptType.LAGGING, ExemptType.TELEPORTING, ExemptType.TPS, ExemptType.CHUNK);
24
25
            if (!exempt && !joined && keepAlivePing > transactionPing && Math.abs(keepAlivePing - transactionPing) > 50L) fail();
26
        }
27
    }
28
}

How it counteracts this module

The mirror of PingSpoofA: it fails when keepAlivePing exceeds transactionPing by more than 50 ms, covering clients that inflate only the keepalive side. The module's symmetric park keeps both measurements equal in theory and frozen in practice, so the check never sees the divergence it exists to catch. It still matters as the second half of the pair: a one-sided implementation (delay only C00, or only C0F) would trip exactly one of the two, and an anticheat admin reading both flags gets a fingerprint of which reply class a spoof touches. Against Rise's module the honest outcome is a pass, and the 50 ms threshold is the exact size of the client-tick skew the flush would introduce if it worked.

anticheat MorePackets (movement packet rate)

MorePackets.java127 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.moving.player;
16
17
import java.util.ArrayList;
18
import java.util.List;
19
20
import org.bukkit.Location;
21
import org.bukkit.entity.Player;
22
23
import fr.neatmonster.nocheatplus.actions.ParameterName;
24
import fr.neatmonster.nocheatplus.checks.Check;
25
import fr.neatmonster.nocheatplus.checks.CheckType;
26
import fr.neatmonster.nocheatplus.checks.ViolationData;
27
import fr.neatmonster.nocheatplus.checks.moving.MovingConfig;
28
import fr.neatmonster.nocheatplus.checks.moving.MovingData;
29
import fr.neatmonster.nocheatplus.checks.net.NetStatic;
30
import fr.neatmonster.nocheatplus.players.IPlayerData;
31
import fr.neatmonster.nocheatplus.utilities.StringUtil;
32
import fr.neatmonster.nocheatplus.utilities.location.PlayerLocation;
33
34
/**
35
 * The MorePackets check will try to identify players that send more than the usual
36
 * amount of move-packets to the server to be able to move faster than normal, without getting caught by the other
37
 * checks (flying/running).
38
 */
39
public class MorePackets extends Check {
40
41
    private final List<String> tags = new ArrayList<String>();
42
43
    /**
44
     * Instantiates a new more packets check.
45
     */
46
    public MorePackets() {
47
        super(CheckType.MOVING_MOREPACKETS);
48
    }
49
50
    /**
51
     * Check for speeding by sending too many packets. We assume 22 packets per
52
     * second to be legitimate, while 20 would be ideal. See
53
     * PlayerData.morePacketsFreq for the monitored amount of time and the
54
     * resolution. See NetStatic for the actual check code.
55
     * 
56
     * @param player
57
     * @param from
58
     * @param to
59
     * @param allowSetSetBack
60
     *            If to allow setting the set back location.
61
     * @param data
62
     * @param cc
63
     * @return
64
     */
65
    public Location check(final Player player, final PlayerLocation from, final PlayerLocation to, 
66
            final boolean allowSetSetBack, final MovingData data, final MovingConfig cc,
67
            final IPlayerData pData) {
68
        // Take time once, first:
69
        final long time = System.currentTimeMillis();
70
        final boolean debug = pData.isDebugActive(type);
71
72
        //    	if (from.isSamePos(to)) {
73
        //    		// Ignore moves with "just look" for now.
74
        //    		// TODO: Extra ActionFrequency for "just look" + use to burn, maybe also check individually.
75
        //    		return null;
76
        //    	}
77
78
        // Ensure we have a set back location.
79
        if (allowSetSetBack && !data.hasMorePacketsSetBack()){
80
            // TODO: Check if other set back is appropriate or if to set/reset on other events.
81
            if (data.hasSetBack()) {
82
                data.setMorePacketsSetBackFromSurvivalfly();
83
            }
84
            else {
85
                data.setMorePacketsSetBack(from);
86
            }
87
        }
88
89
        // Check for a violation of the set limits.
90
        tags.clear();
91
        final double violation = NetStatic.morePacketsCheck(data.morePacketsFreq, time, 1f, cc.morePacketsEPSMax, cc.morePacketsEPSIdeal, data.morePacketsBurstFreq, cc.morePacketsBurstPackets, cc.morePacketsBurstDirect, cc.morePacketsBurstEPM, tags);
92
93
        // Process violation result.
94
        if (violation > 0.0) {
95
            // Increment violation level.
96
            data.morePacketsVL = violation; // TODO: Accumulate somehow [e.g. always += 1, decrease with continuous moving without violation]?
97
98
            // Violation handling.
99
            final ViolationData vd = new ViolationData(this, player, data.morePacketsVL, violation, cc.morePacketsActions);
100
            if (debug || vd.needsParameters()) {
101
                vd.setParameter(ParameterName.PACKETS, Integer.toString(new Double(violation).intValue()));
102
                vd.setParameter(ParameterName.TAGS, StringUtil.join(tags, "+"));
103
            }
104
            if (executeActions(vd).willCancel()) {
105
                // Set to cancel the move.
106
                /*
107
                 * TODO: Harmonize with MovingUtil.getApplicableSetBackLocation
108
                 * (somehow include the desired set back type / loc / context).
109
                 */
110
                return data.hasMorePacketsSetBack() ? data.getMorePacketsSetBack() : data.getSetBack(to); // TODO
111
            }
112
        } 
113
        else if (allowSetSetBack && data.getMorePacketsSetBackAge() > cc.morePacketsSetBackAge) {
114
            // Update the set back location. (CHANGED to only update, if not a violation.)
115
            // (Might update whenever newTo == null)
116
            data.setMorePacketsSetBack(from);
117
            if (debug) {
118
                debug(player, "Update set back (morepackets) to from.");
119
            }
120
        }
121
122
        // No set back.
123
        return null;
124
125
    }
126
127
}

How it counteracts this module

The movement-rate check invoked from MovingListener on every processed C03-family move, scoring each move into an ActionFrequency window against the 22 packets per second ceiling plus a half-second burst path. It is content-blind to C00 and C0F by construction: only flying packets feed the accumulator, so a module that delays or suppresses keepalives and transactions adds no movement traffic and the check never fires. The brief-pinned relevance is indirect: the module neither increases nor bursts the C03 stream, so MorePackets is an honest non-counter whose mechanism still bounds what a ping spoof can do on the side, and any future variant that also parks movement packets would face the window and burst paths directly.

← Back to Analysis Hub