
# سكربت استغلال بلغة Python لثغرة CVE-2023-1874 ثغرة تصعيد صلاحيات في إضافة WP Data Access الخاصة بووردبريس. تتيح للمستخدمين المصادقين ذوي الصلاحيات المنخفضة تصعيد دورهم.
هذا السكربت مصمم لأغراض القبعة البيضاء والتعليم فقط. أي استخدام له ضد جهاز غير مصرح لك باختباره أو لا تملكه هو مسؤوليتك الشخصية. مؤلف هذا السكربت لا يتحمل أي مسؤولية عن أي شيء تفعله بهذا السكربت. أفعالك هي مسؤوليتك وحدك.
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