
Script di exploit in Python per CVE-2023-1874, una vulnerabilità di escalation dei privilegi nel plugin WordPress WP Data Access. Consente agli utenti autenticati con privilegi bassi di aumentare il loro ruolo.
QUESTO SCRIPT È PROGETTATO SOLO PER SCOPI DI HACKER ETICO E DIDATTICI. QUALSIASI UTILIZZO DI QUESTO SCRIPT CONTRO UN DISPOSITIVO CHE NON SEI AUTORIZZATO A TESTARE O CHE NON POSSIEDI È DI TUA ESCLUSIVA RESPONSABILITÀ. L'AUTORE DI QUESTO SCRIPT NON SI ASSUME ALCUNA RESPONSABILITÀ PER QUALSIASI COSA TU FACCIA CON QUESTO SCRIPT. LE TUE AZIONI SONO SOLO TUE.
CVE-2023-1874 è una vulnerabilità nel plugin WP Data Access versioni 5.3.7 e precedenti. Un attaccante può fornire l'opzione wpda_role[] durante l'aggiornamento di un profilo per ottenere un'escalation dei privilegi.
Da 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