RatOrNot
All guides

Threats

How Minecraft token stealers work

Last updated November 16, 2026

Stealers do not need to break into anything. They read data your computer already keeps, such as your game session, Discord login and browser cookies, and then send it somewhere. That is why a single bad mod can cost you several accounts at once.

Below is what each kind of stealer reads, how it gets there and what it looks like in code. Understanding the pattern also explains why legitimate mods have no reason to touch most of these locations.

Minecraft session tokens

When you launch the game, the launcher hands it an access token that proves to Minecraft servers who you are. Code running inside the game can read that value through the game's own session object. No file access is needed at all.

  • Yarn names: MinecraftClient.getInstance().getSession().getAccessToken()
  • Mojang names: Minecraft.getInstance().getUser().getAccessToken()
  • Obfuscated names (for example intermediary-style identifiers such as class_320) mean the same calls under different spellings, and stealers often use several at once so that one build works across versions.

An attacker who has the token can typically join servers as you until it expires or is invalidated, and sometimes read the account's profile data. The token is short-lived compared with a password, so stealers send it immediately. Signing out in the launcher, or changing your Microsoft password and signing out everywhere, is the usual way to cut it off.

Launcher account files

Launchers store which accounts you have signed in. Stealers look for files such as launcher_accounts.json in the official .minecraft folder, as well as account files kept by third-party launchers. A mod has no reason to read these, so a path to such a file next to a network call is a strong signal.

Discord tokens

The Discord desktop app stores data in a local storage folder inside your user profile. A typical stealer builds a path from System.getenv("APPDATA") plus discord/Local Storage/leveldb, and the same for the PTB and canary clients. It then walks the files, applies a regular expression for token-shaped strings and collects the matches.

Newer Discord clients store the token encrypted, with a marker prefix of dQw4w9WgXcQ:. The key for that encryption sits in a Local State file and is protected by Windows. Stealers therefore read that file and ask Windows to unprotect the key, usually through the JNA library, and finish with AES in GCM mode. Changing your Discord password invalidates old tokens, and you should also review authorised apps and active devices.

Browser data and wallets

Chromium-based browsers keep a Local State file with an encrypted_key value, plus databases named Login Data and Cookies in each profile. Desktop wallets such as Exodus and Electrum, browser wallet extensions such as MetaMask, and Telegram's tdata folder have well-known locations too. Malware targets these paths directly. The unusual part is not the file access but the context: a game mod walking through a browser profile folder has no benign explanation.

Where the data goes

Stolen data is usually posted to a Discord webhook or to an attacker-controlled web server. The webhook is a web address containing an ID and a secret, and the stealer builds a JSON body with StringBuilder, opens a connection, sets the method to POST and writes the bytes to the output stream. A mod that contains a webhook address and also reads account data is a strong warning sign. See data exfiltration.

Hiding the targets

Because paths like leveldb and Login Data are well known, stealers often hide them as scrambled strings or build the calls through reflection so that a text search finds nothing. RatOrNot decodes common schemes before applying its rules. More in how malicious mods hide from scanners.

Reducing your risk

  • Enable two-step verification on your Microsoft and Discord accounts.
  • Do not store passwords in the browser on a machine where you test unknown mods.
  • Use a separate profile, user account or machine for experiments.
  • Keep crypto wallets on a device that does not run mods.
  • Scan files before adding them to your mods folder, using the scanner.

Normal versus malicious

A mod that reads your username to show it in a menu is normal. A mod that reads your token and makes a network request is not. Display-only reads are scored lower, which is covered in false positives. For the rules that cover this theft, see session-token theft and Discord, browser and wallet stealers. For a current campaign built on it, read about WeedHack.

If you think a stealer already ran, change your passwords from a different, clean device first. The full order of steps is in what to do if you ran an infected mod.