Pastebin / Raw Text C2 Server

Pastebin_C2 Malware HIGH +7 score

🎮 Minecraft Gameplay Impact

Applications use centralized configuration endpoints to dynamically update announcement banners, retrieve emergency notices, or update server listings without publishing new application builds.

Pastebin_C2 targets modifications that embed direct links to raw text-hosting endpoints (pastebin.com/raw/). In hostile modifications, public pastebins can serve as low-cost dead-drop resolvers: attackers store dynamic command-and-control configurations (such as newly registered Discord webhook URLs, kill-switch flags, or secondary dropper addresses) inside an anonymous text paste. The mod retrieves the raw text via network stream APIs (such as URL.openStream()) on client startup and parses it to update its operational parameters.

While reading public text files does not directly execute code, relying on unauthenticated public pastes allows the creator of the paste to alter the mod's network behavior at any time without the user's awareness or consent.

🔍 Functions & APIs Analyzed

ConstantPool CONSTANT_Utf8

String literal containing a pastebin.com/raw URL endpoint.

💻 Mod Implementation (Dev Source / Mapped)

package com.example.config;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URI;
import java.nio.charset.StandardCharsets;

public class RemoteTextConfigReader {
    private static final String PASTE_URL = "hxxps://pastebin[.]com/raw/<redacted_paste_id>";

    public static String fetchConfiguration() {
        try {
            URI uri = URI.create(PASTE_URL);
            try (InputStream in = uri.toURL().openStream();
                 BufferedReader reader = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8))) {
                StringBuilder builder = new StringBuilder();
                String line;
                while ((line = reader.readLine()) != null) {
                    builder.append(line).append("\n");
                }
                return builder.toString().trim();
            }
        } catch (Exception e) {
            return "";
        }
    }
}

🛡️ Bytecode Signature & Static Detection

The detector inspects string constants in the class constant pool (CONSTANT_Utf8) for URLs matching the raw endpoint pattern of public paste services:

https?://(?:www\.)?pastebin\.com/raw/[a-zA-Z0-9]+

The rule checks for literal strings matching this specific raw text URL structure. The primary technical limitation is that the scanner only evaluates hardcoded pastebin.com/raw strings; if a mod reads dynamic configuration URLs from alternative pastebins (such as Rentry, Hastebin, or GitHub Gists), or if the URL is constructed dynamically from substrings, this rule will not trigger.