The SAP in-memory relational database management system, HANA, is affected by a serious security issue, the static encryption key is stored in the database.
The fact that the encryption key is static means that every SAP HANA installation by default use the same key, an attacker that is able to access it can potentially hack several systems.
The researchers at ERPScan presented the security issue during the Black Hat hacking conference held in Amsterdam. The same team recently disclosed serious configuration flaws in Oracle PeopleSoft products.
According to Alexander Polyakov, chief technology officer of ERPScan, an attacker could run several types of attacks such as a SQL injection attack to steal the key stored in the SAP database, a directory traversal or an XML external entity attack.
The default encryption key is used to protect data managed by the platform, including passwords and platform backups.
Since the encryption key is static and the same for every SAP HANA installation by default, an attacker with access would be able to read an encrypted data store.
Polyakov remarked that SAP admins rarely change the default encryption key exposing their installations to the attacks.
“The software ships with a default configuration and the user can actually change this configuration as it says in the security guide. But this document is quite complex (170 pages),” Polyakov said.
The security expert Dmitry Chastuhin from ERPScan publicly disclosed the encryption vulnerability and also a SQL injection bug in Hana XS Server that was already patched by SAP.
The experts explained that SAP uses a storage dubbed hdbuserstore to archive HANA data at regular savepoints, the worrying thing is that almost every ERPScan customer using HANA still uses the default master key to encrypt hdbuserstore.
“Some data is actually stored on the disc. For example, some technical user accounts and passwords along with keys for decrypting savepoints are stored in storage named hdbuserstore.,” Polyakov said. “This storage is a simple file on the disc. It is encrypted using 3DES algorithm with a static master key. Once you have access to this file and decrypt it with static master key, which is the same on every installation, you get system user passwords and keys for disk encryption. After that, you can get access to all data.”
Chastuhin also discovered a similar encryption flaw that affects the SAP Mobile platform, also in this case the application uses a known static key protecting its data. The researcher explained that an attacker can exploit a XXE vulnerability to access the configuration file that contains a password and decrypt is using the static key.
(Security Affairs – SAP HANA, hacking)