Oracle Remote Diagnostics Agent Command Injection Vulnerability

February 23, 2018

Oracle Remote Diagnostics Agent (RDA) is a command-line diagnostic tool that provides a suite of data collection and diagnostic scripts that aid in the analysis and support of Oracle products. RDA is installed by default for Oracle Fusion Middleware and Weblogic Server.

A command injection vulnerbility exists in RDA. Because the web service class OsUtils doesn't have proper filtering for the HTTP parameter, causing a command injection vulnerability. An attacker could send a certain crafted HTTP POST request, and execute arbitrary command on the target server with the privelege of the web service.

In order to execute scanning commands for the Oracle products, the RDA implements the scanning applications using native applications, and invoke them via web control panels. There are a set of pre-defined command templates inside several XML configuration files, such as oracle_database.xml, oracle_dbmachine.xml and oracle_si_supercluster.xml. For instance:

 

As is shown in the above example, the command parameters could be dynamically assigned from the HTTP parameters, without any filtering. An attacker could use ";" to close the previous command, injecting arbitrary commands, causing a command injection vulnerability.

The cause of the vulnerability is in the OsUtils class:

SonicWall Capture Labs Threat Research team has developed the following signature to identify and stop the attacks:

  • IPS 13196: Oracle Support Tools Command Injection
  • WAF 1676: Oracle WebLogic Remote Diagnosis Assistant rda_tfa_hrs Command Injection