Sigma 4.11 PingSpoof module 2 files, 111 lines

Sigma 4.11 PingSpoof: Full Source Analysis

Sigma's PingSpoof is a keepalive buffer-and-flush cycle with no thread of its own.

info/sigmaclient/module/impl/other/PingSpoof.java · GitHub source ↗

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

Analysis

Overview

Sigma's PingSpoof is a keepalive buffer-and-flush cycle with no thread of its own. The outgoing-packet handler intercepts every C00PacketKeepAlive the vanilla client emits while the player is alive, cancels it and parks the original object in a CopyOnWriteArrayList. A timer gated on the WAIT setting (default 15 seconds, range 5-30) then flushes a randomly sized prefix of the buffer through sendPacketNoEvent, which bypasses the event bus so a flushed echo is never re-intercepted, and caps every flush with a fabricated C00PacketKeepAlive carrying the fixed key 10000.

Buffer and flush cycle

The park branch fires for every outgoing C00 while the player is alive: the packet object itself is appended to packetList and the event is cancelled, so the vanilla echo never reaches the wire at its natural time. The flush branch is a true period, not a latch: timer.delay(1000 * WAIT) with timer.reset() at the end of the branch, so the cycle repeats every WAIT seconds. The flush sends a random 0-10 of the parked echoes (MathUtils.getIncremental rounds a uniform 0-10 value to a whole number) before the fixed fake keepalive, and sendPacketNoEvent routes each replay straight to the network manager, keeping it out of the module's own event stream. CopyOnWriteArrayList makes the remove-during-iteration safe.

Server-side ping accounting

The fork's vanilla NetHandlerPlayServer.processKeepAlive (line 1044) only updates the player's ping when the echoed key equals the single stored key field_147378_h, folding the elapsed time as ping = (ping * 3 + elapsed) / 4; any other key is silently dropped with no kick. The server issues a fresh S00PacketKeepAlive every 40 network ticks (update() line 150, key = the send-time millis) and overwrites the stored key, so at the default 15-second WAIT only echoes still holding the current key can update the ping when the flush lands. The older parked echoes and the fabricated key-10000 packet are inert on a stock server; the module's real effect is inflating the measured round trip for the surviving echo, and the fake packet exists purely as noise for servers that count keepalives instead of matching keys.

Wire fingerprint

Every flush concentrates up to 11 C00 packets in a single tick after a 5-30 second silence, the opposite of the vanilla one-echo-per-2-seconds pattern. The fabricated key 10000 repeats on every flush, so an id-tracking server sees a duplicate unexpected reply at a fixed cadence, and a ledger server sees replies arriving seconds after their requests. The module never touches the C0F transaction stream, so the transaction round-trip ledger stays fast while the keepalive ledger is inflated; that divergence between the two ping estimates is the tell the dedicated ping checks are built around.

source PingSpoof.java

PingSpoof.java63 lines · JavaOriginal ↗
1
/**
2
 * Time: 5:26:04 PM
3
 * Date: Jan 10, 2017
4
 * Creator: cool1
5
 */
6
package info.sigmaclient.module.impl.other;
7
8
import info.sigmaclient.event.Event;
9
import info.sigmaclient.event.RegisterEvent;
10
import info.sigmaclient.event.impl.EventPacket;
11
import info.sigmaclient.module.Module;
12
import info.sigmaclient.module.data.ModuleData;
13
import info.sigmaclient.module.data.Setting;
14
import info.sigmaclient.util.MathUtils;
15
import net.minecraft.network.Packet;
16
import net.minecraft.network.play.client.C00PacketKeepAlive;
17
18
import java.util.List;
19
import java.util.concurrent.CopyOnWriteArrayList;
20
21
/**
22
 * @author cool1
23
 */
24
public class PingSpoof extends Module {
25
26
    private info.sigmaclient.util.Timer timer = new info.sigmaclient.util.Timer();
27
    private List<Packet> packetList = new CopyOnWriteArrayList<>();
28
    private String WAIT = "WAIT";
29
30
    public PingSpoof(ModuleData data) {
31
        super(data);
32
        settings.put(WAIT, new Setting<>(WAIT, 15, "Seconds to wait before sending packets again.", 1, 5, 30));
33
    }
34
35
36
    @Override
37
    @RegisterEvent(events = {EventPacket.class})
38
    public void onEvent(Event event) {
39
        if (event instanceof EventPacket) {
40
            EventPacket ep = (EventPacket) event;
41
            if (ep.isOutgoing() && ep.getPacket() instanceof C00PacketKeepAlive && mc.thePlayer.isEntityAlive()) {
42
                packetList.add(ep.getPacket());
43
                event.setCancelled(true);
44
            }
45
            if (timer.delay(1000 * ((Number) settings.get(WAIT).getValue()).intValue())) {
46
                if (!packetList.isEmpty()) {
47
                    int i = 0;
48
                    double totalPackets = MathUtils.getIncremental(Math.random() * 10, 1);
49
                    for (Packet packet : packetList) {
50
                        if (i < totalPackets) {
51
                            i++;
52
                            mc.getNetHandler().getNetworkManager().sendPacketNoEvent(packet);
53
                            packetList.remove(packet);
54
                        }
55
                    }
56
                }
57
                mc.getNetHandler().getNetworkManager().sendPacketNoEvent(new C00PacketKeepAlive(10000));
58
                timer.reset();
59
            }
60
        }
61
    }
62
}

