Vulnerabilities > CVE-2012-0297 - Permissions, Privileges, and Access Controls vulnerability in Symantec web Gateway 5.0/5.0.1/5.0.2
Attack vector
NETWORK Attack complexity
LOW Privileges required
NONE Confidentiality impact
COMPLETE Integrity impact
COMPLETE Availability impact
COMPLETE Summary
The management GUI in Symantec Web Gateway 5.0.x before 5.0.3 does not properly restrict access to application scripts, which allows remote attackers to execute arbitrary code by (1) injecting crafted data or (2) including crafted data.
Vulnerable Configurations
Part | Description | Count |
---|---|---|
Application | 3 |
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (CAPEC)
- Accessing, Modifying or Executing Executable Files An attack of this type exploits a system's configuration that allows an attacker to either directly access an executable file, for example through shell access; or in a possible worst case allows an attacker to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.
- 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.
- Blue Boxing This type of attack against older telephone switches and trunks has been around for decades. A tone is sent by an adversary to impersonate a supervisor signal which has the effect of rerouting or usurping command of the line. While the US infrastructure proper may not contain widespread vulnerabilities to this type of attack, many companies are connected globally through call centers and business process outsourcing. These international systems may be operated in countries which have not upgraded Telco infrastructure and so are vulnerable to Blue boxing. Blue boxing is a result of failure on the part of the system to enforce strong authorization for administrative functions. While the infrastructure is different than standard current applications like web applications, there are historical lessons to be learned to upgrade the access control for administrative functions.
- Restful Privilege Elevation Rest uses standard HTTP (Get, Put, Delete) style permissions methods, but these are not necessarily correlated generally with back end programs. Strict interpretation of HTTP get methods means that these HTTP Get services should not be used to delete information on the server, but there is no access control mechanism to back up this logic. This means that unless the services are properly ACL'd and the application's service implementation are following these guidelines then an HTTP request can easily execute a delete or update on the server side. The attacker identifies a HTTP Get URL such as http://victimsite/updateOrder, which calls out to a program to update orders on a database or other resource. The URL is not idempotent so the request can be submitted multiple times by the attacker, additionally, the attacker may be able to exploit the URL published as a Get method that actually performs updates (instead of merely retrieving data). This may result in malicious or inadvertent altering of data on the server.
- Target Programs with Elevated Privileges This attack targets programs running with elevated privileges. The attacker would try to leverage a bug in the running program and get arbitrary code to execute with elevated privileges. For instance an attacker would look for programs that write to the system directories or registry keys (such as HKLM, which stores a number of critical Windows environment variables). These programs are typically running with elevated privileges and have usually not been designed with security in mind. Such programs are excellent exploit targets because they yield lots of power when they break. The malicious user try to execute its code at the same level as a privileged system call.
D2sec
name Symantec Web Gateway 5.0.2 LFI url http://www.d2sec.com/exploits/symantec_web_gateway_5.0.2_lfi.html name Symantec Web Gateway 5.0.2 RCE url http://www.d2sec.com/exploits/symantec_web_gateway_5.0.2_rce.html
Exploit-Db
description Symantec Web Gateway 5.0.2.8 Command Execution Vulnerability. CVE-2012-0297. Remote exploit for linux platform id EDB-ID:18942 last seen 2016-02-02 modified 2012-05-28 published 2012-05-28 reporter metasploit source https://www.exploit-db.com/download/18942/ title Symantec Web Gateway 5.0.2.8 Command Execution Vulnerability description symantec Web gateway 5.0.2.8 - Multiple Vulnerabilities. CVE-2012-0297,CVE-2012-0298. Webapps exploit for linux platform id EDB-ID:19406 last seen 2016-02-02 modified 2012-06-27 published 2012-06-27 reporter S2 Crew source https://www.exploit-db.com/download/19406/ title symantec Web gateway 5.0.2.8 - Multiple Vulnerabilities description Symantec Web Gateway 5.0.2.8 ipchange.php Command Injection. CVE-2012-0297. Webapps exploit for php platform id EDB-ID:19065 last seen 2016-02-02 modified 2012-06-12 published 2012-06-12 reporter metasploit source https://www.exploit-db.com/download/19065/ title Symantec Web Gateway 5.0.2.8 ipchange.php Command Injection description Symantec Web Gateway 5.0.2 Remote LFI root Exploit. CVE-2012-0297. Remote exploit for linux platform id EDB-ID:18932 last seen 2016-02-02 modified 2012-05-26 published 2012-05-26 reporter muts source https://www.exploit-db.com/download/18932/ title Symantec Web Gateway 5.0.2 - Remote LFI Root Exploit
Metasploit
description This module exploits a command injection vulnerability found in Symantec Web Gateway's HTTP service due to the insecure usage of the exec() function. This module abuses the spywall/ipchange.php file to execute arbitrary OS commands without authentication. id MSF:EXPLOIT/LINUX/HTTP/SYMANTEC_WEB_GATEWAY_EXEC last seen 2020-06-07 modified 2017-07-24 published 2012-06-10 references reporter Rapid7 source https://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/linux/http/symantec_web_gateway_exec.rb title Symantec Web Gateway 5.0.2.8 ipchange.php Command Injection description This module exploits a vulnerability found in Symantec Web Gateway's HTTP service. By injecting PHP code in the access log, it is possible to load it with a directory traversal flaw, which allows remote code execution under the context of 'apache'. Please note that it may take up to several minutes to retrieve access_log, which is about the amount of time required to see a shell back. id MSF:EXPLOIT/LINUX/HTTP/SYMANTEC_WEB_GATEWAY_LFI last seen 2020-06-11 modified 2017-07-24 published 2012-05-28 references reporter Rapid7 source https://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/linux/http/symantec_web_gateway_lfi.rb title Symantec Web Gateway 5.0.2.8 relfile File Inclusion Vulnerability
Nessus
NASL family CGI abuses NASL id SYMANTEC_WEB_GATEWAY_IPCHANGE_RCE.NASL description The remote web server is hosting a version of Symantec Web Gateway that is affected by a shell command injection vulnerability. The ipchange.php script calls the exec() function with user-controlled input that is not properly sanitized. A remote, unauthenticated attacker could exploit this to execute arbitrary shell commands as the apache user. After exploitation, obtaining a root shell is trivial. last seen 2020-06-01 modified 2020-06-02 plugin id 59208 published 2012-05-21 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/59208 title Symantec Web Gateway ipchange.php Shell Command Injection (SYM12-006) (intrusive check) code # # (C) Tenable Network Security, Inc. # include("compat.inc"); if (description) { script_id(59208); script_version("1.30"); script_cvs_date("Date: 2019/12/04"); script_cve_id("CVE-2012-0297"); script_bugtraq_id(53444); script_xref(name:"TRA", value:"TRA-2012-03"); script_xref(name:"EDB-ID", value:"19065"); script_name(english:"Symantec Web Gateway ipchange.php Shell Command Injection (SYM12-006) (intrusive check)"); script_summary(english:"Uploads and executes a PHP script"); script_set_attribute(attribute:"synopsis", value: "A web security application hosted on the remote web server has a command injection vulnerability."); script_set_attribute(attribute:"description", value: "The remote web server is hosting a version of Symantec Web Gateway that is affected by a shell command injection vulnerability. The ipchange.php script calls the exec() function with user-controlled input that is not properly sanitized. A remote, unauthenticated attacker could exploit this to execute arbitrary shell commands as the apache user. After exploitation, obtaining a root shell is trivial."); script_set_attribute(attribute:"see_also", value:"https://www.tenable.com/security/research/tra-2012-03"); script_set_attribute(attribute:"see_also", value:"https://www.zerodayinitiative.com/advisories/ZDI-12-090/"); # https://support.symantec.com/en_US/article.SYMSA1250.html script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?5b5929ae"); script_set_attribute(attribute:"solution", value: "Upgrade to Symantec Web Gateway version 5.0.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:H/RL:OF/RC:C"); script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"); script_set_cvss3_temporal_vector("CVSS:3.0/E:H/RL:O/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:"exploit_framework_core", value:"true"); script_set_attribute(attribute:"d2_elliot_name", value:"Symantec Web Gateway 5.0.2 RCE"); script_set_attribute(attribute:"exploit_framework_d2_elliot", value:"true"); script_set_attribute(attribute:"exploited_by_malware", value:"true"); script_set_attribute(attribute:"metasploit_name", value:'Symantec Web Gateway 5.0.2.8 relfile File Inclusion Vulnerability'); script_set_attribute(attribute:"exploit_framework_metasploit", value:"true"); script_set_attribute(attribute:"exploit_framework_canvas", value:"true"); script_set_attribute(attribute:"canvas_package", value:'D2ExploitPack'); script_set_attribute(attribute:"vuln_publication_date", value:"2012/05/17"); script_set_attribute(attribute:"patch_publication_date", value:"2012/05/17"); script_set_attribute(attribute:"plugin_publication_date", value:"2012/05/21"); script_set_attribute(attribute:"plugin_type", value:"remote"); script_set_attribute(attribute:"cpe", value:"cpe:/a:symantec:web_gateway"); script_end_attributes(); script_category(ACT_DESTRUCTIVE_ATTACK); script_family(english:"CGI abuses"); script_copyright(english:"This script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof."); script_dependencies("symantec_web_gateway_detect.nasl"); script_require_keys("www/symantec_web_gateway"); script_require_ports("Services/www", 443); exit(0); } include("audit.inc"); include("global_settings.inc"); include("misc_func.inc"); include("http.inc"); include("webapp_func.inc"); include("data_protection.inc"); port = get_http_port(default:443, php:TRUE); install = get_install_from_kb(appname:'symantec_web_gateway', port:port, exit_on_fail:TRUE); url = install['dir'] + '/ipchange.php'; filename = strcat('cleaner/', SCRIPT_NAME, '-', unixtime(), '.php'); cmd = 'echo "<? system("id"); ?>" > ' + filename; postdata = 'ip=localhost%0d%0a&subnet="|' + cmd + '|"'; res = http_send_recv3( method:'POST', port:port, item:url, content_type:'application/x-www-form-urlencoded', data:postdata, exit_on_fail:TRUE ); script_creation = http_last_sent_request(); url = install['dir'] + '/' + filename; res = http_send_recv3(method:'GET', item:url, port:port, exit_on_fail:TRUE); if(!egrep(pattern:'uid=[0-9]+.*gid=[0-9]+.*', string:res[2])) audit(AUDIT_WEB_APP_NOT_AFFECTED, 'Symantec Web Gateway', build_url(qs:install['dir'], port:port)); if (report_verbosity > 0) { report = '\nNessus created a PHP file by sending the following request :\n\n' + crap(data:"-", length:30)+' Request '+ crap(data:"-", length:30)+'\n'+ chomp(script_creation) + '\n' + crap(data:"-", length:30)+' Request '+ crap(data:"-", length:30)+'\n'+ '\nThis file executes the "id" command and is located at :\n\n' + build_url(qs:url, port:port) + '\n'; if (report_verbosity > 1) report += '\nRequesting this file returned the following output :\n\n' + data_protection::sanitize_uid(output:chomp(res[2])) + '\n'; security_hole(port:port, extra:report); } else security_hole(port);
NASL family CGI abuses NASL id SYMANTEC_WEB_GATEWAY_SYM12-006.NASL description According to its self-reported version number, the remote web server is hosting Symantec Web Gateway before version 5.0.3, which has the following vulnerabilities : -There are multiple cross-site scripting vulnerabilities. (CVE-2012-0296) - Multiple shell command injection and local file inclusion vulnerabilities exist that could lead to arbitrary code execution. (CVE-2012-0297) - Unauthenticated users are allowed to read/delete arbitrary files as root. (CVE-2012-0298) - A file upload vulnerability exists that could lead to arbitrary code execution. (CVE-2012-0299) A remote, unauthenticated attacker could exploit the code execution vulnerabilities to execute commands as the apache user. After exploitation, obtaining a root shell is trivial. last seen 2020-06-01 modified 2020-06-02 plugin id 59209 published 2012-05-21 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/59209 title Symantec Web Gateway < 5.0.3 Multiple Vulnerabilities (SYM12-006) (version check)
Packetstorm
data source https://packetstormsecurity.com/files/download/114231/symantecwg-lfiexec.txt id PACKETSTORM:114231 last seen 2016-12-05 published 2012-06-27 reporter S2 Crew source https://packetstormsecurity.com/files/114231/Symantec-Web-Gateway-5.0.28-LFI-Code-Execution.html title Symantec Web Gateway 5.0.28 LFI / Code Execution data source https://packetstormsecurity.com/files/download/113090/symantec_web_gateway_lfi.rb.txt id PACKETSTORM:113090 last seen 2016-12-05 published 2012-05-28 reporter unknown source https://packetstormsecurity.com/files/113090/Symantec-Web-Gateway-5.0.2.8-Command-Execution.html title Symantec Web Gateway 5.0.2.8 Command Execution data source https://packetstormsecurity.com/files/download/113485/symantec_web_gateway_exec.rb.txt id PACKETSTORM:113485 last seen 2016-12-05 published 2012-06-11 reporter Tenable Network Security source https://packetstormsecurity.com/files/113485/Symantec-Web-Gateway-5.0.2.8-ipchange.php-Command-Injection.html title Symantec Web Gateway 5.0.2.8 ipchange.php Command Injection data source https://packetstormsecurity.com/files/download/113050/symantecwg-lfi.txt id PACKETSTORM:113050 last seen 2016-12-05 published 2012-05-26 reporter muts source https://packetstormsecurity.com/files/113050/Symantec-Web-Gateway-5.0.2-Local-File-Inclusion.html title Symantec Web Gateway 5.0.2 Local File Inclusion
Saint
bid | 53444 |
description | Symantec Web Gateway access_log PHP Injection |
id | misc_av_symantec_webgatewayver |
osvdb | 82023 |
title | symantec_web_gateway_access_log_rce |
type | remote |
Seebug
bulletinFamily | exploit |
id | SSV:73332 |
last seen | 2018-07-03 |
modified | 2014-07-01 |
published | 2014-07-01 |
reporter | Knownsec |
source | https://www.seebug.org/vuldb/ssvid-73332 |
title | symantec web gateway 5.0.2.8 - Multiple Vulnerabilities |