Hostile 99% java Download

LiteralTrigger.java

legitimate vulnerability reproduction test

Java Base64 malformed-input overrun proofChecks malformed Base64 for sentinel overwrite
SHA-25654a7af94cc34a5cf21d3780ed6c8276013c0dfd17bcf4aad7316ae481349eeed

Also flagged by https://falhumaid.github.io/DFIR_Radar_RSS/rss.xml (Java4Shell: Patch Java, But Check the Processor First).

Evidence

Base64 block literal with invalid padding 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 LiteralTrigger {
7 private static volatile int sink;
8
9 public static void main(String[] args) {
10 Base64.Decoder decoder = Base64.getDecoder();
11 byte[] valid = "A".repeat(64).getBytes(StandardCharsets.US_ASCII);
12 byte[] malformed = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=".getBytes(StandardCharsets.US_ASCII);
13 byte[] target = new byte[4096];
14
15 for (int i = 0; i < 200_000; i++) {
16 sink += decoder.decode(valid, target);
17 }
18
19 Arrays.fill(target, (byte) 0x5a);
20 boolean rejected = false;
21 try {
22 decoder.decode(malformed, target);
23 } catch (IllegalArgumentException expected) {
24 rejected = true;
⋯4 lines
29 int last = -1;
30 for (int i = 50; i < target.length; i++) {
31 if (target[i] != (byte) 0x5a) {
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.