Vulnerabilities > CVE-2008-2437 - Buffer Errors vulnerability in Trend Micro Client-Server-Messaging Security and Officescan

047910
CVSS 10.0 - CRITICAL
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
network
low complexity
trend-micro
CWE-119
critical
nessus

Summary

Stack-based buffer overflow in cgiRecvFile.exe in Trend Micro OfficeScan 7.3 patch 4 build 1362 and other builds, OfficeScan 8.0 and 8.0 SP1, and Client Server Messaging Security 3.6 allows remote attackers to execute arbitrary code via an HTTP request containing a long ComputerName parameter.

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 familyWindows
NASL idTRENDMICRO_OFFICESCAN_CGIRECVFILE_OVERFLOW.NASL
descriptionTrend Micro OfficeScan or Client Server Messaging Security is installed on the remote host. The installed version is affected by a buffer overflow vulnerability. By setting the parameter
last seen2020-06-01
modified2020-06-02
plugin id34216
published2008-09-16
reporterThis script is Copyright (C) 2008-2018 Tenable Network Security, Inc.
sourcehttps://www.tenable.com/plugins/nessus/34216
titleTrend Micro OfficeScan 'cgiRecvFile.exe' ComputerName Parameter Buffer Overflow
code
#
# (C) Tenable Network Security, Inc.
#


include("compat.inc");