What this file does

The module is the whole mechanism: the EventPacket handler parks every outgoing C00 while the player is alive and cancels it, the timer period decides when the flush runs, and the flush drains a random prefix of the buffer through sendPacketNoEvent before injecting C00PacketKeepAlive(10000). The WAIT setting is the only configuration, converted to milliseconds inside timer.delay. The fake packet is constructed with the hardcoded key 10000, which never matches a server-issued key (the server's keys are send-time millis values), so on vanilla it is dropped at the key comparison while on NCP it registers as an unexpected reply.

The CopyOnWriteArrayList is the carrier for the parked echoes: each entry is the original C00 object, so its key survives unchanged and a server that still tracks that request accepts the late reply and measures the inflated round trip. The random 0-10 flush count keeps the pattern from being perfectly periodic, and timer.reset() at the end of the branch makes the gate a true repeating period rather than the one-shot latch seen in the sibling AutoSoup.

source EventPacket.java (direction guard)

EventPacket.java48 lines · JavaOriginal ↗
1
package info.sigmaclient.event.impl;
2
3
import info.sigmaclient.event.Event;
4
import net.minecraft.network.Packet;
5
6
public class EventPacket extends Event {
7
    private Packet packet;
8
    private boolean outgoing;
9
10
    public boolean isPre() {
11
        return pre;
12
    }
13
14
    public boolean isPost() {
15
        return !pre;
16
    }
17
18
    private boolean pre;
19
20
    public void fire(Packet packet, boolean outgoing) {
21
        this.packet = packet;
22
        this.outgoing = outgoing;
23
        this.pre = true;
24
        super.fire();
25
    }
26
27
    public void fire(Packet packet) {
28
        this.packet = packet;
29
        this.pre = false;
30
        super.fire();
31
    }
32
33
    public Packet getPacket() {
34
        return packet;
35
    }
36
37
    public void setPacket(Packet packet) {
38
        this.packet = packet;
39
    }
40
41
    public boolean isOutgoing() {
42
        return outgoing;
43
    }
44
45
    public boolean isIncoming() {
46
        return !outgoing;
47
    }
48
}

What this file does

EventPacket is the wrapper the module hooks: NetworkManager.sendPacket fires fire(packet, true) for every serverbound packet and the channel read path fires fire(packet, false), so isOutgoing() distinguishes the two directions. PingSpoof gates its park branch on isOutgoing() and instanceof C00PacketKeepAlive, which is what keeps the flush from re-parking: the replay goes through sendPacketNoEvent straight to the network manager, never through the event dispatch, so the buffer drains without re-entering the handler.

The class also shows the pre/post split (fire(packet, outgoing) sets pre true, the single-argument overload sets it false), the mechanism that lets other Sigma modules mutate packets in the pre phase before serialization. For PingSpoof the relevant surface is the outgoing flag and the cancelable event, since the module cancels instead of mutating.

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 PingSpoofB (keepalive vs transaction divergence)

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

PingSpoofB compares the two ping estimates Frequency maintains. keepAlivePing is the S00-to-C00 round trip: ConnectionManager.onKeepAlive looks up the echoed identification in the map of outstanding keepalive send times and stores now minus that timestamp. transactionPing is the C0F round trip measured the same way. The check runs on every C03 movement packet and fails when keepAlivePing exceeds transactionPing by more than 50ms, with the standard exemptions (lag, teleport, TPS, chunk) and a 10-tick post-join grace absent.

Sigma's PingSpoof inflates exactly the number this check keys on. The parked echoes keep their original keys, so the id lookup still succeeds when a replay lands, and the measured keepAlivePing becomes the 5-30 second delay instead of tens of milliseconds. transactionPing is untouched because the module never delays C0F transactions, which stay at their normal sub-100ms round trip. The divergence is seconds, orders of magnitude beyond the 50ms threshold, so the check fails on the first movement packet after a flush and on every flush thereafter. This is the direct counter to the module's core mechanism.

anticheat KeepAliveFrequency (keepalive id 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 vanilla's accept-any-echo keepalive model with an id-tracked ledger. The ProtocolLib KeepAliveAdapter records every outgoing S00 id into NetData.keepAliveRequests with a 30-second age limit and a 40-entry cap, and recordKeepAlivePacket matches each incoming C00 against it. A reply that matches a still-pending request sets keepAliveExpectedResponse and the check bails, which means the module's delayed echoes pass as long as their ids are still live in the ledger. A reply with no pending request is counted into keepAliveFreq, a 1-second-bucket ActionFrequency, and the newest bucket scoring above 1f (2f without the duplicate-id path) triggers a violation with cancel actions from vl>10.

The fabricated key-10000 packet is the module's self-inflicted wound on this ledger: id 10000 never matches a server-issued request, so every flush counts an unexpected reply, and because the same key repeats on every flush the duplicate-id flag tightens the newest-bucket limit to 1f. Any flush that delivers a second counted reply in the same second trips the violation: an echo whose request aged past 30 seconds at the maximum WAIT setting, a request cleared by a world change or rejoin, or an overflow past the 40-entry cap. The default 15-second single-echo pattern sits inside the ledger's tolerance, so this check scores the burst and maximum-delay configurations rather than the benign default.

anticheat PingSpoofA (transaction vs keepalive divergence)

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

PingSpoofA is the mirror check in the same pair: it fails when transactionPing exceeds keepAlivePing by more than 50ms under the same exemptions. That direction is the signature of the C0F-delay family, clients that cancel or park transaction confirmations so the transaction round trip inflates while keepalives stay honest, which is how transaction-buffering disabler modes on other clients present. Sigma's PingSpoof moves the keepalive side instead, so the inequality runs the wrong way and this check never fires against it.

The entry is included as the honest boundary of the pair: the two checks together cover both directions of ping divergence, and a server running the pair catches a client that delays either ledger. Against this specific module PingSpoofB is the live half and PingSpoofA is the dormant sibling, which is the detail an admin needs to know when reading a flag report.

anticheat NegativeTimer (movement clock, slow direction)

NegativeTimer.java56 lines · Java
1
package ac.grim.grimac.checks.impl.timer;
2
3
import ac.grim.grimac.api.config.ConfigManager;
4
import ac.grim.grimac.api.storage.verbose.Verbose;
5
import ac.grim.grimac.checks.CheckData;
6
import ac.grim.grimac.checks.type.PacketReceiveListener;
7
import ac.grim.grimac.checks.type.PostPredictionListener;
8
import ac.grim.grimac.player.GrimPlayer;
9
import ac.grim.grimac.utils.anticheat.update.PredictionComplete;
10
import com.github.retrooper.packetevents.event.PacketReceiveEvent;
11
import org.jetbrains.annotations.NotNull;
12
13
@CheckData(name = "NegativeTimer", stableKey = "grim.timer.negative", description = "Sent movement packets slower than the expected client tick rate", setback = -1, experimental = true)
14
public class NegativeTimer extends Timer implements PacketReceiveListener, PostPredictionListener {
15
    private static final Verbose V = Verbose.of("-{ulong}ms");
16
17
    public NegativeTimer(GrimPlayer player) {
18
        super(player);
19
        timerBalanceRealTime = System.nanoTime() + clockDrift;
20
    }
21
22
    @Override
23
    public void onPrePredictionPacketReceive(PacketReceiveEvent event) {
24
        // NegativeTimer runs the inherited timer processing during normal packet dispatch.
25
    }
26
27
    @Override
28
    public void onPacketReceive(PacketReceiveEvent event) {
29
        super.onPrePredictionPacketReceive(event);
30
    }
31
32
    @Override
33
    public void onPredictionComplete(final PredictionComplete predictionComplete) {
34
        // We can't negative timer check a 1.9+ player who is standing still.
35
        if (player.uncertaintyHandler.lastPointThree.hasOccurredSince(2) || !predictionComplete.isChecked()) {
36
            timerBalanceRealTime = System.nanoTime() + clockDrift;
37
        }
38
39
        if (timerBalanceRealTime < lastMovementPlayerClock - clockDrift) {
40
            int lostMS = (int) ((System.nanoTime() - timerBalanceRealTime) / 1e6);
41
            flagWithSetback(V.write(verbose()).ulong(lostMS));
42
            timerBalanceRealTime += 50e6;
43
        }
44
    }
45
46
    @Override
47
    public void doCheck(final PacketReceiveEvent event) {
48
        // We don't know if the player is ticking stable, therefore we must wait until prediction
49
        // determines this.  Do nothing here!
50
    }
51
52
    @Override
53
    public void onReload(@NotNull ConfigManager config) {
54
        clockDrift = (long) (config.getDoubleElse(getConfigName() + ".drift", 1200.0) * 1e6);
55
    }
56
}

How it counteracts this module

Grim's NegativeTimer punishes a client whose movement packets arrive slower than the expected tick rate: it seeds a real-time balance from the clock-drift allowance (default 1200ms) and, on each prediction completion, flags when the player's movement clock falls more than the drift behind real time, then re-seeds the balance. The ledger is driven entirely by the movement and transaction stream, not by keepalives. Sigma's PingSpoof never touches C0F and never pauses the movement stream, so the player's movement clock advances normally and the balance never goes negative; the delayed C00 echoes are outside the check's accounting entirely.

The honest conclusion is that no Grim check in the corpus scores C00 ping spoofing: the timer family guards the transaction side of the protocol, which is exactly the side this module leaves alone. The entry documents that boundary so the countering picture is complete: the module's surface is the keepalive stream, and the checks that live there are the Frequency pair and the NCP ledger.

← Back to Analysis Hub