POC详情: c0b2d8e14e9cae464b8fa8999d7263395f73edd0

来源
关联漏洞
标题: JetBrains TeamCity 安全漏洞 (CVE-2024-27198)
描述:JetBrains TeamCity是捷克JetBrains公司的一套分布式构建管理和持续集成工具。该工具提供持续单元测试、代码质量分析和构建问题分析报告等功能。 JetBrains TeamCity 2023.11.4之前版本存在安全漏洞,该漏洞源于存在身份验证绕过漏洞。
介绍
# Cyberspace Mapping Dork

## Fofa

```
app="JET_BRAINS-TeamCity"
```

## ZoomEye

```
app:"JetBrains TeamCity"
```

## Hunter.how

```
product.name="TeamCity"
```

## Shodan

```
http.component:"teamcity"
```

# How to use

I'm using `Python3.9`.

```shell
pip install requests urllib3 faker
```

# [!] Problem

There are currently some problems:
1. If yakit proxy is not used, uploading of malicious plug-ins will fail;
2. After the webshell is uploaded, if you want to make a post request, an error will be reported, as shown below:

![](https://raw.githubusercontent.com/W01fh4cker/blog_image/main/image-20240308230546869.png)

But this problem can also be solved. Just get the X-TC-CSRF-Token corresponding to the session id through a 403 error. For example, I uploaded the webshell ofbehinder3.0 and connected:

![](https://raw.githubusercontent.com/W01fh4cker/blog_image/main/image-20240308230808193.png)

3. There are still some details that need to be improved, such as the removal of malicious plugins, etc.If you have relevant coding skills, you can make pull requests.

# Vulnerability recurrence environment construction

Use docker to pull the vulnerable image and start it:

```shell
sudo docker pull jetbrains/teamcity-server:2023.11.3
sudo docker run -it -d --name teamcity -u root -p 8111:8111 jetbrains/teamcity-server:2023.11.3
# sudo ufw disable
```

Then make basic settings:

![](https://raw.githubusercontent.com/W01fh4cker/blog_image/main/image-20240307232348600.png)

![](https://raw.githubusercontent.com/W01fh4cker/blog_image/main/image-20240307232404056.png)



# Reference

https://www.rapid7.com/blog/post/2024/03/04/etr-cve-2024-27198-and-cve-2024-27199-jetbrains-teamcity-multiple-authentication-bypass-vulnerabilities-fixed/

https://github.com/Chocapikk/CVE-2024-27198
文件快照

[4.0K] /data/pocs/c0b2d8e14e9cae464b8fa8999d7263395f73edd0 ├── [ 18K] CVE-2024-27198-RCE.py └── [1.8K] README.md 0 directories, 2 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
    3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。