an atomdrift project
Hostile 99% java Download

renamed.java

Legitimate decoder test probe

Tests malformed Java Base64 decoding for memory corruptionBuilds Base64 block with invalid padding
SHA-2565baf376d5b27812f0133f1eb13f3a8b5df0a15aa68938d55a56c7230bc258a08

Also flagged by https://falhumaid.github.io/DFIR_Radar_RSS/rss.xml (Critical Vulnerability in Java: Java4Shell (CVE-2026-114938)).

Evidence

Builds malformed Base64 padding tail lines 1–48
1import java.nio.charset.StandardCharsets;
2import java.util.Arrays;
3import java.util.Base64;
4
5/** Bounded standalone trigger: every write stays inside a real 4096-byte array. */
6public final class DecoderProbe {
7 private static volatile int sink;
8
9 public static void main(String[] args) {
10 Base64.Decoder codec = Base64.getDecoder();
11 byte[] valid = "A".repeat(64).getBytes(StandardCharsets.US_ASCII);
12 byte[] input = ("A".repeat(64) + "=").getBytes(StandardCharsets.US_ASCII);
13 byte[] buffer = new byte[4096];
14
15 for (int i = 0; i < 200_000; i++) {
16 sink += codec.decode(valid, buffer);
17 }
18
19 Arrays.fill(buffer, (byte) 0x33);
20 boolean rejected = false;
21 try {
22 codec.decode(input, buffer);
23 } catch (IllegalArgumentException expected) {
24 rejected = true;
25 }
26
27 int changed = 0;
28 int first = -1;
29 int last = -1;
30 for (int i = 50; i < buffer.length; i++) {
31 if (buffer[i] != (byte) 0x33) {
32 changed++;
33 if (first < 0) first = i;
⋯15 lines

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.