Vulnerabilities > CVE-2010-1254 - Permissions, Privileges, and Access Controls vulnerability in Microsoft Open XML File Format Converter

047910
CVSS 6.9 - MEDIUM
Attack vector
LOCAL
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
local
microsoft
CWE-264
nessus

Summary

The installation for Microsoft Open XML File Format Converter for Mac sets insecure ACLs for the /Applications folder, which allows local users to execute arbitrary code by replacing the executable with a Trojan Horse, aka "Mac Office Open XML Permissions Vulnerability."

Vulnerable Configurations

Part Description Count
Application
Microsoft
1

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Accessing, Modifying or Executing Executable Files
    An attack of this type exploits a system's configuration that allows an attacker to either directly access an executable file, for example through shell access; or in a possible worst case allows an attacker to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.
  • Leverage Executable Code in Non-Executable Files
    An attack of this type exploits a system's trust in configuration and resource files, when the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high. The attack can be directed at a client system, such as causing buffer overrun through loading seemingly benign image files, as in Microsoft Security Bulletin MS04-028 where specially crafted JPEG files could cause a buffer overrun once loaded into the browser. Another example targets clients reading pdf files. In this case the attacker simply appends javascript to the end of a legitimate url for a pdf (http://www.gnucitizen.org/blog/danger-danger-danger/) http://path/to/pdf/file.pdf#whatever_name_you_want=javascript:your_code_here The client assumes that they are reading a pdf, but the attacker has modified the resource and loaded executable javascript into the client's browser process. The attack can also target server processes. The attacker edits the resource or configuration file, for example a web.xml file used to configure security permissions for a J2EE app server, adding role name "public" grants all users with the public role the ability to use the administration functionality. The server trusts its configuration file to be correct, but when they are manipulated, the attacker gains full control.
  • Blue Boxing
    This type of attack against older telephone switches and trunks has been around for decades. A tone is sent by an adversary to impersonate a supervisor signal which has the effect of rerouting or usurping command of the line. While the US infrastructure proper may not contain widespread vulnerabilities to this type of attack, many companies are connected globally through call centers and business process outsourcing. These international systems may be operated in countries which have not upgraded Telco infrastructure and so are vulnerable to Blue boxing. Blue boxing is a result of failure on the part of the system to enforce strong authorization for administrative functions. While the infrastructure is different than standard current applications like web applications, there are historical lessons to be learned to upgrade the access control for administrative functions.
  • Restful Privilege Elevation
    Rest uses standard HTTP (Get, Put, Delete) style permissions methods, but these are not necessarily correlated generally with back end programs. Strict interpretation of HTTP get methods means that these HTTP Get services should not be used to delete information on the server, but there is no access control mechanism to back up this logic. This means that unless the services are properly ACL'd and the application's service implementation are following these guidelines then an HTTP request can easily execute a delete or update on the server side. The attacker identifies a HTTP Get URL such as http://victimsite/updateOrder, which calls out to a program to update orders on a database or other resource. The URL is not idempotent so the request can be submitted multiple times by the attacker, additionally, the attacker may be able to exploit the URL published as a Get method that actually performs updates (instead of merely retrieving data). This may result in malicious or inadvertent altering of data on the server.
  • Target Programs with Elevated Privileges
    This attack targets programs running with elevated privileges. The attacker would try to leverage a bug in the running program and get arbitrary code to execute with elevated privileges. For instance an attacker would look for programs that write to the system directories or registry keys (such as HKLM, which stores a number of critical Windows environment variables). These programs are typically running with elevated privileges and have usually not been designed with security in mind. Such programs are excellent exploit targets because they yield lots of power when they break. The malicious user try to execute its code at the same level as a privileged system call.

Msbulletin

bulletin_idMS10-038
bulletin_url
date2010-06-08T00:00:00
impactRemote Code Execution
knowledgebase_id2027452
knowledgebase_url
severityImportant
titleVulnerabilities in Microsoft Excel Could Allow Remote Code Execution

