Vulnerabilities > CVE-2012-0409 - Improper Restriction of Operations Within the Bounds of A Memory Buffer vulnerability in EMC Autostart

047910
CVSS 7.5 - HIGH
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL
network
low complexity
emc
CWE-119
nessus

Summary

Multiple buffer overflows in EMC AutoStart 5.3.x and 5.4.x before 5.4.3 allow remote attackers to cause a denial of service (agent crash) or possibly execute arbitrary code via crafted packets.

Vulnerable Configurations

Part Description Count
Application
Emc
7

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Overflow Buffers
    Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an attacker. As a consequence, an attacker is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the attackers' choice.
  • Client-side Injection-induced Buffer Overflow
    This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
  • Filter Failure through Buffer Overflow
    In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
  • MIME Conversion
    An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.

Nessus

NASL familyGain a shell remotely
NASL idEMC_AUTOSTART_FTAGENT_ESA-2012-020.NASL
descriptionThe version of EMC AutoStart on the remote host reportedly contains multiple remote code execution vulnerabilities : - The EMC AutoStart ftAgent, when processing messages with opcode 0x32 and subcode 0x04, opcode 0x32 and subcode 0x02, opcode 0x03 and subcode 0x04, opcode 0x55 and subcode 0x16, opcode 0x55 and subcode 0x01, opcode 0x41 and subcode 0x12, opcode 0x32 and subcode 0x3C, opcode 0x32 and subcode 0x2A, performs arithmetic on an unvalidated, user-supplied value used to determine the size of a new heap buffer. This allows a potential integer wrap to cause a heap-based buffer overflow. (ZDI-12-116, ZDI-12-117, ZDI-12-118, ZDI-12-120, ZDI-12-121, ZDI-12-122, ZDI-12-123, ZDI-12-124, respectively) - The EMC AutoStart ftAgent, when processing messages with opcode 0x41 and subcode 0x00, uses an uninitialized stack variable in calculating a memory pointer. Also, the function uses signed extension and signed comparison when checking the uninitialized stack variable, which allows arbitrary negative values to bypass the check. This could result in corruption of a controlled memory location, which can be leveraged to execute code under the context of a privileged user. (ZDI-12-119) Failed attacks may result in a denial of service.
last seen2020-06-01
modified2020-06-02
plugin id61491
published2012-08-10
reporterThis script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
sourcehttps://www.tenable.com/plugins/nessus/61491
titleEMC AutoStart ftAgent Multiple Remote Code Execution Vulnerabilities (ESA-2012-020)
code
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(61491);
  script_version("1.9");
  script_cvs_date("Date: 2019/12/04");

  script_cve_id("CVE-2012-0409");
  script_bugtraq_id(53682);

  script_name(english:"EMC AutoStart ftAgent Multiple Remote Code Execution Vulnerabilities (ESA-2012-020)");
  script_summary(english:"Checks remote version of ftAgent");

  script_set_attribute(attribute:"synopsis", value:
"The remote Windows host has an application that is affected by
multiple remote code execution vulnerabilities.");
  script_set_attribute(attribute:"description", value:
"The version of EMC AutoStart on the remote host reportedly contains
multiple remote code execution vulnerabilities :

  - The EMC AutoStart ftAgent, when processing messages with
    opcode 0x32 and subcode 0x04, opcode 0x32 and subcode 0x02,
    opcode 0x03 and subcode 0x04, opcode 0x55 and subcode 0x16,
    opcode 0x55 and subcode 0x01, opcode 0x41 and subcode 0x12,
    opcode 0x32 and subcode 0x3C, opcode 0x32 and subcode 0x2A,
    performs arithmetic on an unvalidated, user-supplied value
    used to determine the size of a new heap buffer. This allows
    a potential integer wrap to cause a heap-based buffer overflow.
    (ZDI-12-116, ZDI-12-117, ZDI-12-118, ZDI-12-120, ZDI-12-121,
    ZDI-12-122, ZDI-12-123, ZDI-12-124, respectively)

  - The EMC AutoStart ftAgent, when processing messages with opcode
    0x41 and subcode 0x00, uses an uninitialized stack variable in 
    calculating a memory pointer. Also, the function uses signed 
    extension and signed comparison when checking the uninitialized
    stack variable, which allows arbitrary negative values to bypass
    the check. This could result in corruption of a controlled memory
    location, which can be leveraged to execute code under the context
    of a privileged user. (ZDI-12-119)

Failed attacks may result in a denial of service.");
  script_set_attribute(attribute:"see_also", value:"https://www.securityfocus.com/archive/1/522835");
  script_set_attribute(attribute:"see_also", value:"https://www.zerodayinitiative.com/advisories/ZDI-12-116/");
  script_set_attribute(attribute:"see_also", value:"https://www.zerodayinitiative.com/advisories/ZDI-12-117/");
  script_set_attribute(attribute:"see_also", value:"https://www.zerodayinitiative.com/advisories/ZDI-12-118/");
  script_set_attribute(attribute:"see_also", value:"https://www.zerodayinitiative.com/advisories/ZDI-12-119/");
  script_set_attribute(attribute:"see_also", value:"https://www.zerodayinitiative.com/advisories/ZDI-12-120/");
  script_set_attribute(attribute:"see_also", value:"https://www.zerodayinitiative.com/advisories/ZDI-12-121/");
  script_set_attribute(attribute:"see_also", value:"https://www.zerodayinitiative.com/advisories/ZDI-12-122/");
  script_set_attribute(attribute:"see_also", value:"https://www.zerodayinitiative.com/advisories/ZDI-12-123/");
  script_set_attribute(attribute:"see_also", value:"https://www.zerodayinitiative.com/advisories/ZDI-12-124/");
  script_set_attribute(attribute:"see_also", value:"https://www.zerodayinitiative.com/advisories/ZDI-12-159/");
  script_set_attribute(attribute:"see_also", value:"https://www.zerodayinitiative.com/advisories/ZDI-12-160/");
  script_set_attribute(attribute:"see_also", value:"https://www.zerodayinitiative.com/advisories/ZDI-12-161/");
  script_set_attribute(attribute:"see_also", value:"https://seclists.org/fulldisclosure/2012/Aug/281");
  script_set_attribute(attribute:"see_also", value:"https://seclists.org/fulldisclosure/2012/Aug/282");
  script_set_attribute(attribute:"see_also", value:"https://seclists.org/fulldisclosure/2012/Aug/283");
  script_set_attribute(attribute:"solution", value:
"Upgrade to version 5.4.3 or later.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
  script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2012-0409");

  script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"false");

  script_set_attribute(attribute:"vuln_publication_date", value:"2012/05/24");
  script_set_attribute(attribute:"patch_publication_date", value:"2012/07/12");
  script_set_attribute(attribute:"plugin_publication_date", value:"2012/08/10");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:emc:autostart");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Gain a shell remotely");

  script_copyright(english:"This script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("emc_autostart_ftagent_version.nbin");
  script_require_keys("emc/autostart/ftagent/version");
  script_require_ports("Services/emc-autostart-ftagent", 8045);

  exit(0);
}

include('audit.inc');
include('global_settings.inc');
include('misc_func.inc');


#
# We don't have patch for ESA-2012-020, thus rely on remote version check
#
ver_str = get_kb_item_or_exit('emc/autostart/ftagent/version');
port = get_service(ipproto:'TCP',svc:"emc-autostart-ftagent", default:8045, exit_on_fail:TRUE);

#
# We don't know the exact version of the patched ftAgent,
# but the ESA-2012-020 advisory says it should be 5.4.3

# AutoStart 5.3 and older
# format: "5.3 SP4"
if (ver_str =~ "^ *[1-5]\.[0-3][^0-9]")
{
  security_hole(port);
}
# 5.4 and higher
# format: "5.4.1 build 73"
else
{
  arr = eregmatch(string:ver_str, pattern:'([0-9.]+) +build +([0-9]+)');
  if(!isnull(arr))
  {
    ver = arr[1];
    fields = split(ver, sep:'.');
    if (max_index(fields) == 3)
    {
      if (ver_compare(ver:ver, fix:'5.4.3') < 0) security_hole(port);
      else audit(AUDIT_LISTEN_NOT_VULN, 'EMC AutoStart ftAgent', port);
      exit(0);
    }
  }
  exit(1, "Unexpected format for AutoStart ftAgent version string '"+ver_str+"'.");
}