if (description)
{
  script_id(34216);
  script_version("1.14");
  script_cvs_date("Date: 2018/11/15 20:50:29");

  script_cve_id("CVE-2008-2437");
  script_bugtraq_id(31139);
  script_xref(name:"Secunia", value:"31342"); 

  script_name(english:"Trend Micro OfficeScan 'cgiRecvFile.exe' ComputerName Parameter Buffer Overflow");
  script_summary(english:"Checks cgiRecvFile.exe version");
 
  script_set_attribute(attribute:"synopsis", value:
"The remote host contains an application that is affected by a buffer
overflow vulnerability." );
  script_set_attribute(attribute:"description", value:
"Trend Micro OfficeScan or Client Server Messaging Security is
installed on the remote host.  The installed version is affected by a
buffer overflow vulnerability.  By setting the parameter
'ComputerName' to a very long string in a specially crafted HTTP
request, a malicious user within the local network may be able to
trigger a stack-based overflow in 'cgiRecvFile.exe'. 

Exploitation of this issue requires manipulation of the parameters
'TempFileName', 'NewFileSize', and 'Verify' and, if successful, would
result in arbitrary code execution on the remote system." );
  script_set_attribute(attribute:"see_also", value:"https://secuniaresearch.flexerasoftware.com/secunia_research/2008-35/" );
   # http://www.trendmicro.com/ftp/documentation/readme/OSCE_7.3_Win_EN_CriticalPatch_B1367_readme.txt
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?f0629899");
   # http://www.trendmicro.com/ftp/documentation/readme/CSM_3.6_OSCE_7.6_Win_EN_CriticalPatch_B1195_readme.txt
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?4cf6e9b8");
   # http://www.trendmicro.com/ftp/documentation/readme/OSCE_8.0_Win_EN_CriticalPatch_B1361_readme.txt
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?181dece3");
   # http://www.trendmicro.com/ftp/documentation/readme/OSCE_8.0_SP1_Win_EN_CriticalPatch_B2424_readme.txt
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?e96b6aa1");
   # http://www.trendmicro.com/ftp/documentation/readme/OSCE_8.0_SP1_Patch1_Win_EN_CriticalPatch_B3060_readme.txt
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?46ebb3f9");
  script_set_attribute(attribute:"solution", value:
"Upgrade to : 

 - Trend Micro OfficeScan 8.0 Build 1361/2424 or 3060
   depending on the current OfficeScan patch level.
 - Trend Micro Client Server Messaging Security 3.6
   Build 1195.
 - Trend Micro OfficeScan 7.3 Build 3167." );
 script_set_cvss_base_vector("CVSS2#AV:A/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_cwe_id(119);

  script_set_attribute(attribute:"plugin_publication_date", value: "2008/09/16");
  script_set_attribute(attribute:"patch_publication_date", value: "2008/09/12");
  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe",value:"cpe:/a:trend_micro:officescan");
  script_end_attributes();
 
  script_category(ACT_GATHER_INFO);
  script_family(english:"Windows");

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

  script_dependencies("smb_hotfixes.nasl","http_version.nasl");
  script_require_keys("SMB/Registry/Enumerated");
  script_require_ports("Services/www", 4343, 8080,139, 445);

  exit(0);
}

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

# Check if we can find an instance of OfficeScan Server or CSM 

if (report_paranoia < 2)
{
  found = 0;
  ports = add_port_in_list(list:get_kb_list("Services/www"), port:8080);
  ports = add_port_in_list(list:ports, port:4343);

  foreach port (ports)
  {
    w = http_send_recv3(method:"GET", item:"/officescan/default.htm", port:port);
    if (isnull(w))
    {
      debug_print("the web server on port ", port, " did not answer");
      continue;
    }
    buf = strcat(w[0], w[1], '\r\n', w[2]);
    if ("console/html/cgi/cgiChkMasterPwd.exe" >!< buf)
     {
      # Check if CSM is installed. 	
      w = http_send_recv3(method:"GET", item:"/officescan/default_SMB.htm", port:port);
      if (isnull(w))
      {
        debug_print("the web server on port ", port, " did not answer");
        continue;
      }
      buf = strcat(w[0], w[1], '\r\n', w[2]);
     }
   
    if ("console/html/cgi/cgiChkMasterPwd.exe" >< buf) 
     {
      found = 1;
      break;		
    }
  } 

  if(!found) exit(0);
}

if (!get_kb_item("SMB/Registry/Enumerated")) exit(0);

# Connect to the appropriate share.

name    =  kb_smb_name();
port    =  kb_smb_transport();
if (!get_port_state(port)) exit(0);
login   =  kb_smb_login();
pass    =  kb_smb_password();
domain  =  kb_smb_domain();

soc = open_sock_tcp(port);
if (!soc) exit(0);

session_init(socket:soc, hostname:name);
rc = NetUseAdd(login:login, password:pass, domain:domain, share:"IPC$");
if (rc != 1)
{
  NetUseDel();
  exit(0);
}

# Connect to remote registry.
hklm = RegConnectRegistry(hkey:HKEY_LOCAL_MACHINE);
if (isnull(hklm))
{
  NetUseDel();
  exit(0);
}

# Figure out where it is installed.

path = NULL;
server_version = NULL;
SP_version = NULL;

key = "SOFTWARE\TrendMicro\OfficeScan\service\Information";
key_h = RegOpenKey(handle:hklm, key:key, mode:MAXIMUM_ALLOWED);

if (!isnull(key_h))
{
  value = RegQueryValue(handle:key_h, item:"Local_Path");
  if (!isnull(value)) path = value[1];

  value =  RegQueryValue(handle:key_h, item:"Server_Version");
  if (!isnull(value)) server_version = value[1];

  value =  RegQueryValue(handle:key_h, item:"ServicePack_Build");
  if (!isnull(value)) SP_version = value[1];
 
  RegCloseKey(handle:key_h);
}
RegCloseKey(handle:hklm);

if (isnull(path))
{
  NetUseDel();
  exit(0);
}
NetUseDel(close:FALSE);


# Grab the file version of cgiRecvFile.exe
share = ereg_replace(pattern:"^([A-Za-z]):.*", replace:"\1$", string:path);

if("8.0" >< server_version)
exe   = ereg_replace(pattern:"^[A-Za-z]:(.*)", replace:"\1\Web_OSCE\Web\CGI\cgiRecvFile.exe", string:path);
else
exe   = ereg_replace(pattern:"^[A-Za-z]:(.*)", replace:"\1\Web\CGI\cgiRecvFile.exe", string:path);

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

fh = CreateFile(
  file:exe,
  desired_access:GENERIC_READ,
  file_attributes:FILE_ATTRIBUTE_NORMAL,
  share_mode:FILE_SHARE_READ,
  create_disposition:OPEN_EXISTING
);

ver = NULL;
if (!isnull(fh))
{
  ver = GetFileVersion(handle:fh);
  CloseFile(handle:fh);
}
NetUseDel();


# Check the version number.
if (!isnull(ver))
{
  for (i=0; i<4; i++)
    ver[i] = int(ver[i]);

  if ( ( ver[0] ==  7 && ver[1] == 3 && ver[2] == 0 && ver[3] < 1367) || # OfficeScan 7.3 without patch 1367
       ( ver[0] ==  7 && ver[1] == 6 && ver[2] == 0 && ver[3] < 1195) || # OfficeScan 7.6/CSM 3.6 without patch 1195
       ( ver[0] ==  8 && ver[1] == 0 && ver[2] == 0 && ver[3] < 1361) || # OfficeScan 8.0 without patch 1361
       ( ver[0] ==  8 && ver[1] == 0 && ver[2] == 0 && SP_version >= 2302 && ver[3] < 2424) || # OfficeScan 8.0 Service Pack 1 without patch 2424 
       ( ver[0] ==  8 && ver[1] == 0 && ver[2] == 0 && SP_version >= 3031 && ver[3] < 3060)    # OfficeScan 8.0 Service Pack 1 Patch 1 without patch 3060
     ) 
     if (report_verbosity )
      {
        report = string(
          "\n",
          "Version ", string(ver[0],".",ver[1]," build ",ver[3]), " of Trend Micro OfficeScan\n", 
	  " is installed under :\n", 
          "\n",
          "  ", path, "\n"
        ); 	
      	security_hole(port:port,extra:report);
      }
      else
      	security_hole(port);
}

Saint

bid31139
descriptionTrend Micro OfficeScan cgiRecvFile.exe ComputerName buffer overflow
idmisc_av_trendmicro_cgirecvbo
osvdb48024
titletrend_micro_officescan_cgirecvfile
typeremote

Seebug

bulletinFamilyexploit
descriptionBUGTRAQ ID: 31139 CVE(CAN) ID: CVE-2008-2437 OfficeScan是一种针对整个网段的分布式杀毒软件。 OfficeScan的cgiRecvFile.exe中存在栈溢出漏洞,如果远程攻击者在提交的HTTP请求中包含了超长的ComputerName参数的话,就可以触发这个溢出,导致执行任意指令。必须还要控制TempFileName、NewFileSize和Verify参数才能利用这个漏洞。 Trend Micro OfficeScan 7.3 patch 4 build 1362 Trend Micro ----------- 目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载: <a href=http://www.trendmicro.com/ftp/products/patches/OSCE_8.0_SP1_Patch1_Win_EN_CriticalPatch_B3060.exe target=_blank>http://www.trendmicro.com/ftp/products/patches/OSCE_8.0_SP1_Patch1_Win_EN_CriticalPatch_B3060.exe</a> <a href=http://www.trendmicro.com/ftp/products/patches/OSCE_8.0_SP1_Win_EN_CriticalPatch_B2424.exe target=_blank>http://www.trendmicro.com/ftp/products/patches/OSCE_8.0_SP1_Win_EN_CriticalPatch_B2424.exe</a> <a href=http://www.trendmicro.com/ftp/products/patches/OSCE_8.0_Win_EN_CriticalPatch_B1361.exe target=_blank>http://www.trendmicro.com/ftp/products/patches/OSCE_8.0_Win_EN_CriticalPatch_B1361.exe</a> <a href=http://www.trendmicro.com/ftp/products/patches/CSM_3.6_OSCE_7.6_Win_EN_CriticalPatch_B1195.exe target=_blank>http://www.trendmicro.com/ftp/products/patches/CSM_3.6_OSCE_7.6_Win_EN_CriticalPatch_B1195.exe</a> <a href=http://www.trendmicro.com/ftp/products/patches/OSCE_7.3_Win_EN_CriticalPatch_B1367.exe target=_blank>http://www.trendmicro.com/ftp/products/patches/OSCE_7.3_Win_EN_CriticalPatch_B1367.exe</a>
idSSV:4062
last seen2017-11-19
modified2008-09-17
published2008-09-17
reporterRoot
title趋势科技OfficeScan cgiRecvFile.exe栈溢出漏洞