Git Product home page Git Product logo

moddetectionpreventer's Introduction

Mod Detection Preventer

⚠️ For now please stop using this mod. Another method of detecting mods has been found, and I am not able to resolve it at this time. Using this mod might cause you to get banned. ⚠️

A simple mod that prevents a security vulnerability allowing servers to detect which mods are installed on the client side.

While I try my best to keep this mod up to date, server admins might find a new method to access your mods-list. It is always recommended that you follow the server rules.

The Vulnerability

Minecraft has a feature that allows text (in chat, on signs, or in the bossbar) to be specified by a keybind the user has set, or a translation key. The Client will then replace the translation key, or the keybind with the stored value. This can be abused by the server by serving the client a sign with such a placeholder (for example Sodium: sodium.option_impact.low). By immediately closing the sign screen, the client sends the edited text to the server without ever seeing a sign open screen. The server can then detect wether you have that specific mod installed, by checking if your client replaced the placeholder with the corresponding text (sodium.option_impact.low -> Low). If you don't have Sodium installed, the placeholder will stay there (sodium.option_impact.low -> sodium.option_impact.low).

This also works on the Anvil screen. The server could prompt you to open the anvil screen, with an item in the renaming slot that has a translation key as it's name. The client would then rename the item to the corresponding value and send an update to the server. (Huge thanks to Frog, @croaak on discord, for figuring this out)

This detection method works for any mod that has custom translations.

The Fix

This mod fixes this issue by simply not resolving any translation or keybind placeholders on signs, except vanilla ones. This makes it impossible for the server to use this method to detect installed mods.

To verify this works you can test it in a test world.

Intentions

While this feature can be used to prevent harm by detecting cheaters early, it is implemented improperly on some servers, including Cytooxien. Immediately banning players upon joining, simply because they have tweakeroo installed, is unacceptable. After a discussion with the developer of Cytooxien, they told me that players won't get banned for using tweakeroo, only kicked repeatedly.

moddetectionpreventer's People

Contributors

justalittlewolf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

moddetectionpreventer's Issues

Possibly incorrect explanation

In the readme, you explain that keybinds have translation keys, which can get resolved by the client when editing a sign. From looking at CytooxienDetectedMods.md however, it seems like many of these translation keys are not keybinds but just translation keys from mods with multi-language support that are using minecraft's language utils to apply the right language.

Examples of translation keys in CytooxienDetectedMods.md:
"config.torohealth.red": "Red" ToroCraft/ToroHealth lang/en_us.json
"jex.name": "Jex Client" DustinRepo/JexClient lang/en_us.json
"liquidbounce.generic.enabled": "Enabled" CCBlueX/LiquidBounce lang/en_us.json

None of the above seem to be related to hotkeys. If this is the case and sign edit replacing for all translation keys is possible, your mod is detectable since you block all translation keys except the vanilla hotkey translation keys, meaning you also block all vanilla non-hotkey translation keys from signs. This is just a theory and It's probably much easier for you to test this than for me to build a test setup from scratch.

Visual preview on client

I think the ideal fix would be to resolve it visually on client but when the server somehow receives it back, the client sends the original string ID.

Would it be feasible to achieve this?

Mod causes resource pack distribution to fatally fail on Cytooxien

When joining Cytooxien with this mod enabled, it causes the resource pack distribution system to completely fail and cause the player to get kicked because there was an validation error - this does not occur when excluding this mod from the fabric client.

Guessing cytooxien patched your mod after all? 🙃

Current status

Asked/searched a few places around and here's what they told

  • Fabric Loader/API - concerned about breaking vanilla/not in scope
  • Sodium - could fix but not interested
  • Minecraft bug tracker - MC-265322 and it was supposed to be fixed in 1.20
  • No Prying Eyes - a small mod where I thought this fix would be interesting to implement in, no response yet

How does the test world work?

I tried replicating the signs by doing a setblock sign which has a translation string, but I am unable to edit that side of the sign on both creative and survival. So what did you change to make it editable?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.