Lucene search

K
attackerkbAttackerKBAKB:E371A741-0446-47E4-97E5-21715E5EA84A
HistoryMay 21, 2012 - 12:00 a.m.

Symantec Web Gateway upload_file Remote Code Execution Vulnerability

2012-05-2100:00:00
attackerkb.com
14

10 High

CVSS2

Access Vector

NETWORK

Access Complexity

LOW

Authentication

NONE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:N/AC:L/Au:N/C:C/I:C/A:C

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.

Recent assessments:

wchen-r7 at September 12, 2019 6:07pm UTC reported:

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>

<div>
&lt;?php

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

			?&gt;
              <img src alt="Symantec Defense Centre" /> <hr />
<table><tr>

<td>
<h3>Symantec Enterprise Spygate</h3>
<h1>Downloading this file is prohibited</h1>
  <p>&lt;?php echo $before_filename; ?&gt; %%File%%&lt;?php echo $after_filename; ?&gt;</p>

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

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

</div>
<div>&copy; Copyright 2004-2006, Symantec</div>
</div>


&lt;/body&gt;
&lt;/html&gt;

blocked_url

&lt;?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'] &gt; 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;
			}
		}
	}

?&gt;

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

&lt;body&gt;
<div>

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

			?&gt;
              <img src alt="Symantec Defense Centre" /> <hr />
<table><tr>

<td>
<h3>Symantec Enterprise Spygate</h3>
<h1>Accessing web pages from this URL is prohibited</h1>
  <p>&lt;?php echo $before_url; ?&gt; %%URL%%&lt;?php echo $after_url; ?&gt;</p>

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

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

</div>
<div>&copy; Copyright 2004-2006, Symantec</div>
</div>


&lt;/body&gt;
&lt;/html&gt;

Assessed Attacker Value: 0
Assessed Attacker Value: 0Assessed Attacker Value: 0

10 High

CVSS2

Access Vector

NETWORK

Access Complexity

LOW

Authentication

NONE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:N/AC:L/Au:N/C:C/I:C/A:C

Related for AKB:E371A741-0446-47E4-97E5-21715E5EA84A