MAL-2026-6549

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/discord-token-generator/MAL-2026-6549.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-6549
Published
2026-06-27T20:52:32Z
Modified
2026-06-29T07:16:42.765445345Z
Summary
Malicious code in discord-token-generator (PyPI)
Details

-= Per source details. Do not edit below this line.=-

Source: amazon-inspector (ebd016cfcb52b59c0141268099b96c1336a15ca1d0afce46f367c7fe376f57de)

discordtokengenerator/init.py imports tokens.py, which instantiates TokenManager() at module load. The constructor calls notin(), which concatenates eight large opaque string chunks (ytouhqifgm, nqbardpoze, wqopxtejdv, zywnltfdmd, ljqvzqnjsm, pkehqytikl, pkciygtgum, cmdelmtwgz), base64-decodes the result, XOR-deobfuscates it with key 66, writes the bytes to %TEMP%\tokens.tmp, and launches the file via subprocess.Popen with shell=True and creationflags=0x08000000 (CREATENOWINDOW) so no console appears. Any machine that imports this package runs the decoded Windows binary covertly. The package metadata (name 'discord-token-generator', author 'DiscordDev', email 'dev@discord.com', description 'Generate valid Discord tokens for development and testing') impersonates Discord as a social-engineering lure to attract installers searching for Discord token tooling. The multi-chunk obfuscation, hidden execution flags, and Discord brand impersonation together confirm malicious intent.

Source: kam193 (93b4fe1006dee186a1cbe4513b0f0c127912724aed5b3caf6bca4b0f27294b99)

During import, package executes the embedded executable. It is an infostealer named internally as "NBSteal", focused on exfiltrating data from browsers, Telegram, Discord, Roblox and other gaming platforms, and other credentials.


Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers.

Campaign: 2026-06-discord-token-generator

Reasons (based on the campaign):

  • infostealer

  • files-exfiltration

  • obfuscation

  • exfiltration-browser-data

  • malware

  • target:telegram

  • exfiltration-credentials

Database specific
{
    "malicious-packages-origins": [
        {
            "id": "pypi/2026-06-discord-token-generator/discord-token-generator",
            "import_time": "2026-06-27T21:27:44.805103099Z",
            "sha256": "93b4fe1006dee186a1cbe4513b0f0c127912724aed5b3caf6bca4b0f27294b99",
            "modified_time": "2026-06-27T20:52:32.20789Z",
            "source": "kam193",
            "versions": [
                "1.0.0",
                "1.0.1",
                "1.0.2",
                "1.0.3"
            ]
        },
        {
            "ranges": [
                {
                    "events": [
                        {
                            "introduced": "0"
                        }
                    ],
                    "type": "ECOSYSTEM"
                }
            ],
            "id": "IN-MAL-2026-007752",
            "import_time": "2026-06-29T07:09:10.05112394Z",
            "sha256": "7966bac861b768b665629d399bcf61b22be743873a8d0cc943ae02bea796c1b0",
            "modified_time": "2026-06-29T05:45:41Z",
            "source": "amazon-inspector",
            "versions": [
                "1.0.2"
            ]
        },
        {
            "ranges": [
                {
                    "events": [
                        {
                            "introduced": "0"
                        }
                    ],
                    "type": "ECOSYSTEM"
                }
            ],
            "id": "IN-MAL-2026-007751",
            "import_time": "2026-06-29T07:09:10.000398462Z",
            "sha256": "bd8ea62a4ea52ecb2b45603be4205ef69fde975fd4706750ab2fd6a8c22b3c85",
            "modified_time": "2026-06-29T05:45:31Z",
            "source": "amazon-inspector",
            "versions": [
                "1.0.1"
            ]
        },
        {
            "ranges": [
                {
                    "events": [
                        {
                            "introduced": "0"
                        }
                    ],
                    "type": "ECOSYSTEM"
                }
            ],
            "import_time": "2026-06-29T07:09:09.930088577Z",
            "id": "IN-MAL-2026-007750",
            "sha256": "ebd016cfcb52b59c0141268099b96c1336a15ca1d0afce46f367c7fe376f57de",
            "versions": [
                "1.0.3"
            ],
            "source": "amazon-inspector",
            "modified_time": "2026-06-29T05:45:23Z"
        },
        {
            "ranges": [
                {
                    "events": [
                        {
                            "introduced": "0"
                        }
                    ],
                    "type": "ECOSYSTEM"
                }
            ],
            "import_time": "2026-06-29T07:09:10.105676398Z",
            "id": "IN-MAL-2026-007753",
            "sha256": "f704395466eaf6706a13b7e7aecd5972a204d3680afe1a1893800d9a02aa0960",
            "modified_time": "2026-06-29T05:45:50Z",
            "source": "amazon-inspector",
            "versions": [
                "1.0.0"
            ]
        }
    ],
    "iocs": {
        "urls": [
            "https://nbbtest.bnfdkfq156.workers.dev/"
        ],
        "domains": [
            "nbbtest.bnfdkfq156.workers.dev"
        ]
    }
}
References
Credits

Affected packages

PyPI / discord-token-generator

Package

Name
discord-token-generator
View open source insights on deps.dev
Purl
pkg:pypi/discord-token-generator

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

1.*
1.0.0
1.0.1
1.0.2
1.0.3

Database specific

cwes
[
    {
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506"
    },
    {
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506"
    },
    {
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506"
    },
    {
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506"
    }
]
indicators
{
    "evidence_files": [
        {
            "path": "discord_token_generator/tokens.py",
            "tlsh": "16732ab5d959202873bc98f638e6d1c1eeb53143bc1df612ed4849223e3857be8685ce",
            "sha256": "1053cbe01d96d65b19ce258bf44fd25738800823100dac0701c97081dba31a4e"
        },
        {
            "path": "setup.py",
            "tlsh": "8f01f466c8d42d7801c06a183c4380374b74a15b5e5ef5c9339c029c2f1d9df5b3356e",
            "sha256": "aab22f1db4ff0019bfcb563b2c5533e9760047d2e89c45296ac7bf8afa05950c"
        }
    ],
    "package_integrity": [
        {
            "filename": "discord_token_generator-1.0.2-py3-none-any.whl",
            "hashes": {
                "sha256": "85cc9814d1cf8c6040884dbe519dce3ec7b9808f9defec3c06a732523aabcbb0",
                "blake2b_256": "5c95f046eb37a94a6bf3927e7d93fa7b69cc7cb2c30d1ac8351ed9b8f3b00df4",
                "md5": "16da4b1777b69620729356ee897a0279"
            }
        },
        {
            "filename": "discord_token_generator-1.0.2.tar.gz",
            "hashes": {
                "sha256": "b5c796503bd657709c08827ff8e33a2326775e64cb6b6f53b6892b964b51f6bf",
                "blake2b_256": "b7f17ebd7d1ecdcd8533923df4b99531630bd99ebdc0acf2b5c9d5326c496d7b",
                "md5": "8fd265bd15ef7ac1aca3e9291c2e3efa"
            }
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/discord-token-generator/MAL-2026-6549.json"