此脚本仅设计用于白帽子和教育目的。任何将此脚本用于未经授权测试或不属于您的设备的行为,均由您自行承担责任。此脚本作者对您使用此脚本所做的任何事情不承担任何责任。您的行为由您自己负责。
CVE-2023-1874 是 WP Data Access 插件 5.3.7 及更早版本中的一个漏洞。攻击者可以在更新个人资料时提供 wpda_role[] 选项来提升权限。
来自 NIST:
The WP Data Access plugin for WordPress is vulnerable to privilege escalation in versions up to, and including, 5.3.7. This is due to a lack of authorization checks on the multiple_roles_update function. This makes it possible for authenticated attackers, with minimal permissions such as a subscriber, to modify their user role by supplying the 'wpda_role[]' parameter during a profile update. This requires the 'Enable role management' setting to be enabled for the site.
# not necessary.
#
# these can be manually input as arguments to the script.
#
# theses exports are for ease-of-use.
export TARGETIP=localhost
export TARGETPORT=80
export WPPATH=wordpress
export WPUSERNAME=myuser
export WPPASSWORD=mypass
python3 cve20231874.py $TARGETIP $TARGETPORT -u $WPUSERNAME -p $WPPASSWORD --path $WPPATH