Nessus

  • NASL familyMacOS X Local Security Checks
    NASL idMACOSX_MS10-038.NASL
    descriptionThe remote Mac OS X host is running a version of Microsoft Excel that is affected by several vulnerabilities. If an attacker can trick a user on the affected host into opening a specially crafted Excel file, these issues could be leveraged to execute arbitrary code subject to the user
    last seen2019-10-28
    modified2010-10-20
    plugin id50066
    published2010-10-20
    reporterThis script is Copyright (C) 2010-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/50066
    titleMS10-038: Vulnerabilities in Microsoft Office Could Allow Remote Code Execution (2027452) (Mac OS X)
    code
    #TRUSTED 2b4c597598c5fc43c3b94e57d3a8b15122788b4e01963add1e69ca0e45b4e304b78e7f8f4e0b166a87741b909bc2d89bb28439e8d191142377ce4e5c75635ca7299f99ac84b9f7fa0c5afbafd0f85f75f3bc5eb9e7bb3bfd6ab1b53c084c7781dc44356ba3d35e608e4a79e77ad50b8c225ee18ff59e8dc590b078d2da90a422371e6f30c39d6ea7e262f98c29d5379ae3c72301172f29a57f8e4d1162b89ab3ac170741c19c97af4c57eaf6a79a98dcc9c0a7531a73719b5360c3f7d32e359813433dc0af48e2c1cc2c0b630965589f352782c71f71e9a92e2294ab9a910dfcf45faa48143799c2a5869c77312d6b57242396d07ae771b5181124a599553523be5b0a04960db986e5426f22f3ce9301d3798a47cb3c5733353346fc12d8bf019a6438a791536bd61d3391504d460f8d1075ef1789a17f682e75a2c7e7c7fcff54540048ff4200fcbd58a64874065cb9be4755c4a2dac9c9bc258213253c0de5c4ec8b94424a54d19c426d6f9f1bff87f00877ef503fc7103eabac357dd381c8f0b77fca347b3e1252ff51ff15c8fb6a6ac34c852c52fe76a9be5f233683e7128e57f0e36266b4531efe3501a18bd1ff27e98dfc6ea1aa1da3cd8be6fbf6fdcc7dc96c6600ab518487a53e8221e2dea69d420572a6b401187702cf7ec404e6eff90086946f0d40f2dc674cc080e8465673978bda1f09b09be8463d88d6a10467
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(50066);
      script_version("1.22");
      script_set_attribute(attribute:"plugin_modification_date", value:"2018/07/14");
    
      script_cve_id(
        "CVE-2010-0821",
        "CVE-2010-0822",
        "CVE-2010-0823",
        "CVE-2010-0824",
        "CVE-2010-1245",
        "CVE-2010-1248",
        "CVE-2010-1249",
        "CVE-2010-1250",
        "CVE-2010-1251",
        "CVE-2010-1252",
        "CVE-2010-1253",
        "CVE-2010-1254"
      );
      script_bugtraq_id(
        40518,
        40520,
        40521,
        40522,
        40523,
        40526,
        40527,
        40528,
        40529,
        40530,
        40531,
        40533
      );
      script_xref(name:"MSFT", value:"MS10-038");
      script_xref(name:"MSKB", value:"2027452");
      script_xref(name:"MSKB", value:"2028864");
      script_xref(name:"MSKB", value:"202886");
      script_xref(name:"MSKB", value:"2078051");
    
      script_name(english:"MS10-038: Vulnerabilities in Microsoft Office Could Allow Remote Code Execution (2027452) (Mac OS X)");
      script_summary(english:"Check version of Microsoft Office");
    
      script_set_attribute(attribute:"synopsis", value:
    "An application installed on the remote Mac OS X host is affected by
    multiple remote code execution vulnerabilities.");
      script_set_attribute(attribute:"description", value:
    "The remote Mac OS X host is running a version of Microsoft Excel that
    is affected by several vulnerabilities.
    
    If an attacker can trick a user on the affected host into opening a
    specially crafted Excel file, these issues could be leveraged to
    execute arbitrary code subject to the user's privileges.");
      script_set_attribute(attribute:"see_also", value:"http://technet.microsoft.com/en-us/security/bulletin/ms10-038");
      script_set_attribute(attribute:"solution", value:
    "Microsoft has released a set of patches for Office 2004 for Mac,
    Office 2008 for Mac, and Open XML File Format Converter for Mac.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
      script_set_attribute(attribute:"exploited_by_malware", value:"true");
      script_set_attribute(attribute:"exploit_framework_core", value:"true");
      script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
      script_set_attribute(attribute:"canvas_package", value:'White_Phosphorus');
      script_set_attribute(attribute:"metasploit_name", value:'MS11-038 Microsoft Office Excel Malformed OBJ Record Handling Overflow');
      script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2010/06/08");
      script_set_attribute(attribute:"patch_publication_date", value:"2010/06/08");
      script_set_attribute(attribute:"plugin_publication_date", value:"2010/10/20");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:office:2004::mac");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:office:2008::mac");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:open_xml_file_format_converter:::mac");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"MacOS X Local Security Checks");
    
      script_copyright(english:"This script is Copyright (C) 2010-2018 Tenable Network Security, Inc.");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/MacOSX/packages", "Host/uname");
    
      exit(0);
    }
    
    
    include("misc_func.inc");
    include("ssh_func.inc");
    include("macosx_func.inc");
    
    
    
    if(sshlib::get_support_level() >= sshlib::SSH_LIB_SUPPORTS_COMMANDS)
      enable_ssh_wrappers();
    else disable_ssh_wrappers();
    
    function exec(cmd)
    {
      local_var buf, ret;
    
      if (islocalhost())
        buf = pread(cmd:"/bin/bash", argv:make_list("bash", "-c", cmd));
      else
      {
        ret = ssh_open_connection();
        if (!ret) exit(1, "ssh_open_connection() failed.");
        buf = ssh_cmd(cmd:cmd);
        ssh_close_connection();
      }
      return buf;
    }
    
    
    packages = get_kb_item("Host/MacOSX/packages");
    if (!packages) exit(1, "The 'Host/MacOSX/packages' KB item is missing.");
    
    uname = get_kb_item("Host/uname");
    if (!uname) exit(1, "The 'Host/uname' KB item is missing.");
    if (!egrep(pattern:"Darwin.*", string:uname)) exit(1, "The host does not appear to be using the Darwin sub-system.");
    
    
    # Gather version info.
    info = '';
    installs = make_array();
    
    prod = 'Office 2008 for Mac';
    plist = "/Applications/Microsoft Office 2008/Office/MicrosoftComponentPlugin.framework/Versions/12/Resources/Info.plist";
    cmd =  'cat \'' + plist + '\' | ' +
      'grep -A 1 CFBundleShortVersionString | ' +
      'tail -n 1 | ' +
      'sed \'s/.*string>\\(.*\\)<\\/string>.*/\\1/g\'';
    version = exec(cmd:cmd);
    if (version && version =~ "^[0-9]+\.")
    {
      version = chomp(version);
      if (version !~ "^12\.") exit(1, "Failed to get the version for "+prod+" - '"+version+"'.");
    
      installs[prod] = version;
    
      ver = split(version, sep:'.', keep:FALSE);
      for (i=0; i<max_index(ver); i++)
        ver[i] = int(ver[i]);
    
      fixed_version = '12.2.5';
      fix = split(fixed_version, sep:'.', keep:FALSE);
      for (i=0; i<max_index(fix); i++)
        fix[i] = int(fix[i]);
    
      for (i=0; i<max_index(fix); i++)
        if ((ver[i] < fix[i]))
        {
          info +=
            '\n  Product           : ' + prod +
            '\n  Installed version : ' + version +
            '\n  Fixed version     : ' + fixed_version + '\n';
          break;
        }
        else if (ver[i] > fix[i])
          break;
    }
    
    prod = 'Office 2004 for Mac';
    cmd = GetCarbonVersionCmd(file:"Microsoft Component Plugin", path:"/Applications/Microsoft Office 2004/Office");
    version = exec(cmd:cmd);
    if (version && version =~ "^[0-9]+\.")
    {
      version = chomp(version);
      if (version !~ "^11\.") exit(1, "Failed to get the version for "+prod+" - '"+version+"'.");
    
      installs[prod] = version;
    
      ver = split(version, sep:'.', keep:FALSE);
      for (i=0; i<max_index(ver); i++)
        ver[i] = int(ver[i]);
    
      fixed_version = '11.5.9';
      fix = split(fixed_version, sep:'.', keep:FALSE);
      for (i=0; i<max_index(fix); i++)
        fix[i] = int(fix[i]);
    
      for (i=0; i<max_index(fix); i++)
        if ((ver[i] < fix[i]))
        {
          info +=
            '\n  Product           : ' + prod +
            '\n  Installed version : ' + version +
            '\n  Fixed version     : ' + fixed_version + '\n';
          break;
        }
        else if (ver[i] > fix[i])
          break;
    }
    
    prod = 'Open XML File Format Converter for Mac';
    plist = "/Applications/Open XML Converter.app/Contents/Info.plist";
    cmd =  'cat \'' + plist + '\' | ' +
      'grep -A 1 CFBundleShortVersionString | ' +
      'tail -n 1 | ' +
      'sed \'s/.*string>\\(.*\\)<\\/string>.*/\\1/g\'';
    version = exec(cmd:cmd);
    if (version && version =~ "^[0-9]+\.")
    {
      version = chomp(version);
      installs[prod] = version;
    
      ver = split(version, sep:'.', keep:FALSE);
      for (i=0; i<max_index(ver); i++)
        ver[i] = int(ver[i]);
    
      fixed_version = '1.1.5';
      fix = split(fixed_version, sep:'.', keep:FALSE);
      for (i=0; i<max_index(fix); i++)
        fix[i] = int(fix[i]);
    
      for (i=0; i<max_index(fix); i++)
        if ((ver[i] < fix[i]))
        {
          info +=
            '\n  Product           : ' + prod +
            '\n  Installed version : ' + version +
            '\n  Fixed version     : ' + fixed_version + '\n';
          break;
        }
        else if (ver[i] > fix[i])
          break;
    }
    
    
    # Report findings.
    if (info)
    {
      gs_opt = get_kb_item("global_settings/report_verbosity");
      if (gs_opt && gs_opt != 'Quiet') security_hole(port:0, extra:info);
      else security_hole(0);
    
      exit(0);
    }
    else
    {
      if (max_index(keys(installs)) == 0) exit(0, "Office for Mac / Open XML File Format Converter is not installed.");
      else
      {
        msg = 'The host has ';
        foreach prod (sort(keys(installs)))
          msg += prod + ' ' + installs[prod] + ' and ';
        msg = substr(msg, 0, strlen(msg)-1-strlen(' and '));
    
        msg += ' installed and thus is not affected.';
    
        exit(0, msg);
      }
    }
    
  • NASL familyWindows : Microsoft Bulletins
    NASL idSMB_NT_MS10-038.NASL
    descriptionThe remote host contains a version of Microsoft Office Excel 2002, Microsoft Office Excel 2003, Microsoft Office Excel 2007, Microsoft Office Excel Viewer, or Microsoft Office Compatibility Pack that is affected by several vulnerabilities. If an attacker can trick a user on the affected system into opening a specially crafted Excel file using the affected application, he may be able to leverage these issues to execute arbitrary code subject to the user
    last seen2020-06-01
    modified2020-06-02
    plugin id46845
    published2010-06-09
    reporterThis script is Copyright (C) 2010-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/46845
    titleMS10-038: Vulnerabilities in Microsoft Office Excel Could Allow Remote Code Execution (2027452)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(46845);
      script_version("1.37");
      script_cvs_date("Date: 2018/11/15 20:50:30");
    
      script_cve_id(
        "CVE-2010-0821",
        "CVE-2010-0822",
        "CVE-2010-0823",
        "CVE-2010-0824",
        "CVE-2010-1245",
        "CVE-2010-1246",
        "CVE-2010-1247",
        "CVE-2010-1248",
        "CVE-2010-1249",
        "CVE-2010-1250",
        "CVE-2010-1251",
        "CVE-2010-1252",
        "CVE-2010-1253"
        # "CVE-2010-1254"    # nb: affects only Mac Office Open XML
      );
      script_bugtraq_id(
        40518,
        40520,
        40521,
        40522,
        40523,
        40524,
        40525,
        40526,
        40527,
        40528,
        40529,
        40530,
        40531
      );
      script_xref(name:"EDB-ID", value:"18143");
      script_xref(name:"MSFT", value:"MS10-038");
      script_xref(name:"MSKB", value:"982133");
      script_xref(name:"MSKB", value:"982299");
      script_xref(name:"MSKB", value:"982308");
      script_xref(name:"MSKB", value:"982331");
      script_xref(name:"MSKB", value:"982333");
    
      script_name(english:"MS10-038: Vulnerabilities in Microsoft Office Excel Could Allow Remote Code Execution (2027452)");
      script_summary(english:"Checks version of Excel et al.");
    
      script_set_attribute(
        attribute:"synopsis",
        value:
    "Arbitrary code can be executed on the remote host through Microsoft
    Office Excel."
      );
      script_set_attribute(
        attribute:"description",
        value:
    "The remote host contains a version of Microsoft Office Excel 2002,
    Microsoft Office Excel 2003, Microsoft Office Excel 2007, Microsoft
    Office Excel Viewer, or Microsoft Office Compatibility Pack that is
    affected by several vulnerabilities.
    
    If an attacker can trick a user on the affected system into opening a
    specially crafted Excel file using the affected application, he may be
    able to leverage these issues to execute arbitrary code subject to the
    user's privileges."
      );
      script_set_attribute(attribute:"see_also", value:"https://docs.microsoft.com/en-us/security-updates/SecurityBulletins/2010/ms10-038");
      script_set_attribute(
        attribute:"solution",
        value:
    "Microsoft has released a set of patches for Office Excel 2002,
    Office Excel 2003, Excel 2007, Office Excel Viewer and Office
    Compatibility Pack."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
      script_set_attribute(attribute:"exploit_framework_core", value:"true");
      script_set_attribute(attribute:"exploited_by_malware", value:"true");
      script_set_attribute(attribute:"metasploit_name", value:'MS11-038 Microsoft Office Excel Malformed OBJ Record Handling Overflow');
      script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
      script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
      script_set_attribute(attribute:"canvas_package", value:'White_Phosphorus');
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2010/06/08");
      script_set_attribute(attribute:"patch_publication_date", value:"2010/06/08");
      script_set_attribute(attribute:"plugin_publication_date", value:"2010/06/09");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:office");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:excel");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:excel_viewer");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:office_compatibility_pack");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Windows : Microsoft Bulletins");
    
      script_copyright(english:"This script is Copyright (C) 2010-2018 Tenable Network Security, Inc.");
    
      script_dependencies("smb_nt_ms02-031.nasl", "office_installed.nasl", "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("smb_hotfixes_fcheck.inc");
    include("smb_hotfixes.inc");
    include("smb_func.inc");
    include("misc_func.inc");
    include("audit.inc");
    
    get_kb_item_or_exit("SMB/MS_Bulletin_Checks/Possible");
    
    bulletin = 'MS10-038';
    kbs = make_list("982133", "982299", "982308", "982331", "982333");
    if (get_kb_item("Host/patch_management_checks")) hotfix_check_3rd_party(bulletin:bulletin, kbs:kbs, severity:SECURITY_HOLE);
    
    
    info = "";
    
    vuln = 0;
    kb = '';
    # Excel.
    installs = get_kb_list("SMB/Office/Excel/*/ProductPath");
    if (!isnull(installs))
    {
      foreach install (keys(installs))
      {
        version = install -'SMB/Office/Excel/' - '/ProductPath';
        path = installs[install];
        if (isnull(path)) path = 'n/a';
    
        ver = split(version, sep:'.', keep:FALSE);
        for (i=0; i<max_index(ver); i++)
          ver[i] = int(ver[i]);
    
        # Excel 2007.
        office_sp = get_kb_item("SMB/Office/2007/SP");
        if (
          (!isnull(office_sp) && (office_sp == 1 || office_sp == 2)) &&
          (
            ver[0] == 12 && ver[1] == 0 &&
            (
              ver[2] < 6535 ||
              (ver[2] == 6535 && ver[3] < 5002)
            )
          )
        )
        {
          vuln++;
          info =
            '\n  Product           : Excel 2007' +
            '\n  File              : ' + path +
            '\n  Installed version : ' + version +
            '\n  Fixed version     : 12.0.6535.5002\n';
          kb = '982308';
          hotfix_add_report(info, bulletin:bulletin, kb:kb);
        }
        # Excel 2003.
        else if (ver[0] == 11 && ver[1] == 0 && ver[2] < 8324)
        {
          office_sp = get_kb_item("SMB/Office/2003/SP");
          if (!isnull(office_sp) && office_sp == 3)
          {
            vuln++;
            info =
              '\n  Product           : Excel 2003' +
              '\n  File              : ' + path +
              '\n  Installed version : ' + version +
              '\n  Fixed version     : 11.0.8324.0\n';
            kb = '982133';
            hotfix_add_report(info, bulletin:bulletin, kb:kb);
          }
        }
        # Excel 2002.
        else if (ver[0] == 10 && ver[1] == 0 && ver[2] < 6862)
        {
          office_sp = get_kb_item("SMB/Office/XP/SP");
          if (!isnull(office_sp) && office_sp == 3)
          {
            vuln++;
            info =
              '\n  Product           : Excel 2002' +
              '\n  File              : ' + path +
              '\n  Installed version : ' + version +
              '\n  Fixed version     : 10.0.6862.0\n';
            kb = '982299';
            hotfix_add_report(info, bulletin:bulletin, kb:kb);
          }
        }
      }
    }
    
    
    # Excel Viewer.
    installs = get_kb_list("SMB/Office/ExcelViewer/*/ProductPath");
    if (!isnull(installs))
    {
      foreach install (keys(installs))
      {
        version = install - 'SMB/Office/ExcelViewer/' - '/ProductPath';
        path = installs[install];
    
        ver = split(version, sep:'.', keep:FALSE);
        for (i=0; i<max_index(ver); i++)
          ver[i] = int(ver[i]);
    
        # Excel Viewer.
        if (
          ver[0] == 12 && ver[1] == 0 &&
          (
            ver[2] < 6535 ||
            (ver[2] == 6535 && ver[3] < 5000)
          )
        )
        {
          vuln++;
          info =
            '\n  Product           : Excel Viewer' +
            '\n  File              : ' + path +
            '\n  Installed version : ' + version +
            '\n  Fixed version     : 12.0.6535.5000\n';
          kb = '982333';
          hotfix_add_report(info, bulletin:bulletin, kb:kb);
        }
      }
    }
    
    
    # 2007 Microsoft Office system and the Microsoft Office Compatibility Pack.
    installs = get_kb_list("SMB/Office/ExcelCnv/*/ProductPath");
    if (!isnull(installs))
    {
      foreach install (keys(installs))
      {
        version = install - 'SMB/Office/ExcelCnv/' - '/ProductPath';
        path = installs[install];
        if (isnull(path)) path = 'n/a';
    
        ver = split(version, sep:'.', keep:FALSE);
        for (i=0; i<max_index(ver); i++)
          ver[i] = int(ver[i]);
    
        # 2007 Office system and the Office Compatibility Pack.
        if (
          ver[0] == 12 && ver[1] == 0 &&
          (
            ver[2] < 6535 ||
            (ver[2] == 6535 && ver[3] < 5000)
          )
        )
        {
          vuln++;
          info =
            '\n  Product           : 2007 Office system and the Office Compatibility Pack' +
            '\n  File              : ' + path +
            '\n  Installed version : ' + version +
            '\n  Fixed version     : 12.0.6535.5000\n';
          kb = '982331';
          hotfix_add_report(info, bulletin:bulletin, kb:kb);
        }
      }
    }
    if (vuln)
    {
      set_kb_item(name:"SMB/Missing/"+bulletin, value:TRUE);
      hotfix_security_hole();
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, 'affected');