SNITCH
Server-side Notifier Inspecting Translation To Catch Hackers
一款 Paper/Spigot 插件,通过利用 MC-265322(签名翻译漏洞)来检测客户端模组(和资源包)。服务器会伪造一个不可见的告示牌,将模组的翻译键与一个备用词一起填入其中,打开并强制关闭告示牌编辑器,然后读取客户端返回的文本。如果返回的文本与备用词不同,说明该翻译键在客户端被解析了——这意味着安装了该模组(或定义了该键的资源包)。
⚠️ 适用于在自己服务器上检测模组的服务器管理员。 这依赖于已知的客户端漏洞。对于希望阻止此行为的玩家,存在补丁模组(例如由 Nick Overflow 开发的)。请负责任地使用,并遵守您所在司法管辖区的规则。
工作原理
针对每位玩家,SNITCH 运行以下数据包序列(模仿了启发它的视频中的技术):
- Block Change → 在玩家下方几个方块处放置一个一次性告示牌(始终不可见)。
- Block Entity Data → 设置告示牌的行内容为可翻译组件,每行携带一个唯一的随机备用词。
- Open Sign Editor → 客户端打开编辑器并将翻译键转换为纯文本。
- Container Close → 强制关闭编辑器;客户端报告解析后的文本。
- Update Sign (inbound) → SNITCH 将每一行与其备用词进行比较。不匹配 = 键被解析 = 检测到模组。
- Block Change → 将假告示牌恢复为真实方块。
单个告示牌承载四行内容,因此可以一次探测四个键。批次是顺序发送的——只有在收到前一批次的响应后,才会发送下一批次。这防止了在安装多个模组时出现键不匹配的情况。
扫描在加入服务器后不久、地形加载屏幕期间触发,因此玩家永远不会看到编辑器 GUI。
安装
- 安装 ProtocolLib(必需)。
- 将
SNITCH-x.x.x.jar 放入 plugins/ 目录。
- 启动服务器 ——
plugins/SNITCH/config.yml 将以默认值生成。
- 设置您的
server-name,配置 mods:,然后执行 /snitch reload。
要求: Paper/Spigot 1.21.x,Java 21,ProtocolLib。
配置
服务器名称
通过 %server% 占位符显示在踢出和封禁消息中:
server-name: "My Server"
标记操作
每次玩家因同一模组被抓到,其对该模组的标记计数会增加。您可以配置在每个计数下发生什么:
action:
flags:
1: KICK # 首次检测 → 踢出
2: BAN # 第二次检测 → 永久封禁
# 任何未列出的计数默认为 LOG(仅限控制台)。
kick-message: "&cYou have been kicked from &e%server%&c: &f%mod% &cis not allowed."
ban-message: "&cYou have been permanently banned from &e%server%&c for using &f%mod%&c."
支持的操作:LOG、KICK、BAN。
可选的控制台命令会在每次检测时运行,无论标记操作如何。占位符:%player%、%mod%、%key%、%evidence%、%flag%、%server%:
commands:
- "tellraw @a[permission=snitch.admin] {\"text\":\"[SNITCH] %player% flagged for %mod% (flag %flag%)\",\"color\":\"red\"}"
配置模组
每个模组条目将一个友好名称映射到一组翻译键列表。只要任何一个键被解析,玩家就会被标记——每个模组的多个键可以提供更可靠的检测。
要查找模组的真实键,打开其 .jar 文件(它只是一个 zip 包)并阅读 assets/<modid>/lang/en_us.json。错误的键只会导致永不匹配——没有误报。
mods:
Freecam:
- "key.freecam.toggle"
- "key.freecam.config.open"
- "key.freecam.controlPlayer.toggle"
MeteorClient:
- "key.meteor-client.open-gui"
- "key.meteor-client.open-commands"
- "key.category.meteor-client.meteor-client"
注意: 没有语言文件的模组(如 baritone-meteor 这样的纯库/混合器模组)无法通过此技术进行检测。
命令
所有命令均在 /snitch 下(权限 snitch.admin):
| 命令 |
描述 |
/snitch list |
显示所有模组及其键 |
/snitch add <mod> <translation.key> |
向模组添加一个键(如果是新模组则创建,保存并重载) |
/snitch remove <mod> <translation.key> |
从模组中移除一个键(如果没有剩余键则移除模组条目) |
/snitch removemod <mod> |
移除整个模组及其所有键 |
/snitch scan [player] |
立即运行扫描 |
/snitch reload |
从磁盘重载 config.yml |
/snitch info |
显示服务器名称、模组/键数量以及配置的标记操作 |
拥有 snitch.bypass 权限的玩家永远不会被扫描。所有子命令均支持 Tab 补全。
构建
mvn package
# -> target/SNITCH-x.x.x.jar
注意事项
- 版本敏感性。 基于 1.21 的数据包布局构建。如果某批次从未报告,请在配置中调整
close-delay-ticks。
- 游戏内扫描(对已加载的玩家使用
/snitch scan)可能会短暂闪烁告示牌编辑器。加入时的扫描则不会。
- 这是对真实客户端漏洞的攻击。Mojang 可能会修补它,客户端补丁模组也可以阻止它。
- 没有语言文件的模组(纯库、仅混合器)无法通过此技术进行检测。
许可证
按原样提供,用于教育和服务器管理目的。
SNITCH
Server-side Notifier Inspecting Translation To Catch Hackers
A Paper/Spigot plugin that detects client-side mods (and resource packs) by abusing MC-265322 — the sign-translation vulnerability. The server fabricates an invisible sign, stuffs a mod's translation key into it with a fallback word, opens and force-closes the sign editor, and reads back the text the client reports. If the returned text differs from the fallback, that translation key resolved on the client — meaning the mod (or a resource pack defining the key) is installed.
⚠️ For server operators detecting mods on their own server. This relies on a known client vulnerability. A patch mod (e.g. by Nick Overflow) exists for players who want to block it. Use responsibly and within your jurisdiction's rules.
How it works
For each player, SNITCH runs this packet sequence (mirroring the technique from the video that inspired it):
- Block Change → place a throwaway sign a few blocks below the player (never visible).
- Block Entity Data → set the sign's lines to translatable components, each carrying a unique random fallback word.
- Open Sign Editor → the client opens the editor and converts the translation keys to plain text.
- Container Close → forces the editor closed; the client reports the resolved text.
- Update Sign (inbound) → SNITCH compares each line to its fallback. A mismatch = the key resolved = mod detected.
- Block Change → revert the fake sign to the real block.
A single sign carries four lines, so keys are probed four at a time. Batches are sent sequentially — the next batch only fires after the previous one gets a response. This prevents key mismatches when multiple mods are installed.
The scan fires shortly after join, during the terrain-loading screen, so the editor GUI is never seen.
Install
- Install ProtocolLib (required).
- Drop
SNITCH-x.x.x.jar into plugins/.
- Start the server —
plugins/SNITCH/config.yml is generated with defaults.
- Set your
server-name, configure mods:, then /snitch reload.
Requirements: Paper/Spigot 1.21.x, Java 21, ProtocolLib.
Configuration
Server name
Shown in kick and ban messages via the %server% placeholder:
server-name: "My Server"
Flag actions
Each time a player is caught with the same mod, their flag count for that mod increases. You configure what happens at each count:
action:
flags:
1: KICK # first detection → kick
2: BAN # second detection → permanent ban
# Any count not listed defaults to LOG (console only).
kick-message: "&cYou have been kicked from &e%server%&c: &f%mod% &cis not allowed."
ban-message: "&cYou have been permanently banned from &e%server%&c for using &f%mod%&c."
Supported actions: LOG, KICK, BAN.
Optional console commands run on every detection regardless of the flag action. Placeholders: %player%, %mod%, %key%, %evidence%, %flag%, %server%:
commands:
- "tellraw @a[permission=snitch.admin] {\"text\":\"[SNITCH] %player% flagged for %mod% (flag %flag%)\",\"color\":\"red\"}"
Configuring mods
Each mod entry maps a friendly name to a list of translation keys. The player is flagged as soon as any one key resolves — multiple keys per mod give more reliable detection.
To find the real keys for a mod, open its .jar (it's just a zip) and read assets/<modid>/lang/en_us.json. A wrong key simply never matches — there are no false positives.
mods:
Freecam:
- "key.freecam.toggle"
- "key.freecam.config.open"
- "key.freecam.controlPlayer.toggle"
MeteorClient:
- "key.meteor-client.open-gui"
- "key.meteor-client.open-commands"
- "key.category.meteor-client.meteor-client"
Note: Mods with no lang file (pure library/mixin mods like baritone-meteor) cannot be detected via this technique.
Commands
All under /snitch (permission snitch.admin):
| Command |
Description |
/snitch list |
Show all mods and their keys |
/snitch add <mod> <translation.key> |
Add a key to a mod (creates mod if new, persists + reloads) |
/snitch remove <mod> <translation.key> |
Remove one key from a mod (removes mod entry if no keys left) |
/snitch removemod <mod> |
Remove an entire mod and all its keys |
/snitch scan [player] |
Run a scan immediately |
/snitch reload |
Reload config.yml from disk |
/snitch info |
Show server name, mod/key count, and configured flag actions |
Players with snitch.bypass are never scanned. Tab completion works on all subcommands.
Building
mvn package
# -> target/SNITCH-x.x.x.jar
Caveats
- Version sensitivity. Built against the 1.21 packet layout. If a batch never reports, tune
close-delay-ticks in the config.
- In-game scans (
/snitch scan on an already-loaded player) may briefly flash a sign editor. Join-time scans do not.
- This is an exploit of a real client bug. Mojang may patch it, and client-side patch mods can block it.
- Mods with no lang file (pure libraries, mixins-only) cannot be detected via this technique.
License
Provided as-is for educational and server-administration purposes.
评论 0
登录后参与评分
还没有评论,来抢沙发吧