Vulnerabilities > CVE-2011-1889 - Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability in Microsoft Forefront Threat Management Gateway 2010

047910
CVSS 9.8 - CRITICAL
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
HIGH
Integrity impact
HIGH
Availability impact
HIGH
network
low complexity
microsoft
CWE-119
critical
nessus

Summary

The NSPLookupServiceNext function in the client in Microsoft Forefront Threat Management Gateway (TMG) 2010 allows remote attackers to execute arbitrary code via vectors involving unspecified requests, aka "TMG Firewall Client Memory Corruption Vulnerability."

Vulnerable Configurations

Part Description Count
Application
Microsoft
1

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.

Msbulletin

bulletin_idMS11-040
bulletin_url
date2011-06-14T00:00:00
impactRemote Code Execution
knowledgebase_id2520426
knowledgebase_url
severityCritical
titleVulnerability in Threat Management Gateway Firewall Client Could Allow Remote Code Execution

Nessus

NASL familyWindows : Microsoft Bulletins
NASL idSMB_NT_MS11-040.NASL
descriptionThe remote host is missing Forefront Threat Management Gateway Client security update 2520426. The installed version of Forefront Threat Management Gateway is affected by a vulnerability that may allow an attacker to execute arbitrary code on the remote host.
last seen2020-06-01
modified2020-06-02
plugin id55120
published2011-06-15
reporterThis script is Copyright (C) 2011-2018 Tenable Network Security, Inc.
sourcehttps://www.tenable.com/plugins/nessus/55120
titleMS11-040: Vulnerability in Threat Management Gateway Firewall Client Could Allow Remote Code Execution (2520426)
code
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(55120);
  script_version("1.17");
  script_cvs_date("Date: 2018/11/15 20:50:30");

  script_cve_id("CVE-2011-1889");
  script_bugtraq_id(48181);
  script_xref(name:"MSFT", value:"MS11-040");
  script_xref(name:"IAVA", value:"2011-A-0085");
  script_xref(name:"MSKB", value:"2520426");

  script_name(english:"MS11-040: Vulnerability in Threat Management Gateway Firewall Client Could Allow Remote Code Execution (2520426)");
  script_summary(english:"Checks version of FwcMgmt.exe");

  script_set_attribute(attribute:"synopsis", value:
"Arbitrary code can be executed on the remote host through a firewall
client.");
  script_set_attribute(attribute:"description", value:
"The remote host is missing Forefront Threat Management Gateway Client
security update 2520426.

The installed version of Forefront Threat Management Gateway is
affected by a vulnerability that may allow an attacker to execute
arbitrary code on the remote host.");

  script_set_attribute(attribute:"see_also", value:"https://docs.microsoft.com/en-us/security-updates/SecurityBulletins/2011/ms11-040");
  script_set_attribute(attribute:"solution", value:
"Microsoft has released a patch for Forefront Threat Management
Gateway.");
  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: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_set_attribute(attribute:"vuln_publication_date", value:"2011/06/14");
  script_set_attribute(attribute:"patch_publication_date", value:"2011/06/14");
  script_set_attribute(attribute:"plugin_publication_date", value:"2011/06/15");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:forefront_security");
  script_set_attribute(attribute:"stig_severity", value:"II");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Windows : Microsoft Bulletins");

  script_copyright(english:"This script is Copyright (C) 2011-2018 Tenable Network Security, Inc.");

  script_dependencies("smb_hotfixes.nasl", "ms_bulletin_checks_possible.nasl");
  script_require_keys("SMB/MS_Bulletin_Checks/Possible");
  script_require_ports(139, 445, 'Host/patch_management_checks');

  exit(0);
}

include("audit.inc");
include("smb_hotfixes_fcheck.inc");
include("smb_hotfixes.inc");
include("smb_func.inc");
include("misc_func.inc");



get_kb_item_or_exit("SMB/MS_Bulletin_Checks/Possible");

bulletin = 'MS11-040';
kbs = make_list("2520426");
if (get_kb_item("Host/patch_management_checks")) hotfix_check_3rd_party(bulletin:bulletin, kbs:kbs, severity:SECURITY_HOLE);

get_kb_item_or_exit('SMB/Registry/Enumerated');
get_kb_item_or_exit('SMB/WindowsVersion', exit_code:1);

port   = kb_smb_transport();
login  = kb_smb_login();
pass   = kb_smb_password();
domain = kb_smb_domain();

if(! smb_session_init()) audit(AUDIT_FN_FAIL, "smb_session_init");

rc = NetUseAdd(login:login, password:pass, domain:domain, share:'IPC$');
if (rc != 1)
{
  NetUseDel();
  audit(AUDIT_SHARE_FAIL, "IPC$");
}

hklm = RegConnectRegistry(hkey:HKEY_LOCAL_MACHINE);
if (isnull(hklm))
{
  NetUseDel();
  audit(AUDIT_REG_FAIL);
}

path = NULL;
key = 'SOFTWARE\\Microsoft\\Firewall Client 2004';
key_h = RegOpenKey(handle:hklm, key:key, mode:MAXIMUM_ALLOWED);
if (!isnull(key_h))
{
  item = RegQueryValue(handle:key_h, item:'InstallRoot');
  if (!isnull(item))
  {
    path = item[1];
  }
  RegCloseKey(handle:key_h);
}
RegCloseKey(handle:hklm);

if (isnull(path)) exit(0, 'Microsoft Forefront Threat Management Gateway is not installed on the remote host.');

share = ereg_replace(pattern:'^([A-Za-z]):.*', replace:'\\1$', string:path);
exe = ereg_replace(pattern:'^[A-Za-z]:(.*)', replace:'\\1\\FwcMgmt.exe', string:path);
NetUseDel(close:FALSE);

rc = NetUseAdd(login:login, password:pass, domain:domain, share:share);
if (rc != 1)
{
  NetUseDel();
  audit(AUDIT_SHARE_FAIL, share);
}

version = NULL;
fh = CreateFile(
  file:exe,
  desired_access:GENERIC_READ,
  file_attributes:FILE_ATTRIBUTE_NORMAL,
  share_mode:FILE_SHARE_READ,
  create_disposition:OPEN_EXISTING
);
if (isnull(fh))
{
  NetUseDel();
  exit(1, 'Couldn\'t open \''+path+'\\FwcMgmt.exe\'.');
}

prod = NULL;
ver = GetFileVersion(handle:fh);
ret = GetFileVersionEx(handle:fh);
if (!isnull(ret)) children = ret['Children'];
if (!isnull(children))
{
  varfileinfo = children['VarFileInfo'];
  if (!isnull(varfileinfo))
  {
    translation =
      (get_word(blob:varfileinfo['Translation'], pos:0) << 16) +
      get_word(blob:varfileinfo['Translation'], pos:2);
    translation = tolower(convert_dword(dword:translation, nox:TRUE));
  }
  stringfileinfo = children['StringFileInfo'];
  # nb: if varfileinfo is missing, use the first key for the translation
  if (isnull(varfileinfo) && !isnull(stringfileinfo))
  {
    foreach translation (keys(stringfileinfo))
      break;
  }
  if (!isnull(stringfileinfo) && !isnull(translation))
  {
    data = stringfileinfo[translation];
    if (!isnull(data)) prod = data['ProductName'];
    else
    {
      data = stringfileinfo[toupper(translation)];
      if (!isnull(data)) prod = data['ProductName'];
    }
  }
}

CloseFile(handle:fh);
NetUseDel();

if (isnull(ver))
{
  exit(1, 'Coulnd\'t get the version from \''+path+'\\FwcMgmt.exe\'.');
}
if (isnull(prod))
{
  exit(1, 'Couldn\'t get the product name from \''+path+'\\FwcMgmt.exe\'.');
}
if (prod != 'Forefront TMG Client')
{
  exit(0, 'The host is not affected because the firewall client is not Forefront Threat Management Gateway Client');
}


kb = '2520426';

version = join(sep:'.', ver);
if (
  ver[0] < 7 ||
  (ver[0] == 7 && ver[1] == 0 &&
    (
      ver[2] < 7734 ||
      (ver[2] == 7734 && ver[3] < 182)
    )
  )
)
{
  info =
    '\n  File              : ' + path + '\\FwcMgmt.exe' +
    '\n  Installed version : ' + version +
    '\n  Fixed version     : 7.0.7734.182\n';

  set_kb_item(name:'SMB/Missing/'+bulletin, value:TRUE);
  hotfix_add_report(info, bulletin:bulletin, kb:kb);
  hotfix_security_hole();

  hotfix_check_fversion_end();
  exit(0);
}
else
{
  hotfix_check_fversion_end();
  exit(0, 'The host is not affected.');
}

Oval

accepted2013-07-29T04:00:06.227-04:00
classvulnerability
contributors
  • nameDragos Prisaca
    organizationSymantec Corporation
  • nameMaria Kedovskaya
    organizationALTX-SOFT
descriptionThe NSPLookupServiceNext function in the client in Microsoft Forefront Threat Management Gateway (TMG) 2010 allows remote attackers to execute arbitrary code via vectors involving unspecified requests, aka "TMG Firewall Client Memory Corruption Vulnerability."
familywindows
idoval:org.mitre.oval:def:12642
statusaccepted
submitted2011-06-14T13:00:00
titleTMG Firewall Client Memory Corruption Vulnerability
version7

Seebug

bulletinFamilyexploit
descriptionBugtraq ID: 48181 CVE ID:CVE-2011-1889 Microsoft Forefront Threat Management Gateway可以安装在DirectAccess服务器上,提供额外保护和其他Forefront TMG功能。 NSPLookupServiceNext()函数存在一个边界错误,提交通过TMG防火墙客户端的特殊请求可破坏内存,成功利用漏洞可执行任意代码。 Microsoft Forefront Threat Management Gateway 2010 Client 厂商解决方案 用户可参考如下供应商提供的安全公告获得补丁信息: http://www.microsoft.com/technet/security/Bulletin/MS11-040.mspx
idSSV:20637
last seen2017-11-19
modified2011-06-16
published2011-06-16
reporterRoot
titleMicrosoft Forefront Threat Management Gateway (TMG)防火墙客户端内存破坏漏洞