Vulnerabilities > CVE-2012-5159 - Code Injection vulnerability in PHPmyadmin 3.5.2.2
Attack vector
NETWORK Attack complexity
LOW Privileges required
NONE Confidentiality impact
PARTIAL Integrity impact
PARTIAL Availability impact
PARTIAL Summary
phpMyAdmin 3.5.2.2, as distributed by the cdnetworks-kr-1 mirror during an unspecified time frame in 2012, contains an externally introduced modification (Trojan Horse) in server_sync.php, which allows remote attackers to execute arbitrary PHP code via an eval injection attack. Although not found in all distributions of this software, the vulnerability was scored assuming that it was. End-users will need to identify whether their distribution does in fact contain the vulnerability.
Vulnerable Configurations
Part | Description | Count |
---|---|---|
Application | 1 |
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (CAPEC)
- Leverage Executable Code in Non-Executable Files An attack of this type exploits a system's trust in configuration and resource files, when the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high. The attack can be directed at a client system, such as causing buffer overrun through loading seemingly benign image files, as in Microsoft Security Bulletin MS04-028 where specially crafted JPEG files could cause a buffer overrun once loaded into the browser. Another example targets clients reading pdf files. In this case the attacker simply appends javascript to the end of a legitimate url for a pdf (http://www.gnucitizen.org/blog/danger-danger-danger/) http://path/to/pdf/file.pdf#whatever_name_you_want=javascript:your_code_here The client assumes that they are reading a pdf, but the attacker has modified the resource and loaded executable javascript into the client's browser process. The attack can also target server processes. The attacker edits the resource or configuration file, for example a web.xml file used to configure security permissions for a J2EE app server, adding role name "public" grants all users with the public role the ability to use the administration functionality. The server trusts its configuration file to be correct, but when they are manipulated, the attacker gains full control.
- Manipulating User-Controlled Variables This attack targets user controlled variables (DEBUG=1, PHP Globals, and So Forth). An attacker can override environment variables leveraging user-supplied, untrusted query variables directly used on the application server without any data sanitization. In extreme cases, the attacker can change variables controlling the business logic of the application. For instance, in languages like PHP, a number of poorly set default configurations may allow the user to override variables.
Exploit-Db
description | phpMyAdmin 3.5.2.2 server_sync.php Backdoor. CVE-2012-5159. Webapps exploit for php platform |
id | EDB-ID:21834 |
last seen | 2016-02-02 |
modified | 2012-10-10 |
published | 2012-10-10 |
reporter | metasploit |
source | https://www.exploit-db.com/download/21834/ |
title | phpMyAdmin 3.5.2.2 server_sync.php Backdoor |
Metasploit
description | This module exploits an arbitrary code execution backdoor placed into phpMyAdmin v3.5.2.2 through a compromised SourceForge mirror. |
id | MSF:EXPLOIT/MULTI/HTTP/PHPMYADMIN_3522_BACKDOOR |
last seen | 2020-05-26 |
modified | 2017-07-24 |
published | 2012-09-25 |
references | |
reporter | Rapid7 |
source | https://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/multi/http/phpmyadmin_3522_backdoor.rb |
title | phpMyAdmin 3.5.2.2 server_sync.php Backdoor |
Nessus
NASL family | CGI abuses |
NASL id | PHPMYADMIN_PMASA_2012_5.NASL |
description | The phpMyAdmin install hosted on the remote web server contains a backdoor script, probably obtained from the cdnetworks-kr-1 SourceForge.net mirror site as part of the file phpMyAdmin-3.5.2.2-all-languages.zip. An unauthenticated, remote attacker can use this backdoor to execute arbitrary PHP code on the remote host, subject to the privileges under which the web server operates. Note that the bogus distribution file is also reported to have contained a modified version of the file js/cross_framing_protection.js, although Nessus has not tested for that. |
last seen | 2020-06-01 |
modified | 2020-06-02 |
plugin id | 62312 |
published | 2012-09-26 |
reporter | This script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof. |
source | https://www.tenable.com/plugins/nessus/62312 |
title | phpMyAdmin server_sync.php Backdoor (PMASA-2012-5) |
code |
|
Seebug
bulletinFamily | exploit |
description | BUGTRAQ ID: 55672 CVE ID: CVE-2012-5159 phpMyAdmin是一个用PHP编写的,可以通过web方式控制和操作MySQL数据库。 phpMyAdmin通过"cdnetworks-kr-1" SourceForge mirror系统分发的phpMyAdmin 3.5.2.2及其他版本源文件为phpMyAdmin-3.5.2.2-all-languages.zip,其中包含名为server_sync.php的木马,可允许远程攻击者通过调用eval()攻击执行任意命令。 0 phpMyAdmin 3.5.2.2 厂商补丁: phpMyAdmin ---------- phpMyAdmin已经为此发布了一个安全公告(PMASA-2012-5)以及相应补丁: PMASA-2012-5:PMASA-2012-5 链接:http://www.phpmyadmin.net/home_page/security/PMASA-2012-5.php |
id | SSV:60402 |
last seen | 2017-11-19 |
modified | 2012-09-26 |
published | 2012-09-26 |
reporter | Root |
title | phpMyAdmin 'server_sync.php'远程后门漏洞 |