
This script is specifically designed to solve the challenge on PentesterLab for the CVE-2013-0156 exploit
For more details on the original exploit script, refer to the gist link CVE-2013-0156
This script is specifically designed to solve the challenge on PentesterLab for the CVE-2013-0156 exploit. You can access the challenge here: PentesterLab - CVE-2013-0156 Challenge.
This Python script is designed to exploit the CVE-2013-0156 vulnerability, a critical remote code execution (RCE) issue in Ruby on Rails applications caused by insecure deserialization of YAML objects. The vulnerability allows an attacker to inject arbitrary code through a crafted YAML payload, leading to code execution on the target server.
Make sure you have the required Python packages installed by running:
pip install requests colorama pyyaml
python exploit.py <URL> <PAYLOAD> [rails3|rails2] [--show ]
python exploit.py http://example.com/payload example_payload rails3 --show
Upon successful execution, the script will display a color-coded output with the following sections:
Request: Shows the URL, headers, and the XML payload being sent. Response: Displays the status code and the response body (truncated for large responses). Success/Failure Notification: Notifies you if the exploit was successful or if any error occurred.
Use Responsibly: This script is designed for educational purposes and should only be used on systems you have permission to test. Unauthorized exploitation of this vulnerability is illegal and unethical. Rails Versions: This script supports Rails 3.x and 2.x. Ensure the target is running a vulnerable version of Rails before attempting the exploit.