Vulnerabilities > CVE-2009-0563 - Out-of-bounds Write vulnerability in Microsoft products

047910
CVSS 7.8 - HIGH
Attack vector
LOCAL
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
HIGH
Integrity impact
HIGH
Availability impact
HIGH
local
low complexity
microsoft
CWE-787
nessus

Summary

Stack-based buffer overflow in Microsoft Office Word 2002 SP3, 2003 SP3, and 2007 SP1 and SP2; Microsoft Office for Mac 2004 and 2008; Open XML File Format Converter for Mac; Microsoft Office Word Viewer 2003 SP3; Microsoft Office Word Viewer; and Microsoft Office Compatibility Pack for Word, Excel, and PowerPoint 2007 File Formats SP1 and SP2 allows remote attackers to execute arbitrary code via a Word document with a crafted tag containing an invalid length field, aka "Word Buffer Overflow Vulnerability."

Common Weakness Enumeration (CWE)

Msbulletin

bulletin_idMS09-027
bulletin_url
date2009-06-09T00:00:00
impactRemote Code Execution
knowledgebase_id969514
knowledgebase_url
severityCritical
titleVulnerabilities in Microsoft Office Word Could Allow Remote Code Execution

Nessus

  • NASL familyMacOS X Local Security Checks
    NASL idMACOSX_SABPAB_TROJAN.NASL
    descriptionUsing the supplied credentials, Nessus has found evidence that the remote Mac OS X host has been compromised by a Trojan in the OSX/Sabpab (alternatively known as OSX/Sabpub) family of Trojans. OSX/Sabpab is typically installed by means of a malicious Word document that exploits a stack-based buffer overflow in Word (CVE-2009-0563). Once installed, it opens a backdoor for a remote attacker to upload or download files, take screenshots, and run arbitrary commands.
    last seen2020-03-18
    modified2012-04-20
    plugin id58812
    published2012-04-20
    reporterThis script is Copyright (C) 2012-2017 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/58812
    titleMac OS X OSX/Sabpab Trojan Detection
    code
    #TRUSTED 0d3c1a3aa074da38a328e94c4beb1507dd6bb7df1df914554a8069918793180ec4c72edfd1b4e43ecbb070489d63654835abf0f438a3f988ca028a1d824f73d8c81b42fbf6e70e05ea7d7efc8adba8ebe4080ea67ca159ad3eea9a9ae4cde35f7bd0dd02dbb0e85d9885a5b5e451e05394162a9d3584c7d586cc50da6cbfb8591ea9760e0a56f5e402d760424d6dbadad25128f7b560c1238d170519ece1e6651e83d0156b49091fec003677d0afc9e0eeee9990ad230786276d0fc61f256b453f414b1eb74f469969a5ed7d0bd866192f597066a22a051895692478aeac636dab618b4dfa04260b32e989c8b6692ba1c07d0832202e154a5c88b46abae8b3117a6f0701820ead8750ed96a019c597074da9938f273246efb86de8d5333f9bdf77b9e615afff5da76e169994fc1353414663eddf633979127fffb1a916297f4fba8c2da95b1108585c059789fa03fc01c1ae68abadcacfe5cad212e415bfb1636610163c95c8a9213355b8ff976c1705bbff381d887800632eba1cd6eee67c58ae2724f1d1b3b2a0867a2ec37a7be9daa6418ba2c0a8aa8fd0597f22333c3249aba7f1fd2568dddab3ec68776e38b13f68d23520188cbdea749ac897a00ff15ff73066f319fb3d58340e30e981c31925a498fae3ae6d025089141283bf6c79242263fa4e2bed5d5b6137918086000a3f596810f0b6e95fa62d3a86ef61de9fac
    #
    # (C) Tenable Network Security, Inc.
    #
    
    
    if (!defined_func("bn_random")) exit(0);
    
    
    include("compat.inc");
    
    
    if (description)
    {
      script_id(58812);
      script_version("1.3");
      script_set_attribute(attribute:"plugin_modification_date", value:"2017/05/30");
    
      script_name(english:"Mac OS X OSX/Sabpab Trojan Detection");
      script_summary(english:"Checks for evidence of Sabpab");
    
      script_set_attribute(attribute:"synopsis", value:"The remote Mac OS X host appears to have been compromised.");
      script_set_attribute(attribute:"description", value:
    "Using the supplied credentials, Nessus has found evidence that the
    remote Mac OS X host has been compromised by a Trojan in the
    OSX/Sabpab (alternatively known as OSX/Sabpub) family of Trojans.
    
    OSX/Sabpab is typically installed by means of a malicious Word
    document that exploits a stack-based buffer overflow in Word
    (CVE-2009-0563). Once installed, it opens a backdoor for a remote
    attacker to upload or download files, take screenshots, and run
    arbitrary commands.");
      # http://www.sophos.com/en-us/threat-center/threat-analyses/viruses-and-spyware/OSX~Sabpab-A/detailed-analysis.aspx
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?2fbcf878");
      script_set_attribute(attribute:"solution", value:"Restore the system from a known set of good backups.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
    
      script_set_attribute(attribute:"plugin_publication_date", value:"2012/04/20");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"MacOS X Local Security Checks");
    
      script_copyright(english:"This script is Copyright (C) 2012-2017 Tenable Network Security, Inc.");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/MacOSX/Version");
    
      exit(0);
    }
    
    
    include("global_settings.inc");
    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();
    
    if (!get_kb_item("Host/local_checks_enabled")) exit(0, "Local checks are not enabled.");
    
    os = get_kb_item("Host/MacOSX/Version");
    if (!os) exit(0, "The host does not appear to be running Mac OS X.");
    
    
    homes = get_users_homes();
    if (isnull(homes)) exit(1, "Failed to get list of users' home directories.");
    
    report = "";
    foreach user (sort(keys(homes)))
    {
      home = homes[user];
      if (home == "/var/empty" || home == "/dev/null") continue;
    
      cmd1 = strcat('ls "', home, '"/Library/Preferences');
      cmd2 = strcat('ls "', home, '"/Library/LaunchAgents');
      res = exec_cmds(cmds:make_list(cmd1, cmd2));
      if (!isnull(res))
      {
        if (strlen(res[cmd1]) && "com.apple.PubSabAgent.pfile" >< res[cmd1])
          report += '\n  User : ' + user +
                    '\n  File : ' +  home + '/Library/Preferences/com.apple.PubSabAgent.plist';
    
        if (strlen(res[cmd2]) && "com.apple.PubSabAgent.plist" >< res[cmd2])
          report += '\n  User : ' + user +
                    '\n  File : ' +  home + '/Library/LaunchAgents/com.apple.PubSabAgent.plist';
      }
    }
    if (!report) exit(0, "No evidence of OSX/Sabpab was found.");
    
    
    if (report_verbosity > 0) security_hole(port:0, extra:report);
    else security_hole(0);
    
  • NASL familyWindows : Microsoft Bulletins
    NASL idSMB_NT_MS09-027.NASL
    descriptionThe remote Windows host is running a version of Microsoft Word or Word Viewer that is affected by two buffer overflow vulnerabilities. If an attacker can trick a user on the affected host into opening a specially crafted Word file, he could leverage these issues to execute arbitrary code subject to the user
    last seen2020-06-01
    modified2020-06-02
    plugin id39349
    published2009-06-10
    reporterThis script is Copyright (C) 2009-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/39349
    titleMS09-027: Vulnerabilities in Microsoft Office Word Could Allow Remote Code Execution (969514)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    
    include("compat.inc");
    
    
    if (description)
    {
      script_id(39349);
      script_version("1.34");
      script_cvs_date("Date: 2018/11/15 20:50:30");
    
      script_cve_id("CVE-2009-0563", "CVE-2009-0565");
      script_bugtraq_id(35188, 35190);
      script_xref(name:"MSFT", value:"MS09-027");
      script_xref(name:"MSKB", value:"969600");
      script_xref(name:"MSKB", value:"969602");
      script_xref(name:"MSKB", value:"969603");
      script_xref(name:"MSKB", value:"969604");
      script_xref(name:"MSKB", value:"969613");
      script_xref(name:"MSKB", value:"969614");
    
      script_name(english:"MS09-027: Vulnerabilities in Microsoft Office Word Could Allow Remote Code Execution (969514)");
      script_summary(english:"Checks version of Word");
    
      script_set_attribute(attribute:"synopsis", value:
    "Arbitrary code can be executed on the remote host through Microsoft
    Word.");
      script_set_attribute(attribute:"description", value:
    "The remote Windows host is running a version of Microsoft Word or
    Word Viewer that is affected by two buffer overflow vulnerabilities.
    If an attacker can trick a user on the affected host into opening a
    specially crafted Word file, he could 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/2009/ms09-027");
      script_set_attribute(attribute:"see_also", value:"https://www.zerodayinitiative.com/advisories/ZDI-09-035/");
      script_set_attribute(attribute:"solution", value:
    "Microsoft has released a set of patches for Word 2000, 2002, 2003 and
    Word 2007, Word Viewer and Word Viewer 2003 as well as the 2007
    Microsoft Office system and the Microsoft 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_cwe_id(119);
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2009/06/09");
      script_set_attribute(attribute:"patch_publication_date", value:"2009/06/09");
      script_set_attribute(attribute:"plugin_publication_date", value:"2009/06/10");
    
      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:word_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) 2009-2018 Tenable Network Security, Inc.");
    
      script_dependencies("smb_nt_ms02-031.nasl", "office_installed.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_func.inc");
    include("smb_hotfixes.inc");
    include("smb_hotfixes_fcheck.inc");
    include("misc_func.inc");
    include("audit.inc");
    
    
    get_kb_item_or_exit("SMB/MS_Bulletin_Checks/Possible");
    
    bulletin = 'MS09-027';
    kbs = make_list("969600", "969602", "969603", "969604", "969613", "969614");
    if (get_kb_item("Host/patch_management_checks")) hotfix_check_3rd_party(bulletin:bulletin, kbs:kbs, severity:SECURITY_HOLE);
    
    
    if (!get_kb_item("SMB/WindowsVersion")) exit(0, "The 'SMB/WindowsVersion' KB item is missing.");
    
    
    info = "";
    vuln = 0;
    
    # Word.
    installs = get_kb_list("SMB/Office/Word/*/ProductPath");
    if (!isnull(installs))
    {
      foreach install (keys(installs))
      {
        version = install - 'SMB/Office/Word/' - '/ProductPath';
        path = installs[install];
    
        ver = split(version, sep:'.', keep:FALSE);
        for (i=0; i<max_index(ver); i++)
          ver[i] = int(ver[i]);
    
        # Word 2007.
        if (
          ver[0] == 12 && ver[1] == 0 &&
          (
            ver[2] < 6504 ||
            (ver[2] == 6504 && ver[3] < 5000)
          )
        )
        {
          office_sp = get_kb_item("SMB/Office/2007/SP");
          if (!isnull(office_sp) && (office_sp == 1 || office_sp == 2))
          {
            vuln++;
            kb = "969604";
    
            info =
              '\n  Product           : Word 2007' +
              '\n  File              : ' + path +
              '\n  Installed version : ' + version +
              '\n  Fixed version     : 12.0.6504.5000\n';
            hotfix_add_report(info, bulletin:bulletin, kb:kb);
          }
        }
        # Word 2003.
        else if (ver[0] == 11 && ver[1] == 0 && ver[2] < 8307)
        {
          office_sp = get_kb_item("SMB/Office/2003/SP");
          if (!isnull(office_sp) && office_sp == 3)
          {
            vuln++;
            kb = "969603";
    
            info =
              '\n  Product           : Word 2003' +
              '\n  File              : ' + path +
              '\n  Installed version : ' + version +
              '\n  Fixed version     : 11.0.8307.0\n';
            hotfix_add_report(info, bulletin:bulletin, kb:kb);
          }
        }
        # Word 2002.
        else if (ver[0] == 10 && ver[1] == 0 && ver[2] < 6854)
        {
          office_sp = get_kb_item("SMB/Office/XP/SP");
          if (!isnull(office_sp) && office_sp == 3)
          {
            vuln++;
            kb = "969602";
    
            info =
              '\n  Product           : Word 2002' +
              '\n  File              : ' + path +
              '\n  Installed version : ' + version +
              '\n  Fixed version     : 10.0.6854.0\n';
            hotfix_add_report(info, bulletin:bulletin, kb:kb);
          }
        }
        # Word 2000.
        else if (ver[0] == 9 && ver[1] == 0 && ver[2] == 0 && ver[3] < 8979)
        {
          office_sp = get_kb_item("SMB/Office/2000/SP");
          if (!isnull(office_sp) && office_sp == 3)
          {
            vuln++;
            kb = "969600";
    
            info =
              '\n  Product           : Word 2000' +
              '\n  File              : ' + path +
              '\n  Installed version : ' + version +
              '\n  Fixed version     : 9.0.0.8979\n';
            hotfix_add_report(info, bulletin:bulletin, kb:kb);
          }
        }
      }
    }
    
    
    # Word Viewer.
    installs = get_kb_list("SMB/Office/WordViewer/*/ProductPath");
    if (!isnull(installs))
    {
      foreach install (keys(installs))
      {
        version = install - 'SMB/Office/WordViewer/' - '/ProductPath';
        path = installs[install];
    
        ver = split(version, sep:'.', keep:FALSE);
        for (i=0; i<max_index(ver); i++)
          ver[i] = int(ver[i]);
    
        # Word Viewer 2003.
        if (ver[0] == 11 && ver[1] == 0 && ver[2] < 8307)
        {
          vuln++;
          kb = "969614";
    
          info =
            '\n  Product           : Word Viewer / Word Viewer 2003' +
            '\n  File              : ' + path +
            '\n  Installed version : ' + version +
            '\n  Fixed version     : 11.0.8307.0\n';
          hotfix_add_report(info, bulletin:bulletin, kb:kb);
        }
      }
    }
    
    # 2007 Microsoft Office system and the Microsoft Office Compatibility Pack.
    share = '';
    lastshare = '';
    accessibleshare = FALSE;
    installs = get_kb_list("SMB/Office/WordCnv/*/ProductPath");
    if (!isnull(installs))
    {
      foreach install (keys(installs))
      {
        version = install - 'SMB/Office/WordCnv/' - '/ProductPath';
        path = installs[install];
    
        share = hotfix_path2share(path:path);
        if (share != lastshare || !accessibleshare)
        {
          lastshare = share;
          if (is_accessible_share(share:share))
          {
            accessibleshare = TRUE;
          }
          else accessibleshare = FALSE;
        }
        if (accessibleshare)
        {
          path = path - '\\Wordconv.exe';
          file = "wordcnv.dll";
    
          if (hotfix_check_fversion(path:path, file:file, version:"12.0.6504.5000") == HCF_OLDER)
          {
            vuln++;
            file = ereg_replace(pattern:"^[A-Za-z]:(.*)", string:path, replace:"\1\" + file);
            kb_name = "SMB/FileVersions/"+tolower(share-'$')+tolower(str_replace(string:file, find:"\", replace:"/"));
            version = get_kb_item(kb_name);
    
            info =
              '\n  Product           : Microsoft Office Compatibility Pack for Word, Excel, and PowerPoint 2007 File Formats' +
              '\n  File              : ' + path + '\\' + file +
              '\n  Installed version : ' + version +
              '\n  Fixed version     : 12.0.6504.5000' + '\n';
    
            hotfix_add_report(info, bulletin:bulletin, kb:"969613");
          }
        }
      }
    }
    if (vuln)
    {
      set_kb_item(name:"SMB/Missing/"+bulletin, value:TRUE);
      hotfix_security_hole();
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, 'affected');
    
  • NASL familyMacOS X Local Security Checks
    NASL idMACOSX_MS_OFFICE_JUN2009.NASL
    descriptionThe remote Mac OS X host is running a version of Microsoft Office that is affected by several vulnerabilities. If an attacker can trick a user on the affected host into opening a specially crafted Excel, PowerPoint, or Word file, these issues could be leveraged to execute arbitrary code subject to the user
    last seen2019-12-14
    modified2010-10-20
    plugin id50062
    published2010-10-20
    reporterThis script is Copyright (C) 2010-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/50062
    titleMS09-017 / MS09-021 / MS09-027: Vulnerabilities in Microsoft Office Could Allow Remote Code Execution (967340 / 969462 / 969514) (Mac OS X)
    code
    #TRUSTED 3e3f269fc961b6a05759571c09b4b381940164e9ede782e5c3a9a49d4e12c61d0a98ad38db0270182c3ed6e584cc40cd442be95e89c53b9c92aa35347de6ea16dac17dd1876a116601a66c912864b1da4d25ee4ba4a2281472e35b3175c9af529a3854cf08e7024f0bbed16a0df6e9138239297a12b7099b9cc2e6c740916952ec49591770394440db3eea92d7cec0c27d619c9be9d233d0b0642e28fed26a7ffa40f4b2f83d99fc539cfe76d5e7ebbb64d668d32365e17d9d110b4cac0c8ae7b957e92345fdca13b1cbecc5b86cf4e167ee58f1cce9078f212b7f195ccc2dc81dcaad12f3fa7b09dcd0163e7140a230273ac7a9d345d45d6fe50bd50ea1e9c9fb4ffe04bf5c93c9068b3ab9a9b0bbc6ec6a9ef64b99b0a36f814ccc7657044dbf3e70a0417101465b94bf1ff6396f275de6d1510e442298de29305a3f2c69a40f880f7ff0f79706cbf90528974bbae297e3a88a89c0a7d638de102e73667530b615feba0241b59080a3daecd752f88294a53aba95960093d15a5be0fe8159243287c9fdde44067bb30a95d59054d6c95ab126e93fa5fa753941bcacd81c2d2bfe6f7199bffc313d698e8351082df89be11a94577b7798236aea8f05a308fe30134df052af9e8c8f745ada072293e200da40e9acdfb24822e36ec1ae823ea1af4a1c7b7afda5d18570fca395cbe433be84f0be1c6b27955c0d8caf77d3ae9baa
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(50062);
      script_version("1.20");
      script_set_attribute(attribute:"plugin_modification_date", value:"2019/12/13");
    
      script_cve_id(
        "CVE-2009-0224",
        "CVE-2009-0549",
        "CVE-2009-0557",
        "CVE-2009-0558",
        "CVE-2009-0560",
        "CVE-2009-0561",
        "CVE-2009-0563",
        "CVE-2009-0565"
      );
      script_bugtraq_id(34879, 35215, 35241, 35242, 35244, 35245, 35188, 35190);
      script_xref(name:"MSFT", value:"MS09-017");
      script_xref(name:"MSFT", value:"MS09-021");
      script_xref(name:"MSFT", value:"MS09-027");
      script_xref(name:"MSKB", value:"967340");
      script_xref(name:"MSKB", value:"969462");
      script_xref(name:"MSKB", value:"969514");
      script_xref(name:"MSKB", value:"969661");
      script_xref(name:"MSKB", value:"971822");
      script_xref(name:"MSKB", value:"971824");
    
      script_name(english:"MS09-017 / MS09-021 / MS09-027: Vulnerabilities in Microsoft Office Could Allow Remote Code Execution (967340 / 969462 / 969514) (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 Office that
    is affected by several vulnerabilities.
    
    If an attacker can trick a user on the affected host into opening a
    specially crafted Excel, PowerPoint, or Word 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/ms09-017");
      script_set_attribute(attribute:"see_also", value:"http://technet.microsoft.com/en-us/security/bulletin/ms09-021");
      script_set_attribute(attribute:"see_also", value:"http://technet.microsoft.com/en-us/security/bulletin/ms09-027");
      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_cwe_id(94);
      script_cwe_id(119);
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2009/06/09");
      script_set_attribute(attribute:"patch_publication_date", value:"2009/06/09");
      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-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      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.1.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 = '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.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 = '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.0.3';
      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);
      }
    }
    

Oval

accepted2014-06-30T04:11:15.588-04:00
classvulnerability
contributors
  • nameDragos Prisaca
    organizationGideon Technologies, Inc.
  • nameBrendan Miles
    organizationThe MITRE Corporation
  • nameSharath S
    organizationSecPod Technologies
  • namePradeep R B
    organizationSecPod Technologies
  • nameShane Shaffer
    organizationG2, Inc.
  • nameJosh Turpin
    organizationSymantec Corporation
  • nameSergey Artykhov
    organizationALTX-SOFT
  • nameMaria Mikhno
    organizationALTX-SOFT
definition_extensions
  • commentMicrosoft Word 2002 is installed
    ovaloval:org.mitre.oval:def:973
  • commentMicrosoft Word 2003 is installed
    ovaloval:org.mitre.oval:def:475
  • commentMicrosoft Word Viewer is installed
    ovaloval:org.mitre.oval:def:737
  • commentMicrosoft Word 2007 is installed
    ovaloval:org.mitre.oval:def:2074
  • commentMicrosoft Office Compatibility Pack is installed
    ovaloval:org.mitre.oval:def:1853
descriptionStack-based buffer overflow in Microsoft Office Word 2002 SP3, 2003 SP3, and 2007 SP1 and SP2; Microsoft Office for Mac 2004 and 2008; Open XML File Format Converter for Mac; Microsoft Office Word Viewer 2003 SP3; Microsoft Office Word Viewer; and Microsoft Office Compatibility Pack for Word, Excel, and PowerPoint 2007 File Formats SP1 and SP2 allows remote attackers to execute arbitrary code via a Word document with a crafted tag containing an invalid length field, aka "Word Buffer Overflow Vulnerability."
familywindows
idoval:org.mitre.oval:def:6133
statusaccepted
submitted2009-06-09T14:00:00
titleWord Buffer Overflow Vulnerability
version28

Seebug

bulletinFamilyexploit
descriptionBUGTRAQ ID: 35190,35188 CVE(CAN) ID: CVE-2009-0565,CVE-2009-0563 Word是微软Office套件中的文件处理工具。 Word在处理包含有无效长度字段或记录的特制Word文件的方式存在栈溢出漏洞。成功利用此漏洞的攻击者可以完全控制受影响的系统,攻击者可随后安装程序;查看、更改或删除数据;或者创建拥有完全用户权限的新帐户。那些帐户被配置为拥有较少系统用户权限的用户比具有管理用户权限的用户受到的影响要小。 Microsoft Office 2008 for Mac Microsoft Office 2004 for Mac Microsoft Word Viewer 2003 SP3 Microsoft Word Viewer Microsoft Word 2007 SP2 Microsoft Word 2007 SP1 Microsoft Word 2003 SP3 Microsoft Word 2002 SP3 Microsoft Word 2000 SP3 临时解决方法: * 使用Microsoft Office文件阻断策略以防止打开未知或不可信任来源的Office 2003及更早版本的文档。可使用以下注册表脚本为Office 2003设置文件阻断策略: Office 2003 Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\Security\FileOpenBlock] &quot;BinaryFiles&quot;=dword:00000001 2007 Office system Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Excel\Security\FileOpenBlock] &quot;BinaryFiles&quot;=dword:00000001 * 不要打开或保存从不受信任来源或从受信任来源意外收到的Microsoft Office文件。 厂商补丁: Microsoft --------- Microsoft已经为此发布了一个安全公告(MS09-027)以及相应补丁: MS09-027:Vulnerabilities in Microsoft Office Word Could Allow Remote Code Execution (969514) 链接:<a href="http://www.microsoft.com/technet/security/Bulletin/MS09-027.mspx?pf=true" target="_blank" rel=external nofollow>http://www.microsoft.com/technet/security/Bulletin/MS09-027.mspx?pf=true</a>
idSSV:11610
last seen2017-11-19
modified2009-06-13
published2009-06-13
reporterRoot
titleMicrosoft Word畸形记录解析栈溢出漏洞(MS09-027)

The Hacker News

idTHN:F302687043238DADE9721B72B5CEEBCA
last seen2017-01-08
modified2013-02-14
published2013-02-14
reporterMohit Kumar
sourcehttp://thehackernews.com/2013/02/chinese-government-targets-uyghur-group.html
titleChinese Government targets Uyghur group by malware attack