Attacker Value
Unknown
(1 user assessed)
Exploitability
Unknown
(1 user assessed)
User Interaction
Unknown
Privileges Required
Unknown
Attack Vector
Unknown
0

Symantec Web Gateway upload_file Remote Code Execution Vulnerability

Disclosure Date: May 21, 2012
Add MITRE ATT&CK tactics and techniques that apply to this CVE.

Description

The file-management scripts in the management GUI in Symantec Web Gateway 5.0.x before 5.0.3 allow remote attackers to upload arbitrary code to a designated pathname, and possibly execute this code, via unspecified vectors.

Add Assessment

2
Technical Analysis

This vulnerability allows remote attackers to execute arbitrary code on vulnerable installations
of Symantec Web Gateway. Authentication is not required to exploit this vulnerability.

The specific flaw exists because Symantec Web Gateway allows unauthenticated users to upload a file
while preserving the file extension. This allows users to upload additional script files that can
be used to execute remote code from user supplied commands under the context of the webserver.

Details

blocked_file

<?php
	include_once("config/conf.php");
	include_once("config/db.php");
	include_once("includes/util_functions.php");


	if (isset($_POST['submitted']))
	{
		$updated = true;
		unescape_form_vals(); // remove slashes form values	as we are displaying only

		$new_image = $_FILES['new_image'];
		$before_filename = $_POST['before_filename'];
		$after_filename = $_POST['after_filename'];

		$image_query = "select value from mi5_blockpagemsg where name='image_name'";
		$image_result = @mysql_query($image_query);
		$image_row = @mysql_fetch_assoc($image_result);
		$old_image_name = $image_row['value'];
		@mysql_free_result($image_result);
		$image_name = $old_image_name;
		$image_url = $upload_image_url . "/". $image_name;

		if ($new_image['error'] == UPLOAD_ERR_OK && $new_image['size'] > 0) // file is uploaded
		{
			$return_arr = upload_file($new_image, $upload_image_path_temp, "temp");
			if ($return_arr['uploaded'])
			{
				$image_name = $return_arr['new_file_name'];
				$image_url = $upload_image_url_temp . "/". $image_name;
			}
		}
	}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Blocked File Download</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="styles/mi5.css" />
</head>

<body>
<div id="mainContent">

<div id="mainText">
<?php

				if ($image_name == '')
				{
					$image_url = "images/mi5.gif";
				}

			?>
              <img src="<?php echo $image_url . "?t=".time(); ?>" alt="Symantec Defense Centre" style="border: 1px solid #ddd;" /> <hr noshade="noshade" size="1" style="margin-bottom: 10px;" />
<table><tr><!--<td valign="top" style="width: 120px;">

  <p><a href="javascript:history.go(-1);">&laquo; Previous Page</a></p>

</td>-->

<td style="padding-left: 15px; border-left: 1px solid #999;">
<h3>Symantec Enterprise Spygate</h3>
<h1>Downloading this file is prohibited</h1>
  <p><?php echo $before_filename; ?> %%File%%<?php echo $after_filename; ?></p>

<p>If you think this spyware detection was in error, please click here.</p>

</td></tr></table>

</div>
<div class="copyright">&copy; Copyright 2004-2006, Symantec</div>
</div>


</body>
</html>

blocked_url

<?php
	include_once("config/conf.php");
	include_once("config/db.php");
	include_once("includes/util_functions.php");


	if (isset($_POST['submitted']))
	{
		$updated = true;
		unescape_form_vals(); // remove slashes form values	as we are displaying only

		$new_image = $_FILES['new_image'];
		$before_url = $_POST['before_url'];
		$after_url = $_POST['after_url'];

		$image_query = "select value from mi5_blockpagemsg where name='image_name'";
		$image_result = @mysql_query($image_query);
		$image_row = @mysql_fetch_assoc($image_result);
		$old_image_name = $image_row['value'];
		@mysql_free_result($image_result);
		$image_name = $old_image_name;
		$image_url = $upload_image_url . "/". $image_name;

		if ($new_image['error'] == UPLOAD_ERR_OK && $new_image['size'] > 0) // file is uploaded
		{
			$return_arr = upload_file($new_image, $upload_image_path_temp, "temp");
			if ($return_arr['uploaded'])
			{
				$image_name = $return_arr['new_file_name'];
				$image_url = $upload_image_url_temp . "/". $image_name;
			}
		}
	}

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Blocked URL</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="styles/mi5.css" />
</head>

<body>
<div id="mainContent">

<div id="mainText">
<?php				if ($image_name == '')
				{
					$image_url = "images/mi5.gif";
				}

			?>
              <img src="<?php echo $image_url . "?t=".time(); ?>" alt="Symantec Defense Centre" style="border: 1px solid #ddd;" /> <hr noshade="noshade" size="1" style="margin-bottom: 10px;" />
<table><tr><!--<td valign="top" style="width: 120px;">

  <p><a href="javascript:history.go(-1);">&laquo; Previous Page</a></p>

</td>-->

<td style="padding-left: 15px; border-left: 1px solid #999;">
<h3>Symantec Enterprise Spygate</h3>
<h1>Accessing web pages from this URL is prohibited</h1>
  <p><?php echo $before_url; ?> %%URL%%<?php echo $after_url; ?></p>

<p>If you think this spyware detection was in error, please click here.</p>

</td></tr></table>

</div>
<div class="copyright">&copy; Copyright 2004-2006, Symantec</div>
</div>


</body>
</html>
CVSS V3 Severity and Metrics
Base Score:
None
Impact Score:
Unknown
Exploitability Score:
Unknown
Vector:
Unknown
Attack Vector (AV):
Unknown
Attack Complexity (AC):
Unknown
Privileges Required (PR):
Unknown
User Interaction (UI):
Unknown
Scope (S):
Unknown
Confidentiality (C):
Unknown
Integrity (I):
Unknown
Availability (A):
Unknown

General Information

Vendors

  • symantec

Products

  • web gateway 5.0,
  • web gateway 5.0.1,
  • web gateway 5.0.2

Additional Info

Technical Analysis