Trustwave achieves verified MXDR solution and FastTrack ready partner status from Microsoft. Learn More

Trustwave achieves verified MXDR solution and FastTrack ready partner status from Microsoft. Learn More

Managed Detection & Response

Eradicate cyberthreats with world-class intel and expertise

Managed Security Services

Expand your team’s capabilities and strengthen your security posture

Consulting & Professional Services

Tap into our global team of tenured cybersecurity specialists

Penetration Testing

Subscription- or project-based testing, delivered by global experts

Database Security

Get ahead of database risk, protect data and exceed compliance requirements

Email Security & Management

Catch email threats others miss with layered security & maximum control

Co-Managed SOC (SIEM)

Eliminate alert fatigue, focus your SecOps team, stop threats fast, and reduce cyber risk

Microsoft Exchange Server Attacks
Stay protected against emerging threats
Rapidly Secure New Environments
Security for rapid response situations
Securing the Cloud
Safely navigate and stay protected
Securing the IoT Landscape
Test, monitor and secure network objects
Why Trustwave
The Trustwave Approach
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Platform
SpiderLabs Fusion Center
Security Operations Centers
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
Trustwave PartnerOne Program
Join forces with Trustwave to protect against the most advance cybersecurity threats

SAP ASE Information Leaks: CVE-2020-6295 and CVE-2020-6317


Today I'd like to discuss two information disclosure vulnerabilities that occur in SAP Adaptive Server Enterprise installation process. These days it’s quite common to discover sensitive information in application log files given the amount of data being processed and complexity of today’s products. Adaptive Server Enterprise is a quite complex product having multiple subsystems and some of them are involved in the vulnerabilities discussed below.

CVE-2020-6295: Install Data Leakage of Cockpit Password

Since SAP ASE is a complex product with many parts including but not limited to: the database server itself, backup server, XP server, Cockpit, client components, there several subsystems that write to the installation log file when DBA installs or upgrades an instance. The main installation file on Windows is %SYBASE%\log\ASE_Suite.log and is publicly readable as shown below:

C:\SAP>icacls C:\SAP\log\ASE_Suite.log
Successfully processed 1 files; Failed processing 0 files

This means any local user can read it. Moving on, if the Cockpit component is installed and configured, there will be a line like this in the log file:

DEBUG>>> 05-18-20 21:27:19 : ConfigCockpitLogins.writeRepositoryPassword(): write enRepoPwd=1-AAAAEgQQB+3Q7M42wx5KfB/vy2q4HfZhiEasqjA8vSjPIZbbLrqb9KZFqdpyTBHk7reqCIUzsXIlcMc/jaXtaW8eDvBIqQ==

enRepoPwd is encrypted Cockpit repository password. How can it be decrypted? I did some investigation and found out that there are two more files necessary to decrypt the password:


Surprisingly, both are readable by Everyone! contains keystore password while the csikeystore.jceks is the actual keystore. A very useful script for the research is C:\SAP\COCKPIT-4\bin\passencrypt.bat.

Time for Java proof-of-concept!

public class demo
            public static void main(String[] args) throws Exception
                        String password ="1

To compile:

set COCKPIT_STARTUP_CLASSPATH=%COCKPIT_HOME%\common\classes;%COCKPIT_HOME%\common\lib\commons-cli-1.1.jar;%COCKPIT_HOME%\server\lib\uaf-startup.jar
for %i in (%COCKPIT_HOME%\common\lib\*.jar) do @call set _clientCP=%_clientCP%;%i

To run:

"C:\SAP\Shared\SAPJRE-8_1_062_64BIT\bin\java.exe"\COCKPIT-4\ -cp %COCKPIT_CLIENT_CLASSPATH%;. demo

Once the password is decrypted, it can be used to view, modify and/or make any data associated with the Cockpit unavailable according to SAP note (

CVE-2020-6317: Install Data Leakage of sccadmin and uafadmin Password Hashes

The same log file might contain strings like below if the Cockpit component is installed:

DEBUG>>> 05-18-20 21:27:18 : ConfigCockpitLogins.setCSIUserAndPassword(): write userName=sccadmin
DEBUG>>> 05-18-20 21:27:18 : ConfigCockpitLogins.setCSIUserAndPassword(): write encryptPwd={SHA-256:+EFnOPCybn0=}R2hjILOGw+9HuezqaOETTLEp3aES8tvgllXb8IL9W6E=
DEBUG>>> 05-18-20 21:27:18 : ConfigCockpitLogins.setCSIUserAndPassword(): write userName=uafadmin
DEBUG>>> 05-18-20 21:27:18 : ConfigCockpitLogins.setCSIUserAndPassword(): write encryptPwd={SHA-256:63brIY/QONU=}zmVB11zcCmEvCw/DGoEY01O4y3E0VkFjQwIizR2h6j4=

Essentially, this makes it possible to conduct an offline brute force attack against the accounts mentioned. The first step is to decode the salt from its base64 value and then just loop over a dictionary.


In the end, exploiting the vulnerabilities discussed here will allow a malicious user to either guess privileged user passwords (CVE-2020-6317) or just decrypt it (CVE-2020-6295) and then use compromised accounts for subsequent attacks. Do not wait: apply the vendor-provided patches ASAP.

Trustwave Advisory TWSL2020-006