关联漏洞
标题:GitLab 操作系统命令注入漏洞 (CVE-2022-2185)Description:GitLab是美国GitLab公司的一个开源的端到端软件开发平台,具有内置的版本控制、问题跟踪、代码审查、CI/CD(持续集成和持续交付)等功能。 GitLab 存在操作系统命令注入漏洞,该漏洞源于未经授权的用户可能使用以下命令在服务器上执行任意代码 项目导入功能。以下产品版本受到影响:14.10.5 之前的 14.0、15.0.4 之前的 15.0 和 15.1.1 之前的 15.1 开始的所有版本。
Description
wo ee cve-2022-2185 gitlab authenticated rce
介绍
# CVE-2022-2185
wo ee cve-2022-2185 gitlab authenticated rce
read: https://starlabs.sg/blog/2022/07-gitlab-project-import-rce-analysis-cve-2022-2185/
## how to use
First spawn a gitlab instance. Log in, create a group and project with a unique name. Create an access token.
Edit these lines in main.go and compile it:
```go
const importProjectName = "projectwtf"
const runCmd = "/bin/sleep inf"
const proxyTo = "http://localhost:8000/"
```
This mitm runs on `*:8100`. Expose it to the Internet.
Log in to target server. Navigate to create a group - import and enter the local server details. When you are going to import, intercept the request and change it:
- `source_type` to `project_entity`
- `source_full_path` to `your_group/your_project`
- if `destination_namespace` is empty, change it to any non-empty name
- `destination_name` is not empty by design
Pass the modified request to server. Wait 255s to get rce.
Note: the command may be run multiple times.
文件快照
[4.0K] /data/pocs/4012708c475a5a3e085daa08d716906b23702151
├── [2.1K] main.go
└── [ 974] README.md
0 directories, 2 files
备注
1. 建议优先通过来源进行访问。
2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →