SSD Advisory – SAP Afaria SQL Injection

Vulnerabilities Summary
The following advisory describes an SQL injection vulnerabilities in the SAP Afaria Service Pack 4 HotFix 15 that can lead to execute arbitrary code.

Credit
An independent security researcher has reported this vulnerability to Beyond Security’s SecuriTeam Secure Disclosure program.

Vendor Responses
SAP Afaria has released patch to address the vulnerability – SP5

Vulnerability Details
When Afaria installed on mobile device, the user is given an “enrollment code” which is used to identify the relay server. This enrollment code is a URI on tinyurl that redirects to the relay server so that users do not have to type in the https://FQDN/path.

The following two HTTP requests can be used to trigger the SQL injection and call the MS SQL Server’s xp_cmdshell command and cause the SQL server to execute arbitrary code.

Command Injection #1

Command Injection #2

https://blogs.securiteam.com/index.php/feed