Vulnerabilities > CVE-2010-1885 - OS Command Injection vulnerability in Microsoft products

047910
CVSS 9.3 - CRITICAL
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
network
microsoft
CWE-78
critical
nessus
exploit available
metasploit

Summary

The MPC::HexToNum function in helpctr.exe in Microsoft Windows Help and Support Center in Windows XP and Windows Server 2003 does not properly handle malformed escape sequences, which allows remote attackers to bypass the trusted documents whitelist (fromHCP option) and execute arbitrary commands via a crafted hcp:// URL, aka "Help Center URL Validation Vulnerability." Per: http://blogs.technet.com/b/msrc/archive/2010/06/10/windows-help-vulnerability-disclosure.aspx "customers running Windows Vista, Windows 7, Windows Server 2008, and Windows Server 2008 R2, are not vulnerable to this issue, or at risk of attack."

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Command Line Execution through SQL Injection
    An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.
  • Command Delimiters
    An attack of this type exploits a programs' vulnerabilities that allows an attacker's commands to be concatenated onto a legitimate command with the intent of targeting other resources such as the file system or database. The system that uses a filter or a blacklist input validation, as opposed to whitelist validation is vulnerable to an attacker who predicts delimiters (or combinations of delimiters) not present in the filter or blacklist. As with other injection attacks, the attacker uses the command delimiter payload as an entry point to tunnel through the application and activate additional attacks through SQL queries, shell commands, network scanning, and so on.
  • Exploiting Multiple Input Interpretation Layers
    An attacker supplies the target software with input data that contains sequences of special characters designed to bypass input validation logic. This exploit relies on the target making multiples passes over the input data and processing a "layer" of special characters with each pass. In this manner, the attacker can disguise input that would otherwise be rejected as invalid by concealing it with layers of special/escape characters that are stripped off by subsequent processing steps. The goal is to first discover cases where the input validation layer executes before one or more parsing layers. That is, user input may go through the following logic in an application: In such cases, the attacker will need to provide input that will pass through the input validator, but after passing through parser2, will be converted into something that the input validator was supposed to stop.
  • Argument Injection
    An attacker changes the behavior or state of a targeted application through injecting data or command syntax through the targets use of non-validated and non-filtered arguments of exposed services or methods.
  • OS Command Injection
    In this type of an attack, an adversary injects operating system commands into existing application functions. An application that uses untrusted input to build command strings is vulnerable. An adversary can leverage OS command injection in an application to elevate privileges, execute arbitrary commands and compromise the underlying operating system.

Exploit-Db

  • descriptionMicrosoft Windows Help Centre Handles Malformed Escape Sequences Incorrectly. CVE-2010-1885. Remote exploit for windows platform
    fileexploits/windows/remote/13808.txt
    idEDB-ID:13808
    last seen2016-02-01
    modified2010-06-10
    platformwindows
    port
    published2010-06-10
    reporterTavis Ormandy
    sourcehttps://www.exploit-db.com/download/13808/
    titleMicrosoft Windows Help Centre Handles Malformed Escape Sequences Incorrectly
    typeremote
  • descriptionMicrosoft Help Center XSS and Command Execution. CVE-2010-1885. Remote exploit for windows platform
    idEDB-ID:16545
    last seen2016-02-02
    modified2010-09-20
    published2010-09-20
    reportermetasploit
    sourcehttps://www.exploit-db.com/download/16545/
    titleMicrosoft Help Center XSS and Command Execution

Metasploit

descriptionHelp and Support Center is the default application provided to access online documentation for Microsoft Windows. Microsoft supports accessing help documents directly via URLs by installing a protocol handler for the scheme "hcp". Due to an error in validation of input to hcp:// combined with a local cross site scripting vulnerability and a specialized mechanism to launch the XSS trigger, arbitrary command execution can be achieved. On IE7 on XP SP2 or SP3, code execution is automatic. If WMP9 is installed, it can be used to launch the exploit automatically. If IE8 and WMP11, either can be used to launch the attack, but both pop dialog boxes asking the user if execution should continue. This exploit detects if non-intrusive mechanisms are available and will use one if possible. In the case of both IE8 and WMP11, the exploit defaults to using an iframe on IE8, but is configurable by setting the DIALOGMECH option to "none" or "player". This module creates a WebDAV service from which the payload is copied to the victim machine.
idMSF:EXPLOIT/WINDOWS/BROWSER/MS10_042_HELPCTR_XSS_CMD_EXEC
last seen2020-06-14
modified1976-01-01
published1976-01-01
referenceshttps://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-1885
reporterRapid7
sourcehttps://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/windows/browser/ms10_042_helpctr_xss_cmd_exec.rb
titleMicrosoft Help Center XSS and Command Execution

Msbulletin

bulletin_idMS10-042
bulletin_url
date2010-07-13T00:00:00
impactRemote Code Execution
knowledgebase_id2229593
knowledgebase_url
severityCritical
titleVulnerability in Help and Support Center Could Allow Remote Code Execution

Nessus

  • NASL familyWindows : Microsoft Bulletins
    NASL idSMB_NT_MS10-042.NASL
    descriptionThe Windows Help and Support Center does not properly validate HCP URLs, which are associated normally with the Windows Help and Support Center. If an attacker can trick a user on the affected host into viewing a specially crafted web page or clicking on a specially crafted link in an email message, he can leverage this issue to execute arbitrary code subject to the user
    last seen2020-06-01
    modified2020-06-02
    plugin id47710
    published2010-07-13
    reporterThis script is Copyright (C) 2010-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/47710
    titleMS10-042: Vulnerability in Help and Support Center Could Allow Remote Code Execution (2229593)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(47710);
      script_version("1.24");
      script_cvs_date("Date: 2018/11/15 20:50:30");
    
      script_cve_id("CVE-2010-1885");
      script_bugtraq_id(40725);
      script_xref(name:"CERT", value:"578319");
      script_xref(name:"EDB-ID", value:"13808");
      script_xref(name:"IAVA", value:"2010-A-0095");
      script_xref(name:"MSFT", value:"MS10-042");
      script_xref(name:"MSKB", value:"2229593");
    
      script_name(english:"MS10-042: Vulnerability in Help and Support Center Could Allow Remote Code Execution (2229593)");
      script_summary(english:"Checks version of Helpsvc.exe");
    
      script_set_attribute(attribute:"synopsis", value:
    "It is possible to execute arbitrary code on the remote Windows host
    through the Windows Help and Support Center feature.");
      script_set_attribute(attribute:"description", value:
    "The Windows Help and Support Center does not properly validate HCP
    URLs, which are associated normally with the Windows Help and Support
    Center.
    
    If an attacker can trick a user on the affected host into viewing a
    specially crafted web page or clicking on a specially crafted link in
    an email message, he can leverage this issue 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-042");
      script_set_attribute(attribute:"solution", value:"Microsoft has released a set of patches for Windows XP and 2003.");
      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:'Microsoft Help Center XSS and Command Execution');
      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:'CANVAS');
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2010/06/10");
      script_set_attribute(attribute:"patch_publication_date", value:"2010/07/13");
      script_set_attribute(attribute:"plugin_publication_date", value:"2010/07/13");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:microsoft:windows");
      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) 2010-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("misc_func.inc");
    include("smb_hotfixes_fcheck.inc");
    include("smb_hotfixes.inc");
    include("smb_func.inc");
    
    get_kb_item_or_exit("SMB/MS_Bulletin_Checks/Possible");
    
    bulletin = 'MS10-042';
    kbs = make_list("2229593");
    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);
    
    if (hotfix_check_sp_range(xp:'2,3', win2003:'2') <= 0) audit(AUDIT_OS_SP_NOT_VULN);
    
    rootfile = hotfix_get_systemroot();
    if (!rootfile) exit(1, "Failed to get the system root.");
    
    share = hotfix_path2share(path:rootfile);
    if (!is_accessible_share(share:share)) audit(AUDIT_SHARE_FAIL, share);
    
    kb = '2229593';
    if (
      # Windows 2003 and XP x64
      hotfix_is_vulnerable(os:"5.2", sp:2,             file:"Helpsvc.exe", version:"5.2.3790.4726", dir:"\PCHEALTH\HELPCTR\Binaries", bulletin:bulletin, kb:kb) ||
    
      # Windows XP
      hotfix_is_vulnerable(os:"5.1", sp:3, arch:"x86", file:"Helpsvc.exe", version:"5.1.2600.5997", dir:"\PCHEALTH\HELPCTR\Binaries", bulletin:bulletin, kb:kb) ||
      hotfix_is_vulnerable(os:"5.1", sp:2, arch:"x86", file:"Helpsvc.exe", version:"5.1.2600.3720", dir:"\PCHEALTH\HELPCTR\Binaries", bulletin:bulletin, kb:kb)
    )
    {
      set_kb_item(name:"SMB/Missing/MS10-042", value:TRUE);
      hotfix_security_hole();
    
      hotfix_check_fversion_end();
      exit(0);
    }
    else
    {
      hotfix_check_fversion_end();
      audit(AUDIT_HOST_NOT, 'affected');
    }
    
  • NASL familyWindows
    NASL idSMB_KB_2219475.NASL
    descriptionIf a remote attacker can trick a user on the affected host into accessing a malicious web page containing specially crafted
    last seen2020-06-01
    modified2020-06-02
    plugin id47045
    published2010-06-18
    reporterThis script is Copyright (C) 2010-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/47045
    titleMS KB2219475: Windows Help Center hcp:// Protocol Handler Arbitrary Code Execution
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    
    include("compat.inc");
    
    
    if (description)
    {
      script_id(47045);
      script_version("1.28");
      script_cvs_date("Date: 2018/11/15 20:50:28");
    
      script_cve_id("CVE-2010-1885", "CVE-2010-2265");
      script_bugtraq_id(40721, 40725);
      script_xref(name:"CERT", value:"578319");
      script_xref(name:"IAVA", value:"2010-A-0095");
      script_xref(name:"MSFT", value:"MS10-042");
      script_xref(name:"MSKB", value:"2219475");
    
      script_name(english:"MS KB2219475: Windows Help Center hcp:// Protocol Handler Arbitrary Code Execution");
      script_summary(english:"Checks whether the hcp protocol has been unregistered");
    
      script_set_attribute(attribute:"synopsis", value:
    "It may be possible to execute arbitrary code on the remote host using
    Windows Help and Support Center.");
      script_set_attribute(attribute:"description", value:
    "If a remote attacker can trick a user on the affected host into
    accessing a malicious web page containing specially crafted 'hcp://'
    URLs, an as-yet unpatched vulnerability in Windows Help and Support
    Center that arises due to its failure to validate URLs that use the
    HCP protocol could be leveraged to execute arbitrary code on the host
    subject to the user's privileges.");
      script_set_attribute(
        attribute:"see_also",
        value:"https://seclists.org/fulldisclosure/2010/Jun/205"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://docs.microsoft.com/en-us/security-updates/SecurityAdvisories/2010/2219475"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://docs.microsoft.com/en-us/security-updates/SecurityBulletins/2010/ms10-042"
      );
      script_set_attribute(attribute:"solution", value:
    "Either apply MS10-042 or consider unregistering the HCP protocol as a
    workaround.
    
    Note, though, that applying the workaround will break local,
    legitimate help links that use 'hcp://'.");
      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:'Microsoft Help Center XSS and Command Execution');
      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:'CANVAS');
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2010/06/09");
      script_set_attribute(attribute:"plugin_publication_date", value:"2010/06/18");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:microsoft:windows");
      script_set_attribute(attribute:"stig_severity", value:"II");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Windows");
    
      script_copyright(english:"This script is Copyright (C) 2010-2018 Tenable Network Security, Inc.");
    
      script_dependencies("smb_hotfixes.nasl", "smb_nt_ms10-042.nasl");
      script_require_keys("SMB/Registry/Enumerated", "SMB/WindowsVersion", "SMB/Missing/MS10-042");
      script_require_ports(139, 445);
    
      exit(0);
    }
    
    
    include("smb_func.inc");
    include("smb_hotfixes.inc");
    include("smb_hotfixes_fcheck.inc");
    include("audit.inc");
    
    
    if (!get_kb_item('SMB/WindowsVersion')) exit(1, "The 'SMB/WindowsVersion' KB item is missing.");
    if (hotfix_check_sp(xp:4, win2003:3) <= 0) exit(0, "The host is not affected based on its version / service pack.");
    if (!get_kb_item("SMB/Missing/MS10-042")) exit(0, "The host is not affected because the 'SMB/Missing/MS10-042' KB item is missing.");
    
    
    # Connect to the appropriate share.
    login   =  kb_smb_login();
    pass    =  kb_smb_password();
    domain  =  kb_smb_domain();
    port    =  kb_smb_transport();
    
    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();
      exit(1, "Can't connect to IPC$ share.");
    }
    
    hkcr = RegConnectRegistry(hkey:HKEY_CLASS_ROOT);
    if (isnull(hkcr))
    {
      NetUseDel();
      exit(1, "Can't connect to remote registry.");
    }
    
    
    hcp_installed = FALSE;
    hcp_label = "";
    hcp_handler = "";
    
    key = "HCP";
    key_h = RegOpenKey(handle:hkcr, key:key, mode:MAXIMUM_ALLOWED);
    if (!isnull(key_h))
    {
      # nb: per <http://msdn.microsoft.com/en-us/library/aa767914%28VS.85%29.aspx>,
      #     the "URL Protocol" string must be present.
      value = RegQueryValue(handle:key_h, item:"URL Protocol");
      if (!isnull(value))
      {
        hcp_installed = TRUE;
    
        value = RegQueryValue(handle:key_h, item:NULL);
        if (!isnull(value)) hcp_label = value[1];
    
        key2 = key + "\shell\open\command";
        key2_h = RegOpenKey(handle:hkcr, key:key2, mode:MAXIMUM_ALLOWED);
        if (!isnull(key2_h))
        {
          value = RegQueryValue(handle:key2_h, item:NULL);
          if (!isnull(value)) hcp_handler = value[1];
    
          RegCloseKey(handle:key2_h);
        }
      }
    
      RegCloseKey(handle:key_h);
    }
    RegCloseKey(handle:hkcr);
    NetUseDel();
    
    
    if (hcp_installed)
    {
      if (hcp_handler)
      {
        if (report_verbosity > 0)
        {
          if (!hcp_label) hcp_label = 'n/a';
    
          report = '\n  Label   : ' + hcp_label +
                   '\n  Handler : ' + hcp_handler + '\n';
          security_hole(port:port, extra:report);
        }
        else security_hole(port);
        exit(0);
      }
      else exit(0, "The HCP protocol handler has been unregistered.");
    }
    else exit(0, "The HCP protocol handler has been deleted.");
    

Oval

accepted2010-08-23T04:00:17.837-04:00
classvulnerability
contributors
nameDragos Prisaca
organizationSymantec Corporation
definition_extensions
  • commentMicrosoft Windows XP (x86) SP2 is installed
    ovaloval:org.mitre.oval:def:754
  • commentMicrosoft Windows XP (x86) SP3 is installed
    ovaloval:org.mitre.oval:def:5631
  • commentMicrosoft Windows XP x64 Edition SP2 is installed
    ovaloval:org.mitre.oval:def:4193
  • commentMicrosoft Windows Server 2003 SP2 (x86) is installed
    ovaloval:org.mitre.oval:def:1935
  • commentMicrosoft Windows Server 2003 SP2 (x64) is installed
    ovaloval:org.mitre.oval:def:2161
  • commentMicrosoft Windows Server 2003 (ia64) SP2 is installed
    ovaloval:org.mitre.oval:def:1442
descriptionThe MPC::HexToNum function in helpctr.exe in Microsoft Windows Help and Support Center in Windows XP and Windows Server 2003 does not properly handle malformed escape sequences, which allows remote attackers to bypass the trusted documents whitelist (fromHCP option) and execute arbitrary commands via a crafted hcp:// URL, aka "Help Center URL Validation Vulnerability."
familywindows
idoval:org.mitre.oval:def:11733
statusaccepted
submitted2010-07-13T13:00:00
titleHelp Center URL Validation Vulnerability
version37

Packetstorm

Saint

bid40725
descriptionWindows Help and Support Center -FromHCP URL whitelist bypass
idwin_patch_helpcenter10042
osvdb65264
titlewindows_helpctr_fromhcp_whitelist_bypass
typeclient

Seebug

bulletinFamilyexploit
descriptionBUGTRAQ ID: 40725,40721 CVE ID: CVE-2010-1885 Windows是微软发布的非常流行的操作系统。 Windows中默认提供了帮助和支持中心以访问在线文档,可通过hcp://形式的URL直接访问帮助文档。在通过注册的协议处理器调用hcp:// URL时,会向帮助中心应用传送命令行参数/fromhcp,这个标记将帮助中心切换到受限制的模式,仅允许白名单中的帮助文档和参数。但这个白名单实现并不安全,可能被绕过。 在进行验证之前首先要使用MPC::HTML::UrlUnescapeW()函数规范化和转义URL,该函数使用MPC::HexToNum()将 URL转义序列翻译为原始字符。相关代码如下: .text:0106684C Unescape: .text:0106684C cmp di, '%' ; di contains the current wchar in the input URL. .text:01066850 jnz short LiteralChar ; if this is not a '%', it must be a literal character. .text:01066852 push esi ; esi contains a pointer to the current position in URL to unescape. .text:01066853 call ds:wcslen ; find the remaining length. .text:01066859 cmp word ptr [esi], 'u' ; if the next wchar is 'u', this is a unicode escape and I need 4 xdigits. .text:0106685D pop ecx ; this sequence calculates the number of wchars needed (4 or 2). .text:0106685E setz cl ; i.e. %uXXXX (four needed), or %XX (two needed). .text:01066861 mov dl, cl .text:01066863 neg dl .text:01066865 sbb edx, edx .text:01066867 and edx, 3 .text:0106686A inc edx .text:0106686B inc edx .text:0106686C cmp eax, edx ; test if I have enough characters in input to decode. .text:0106686E jl short LiteralChar ; if not enough, this '%' is considered literal. .text:01066870 test cl, cl .text:01066872 movzx eax, word ptr [esi+2] .text:01066876 push eax .text:01066877 jz short NotUnicode .text:01066879 call HexToNum ; call MPC::HexToNum() to convert this nibble (4 bits) to an integer. .text:0106687E mov edi, eax ; edi contains the running total of the value of this escape sequence. .text:01066880 movzx eax, word ptr [esi+4] .text:01066884 push eax .text:01066885 shl edi, 4 ; shift edi left 4 positions to make room for the next digit, i.e. total &lt;&lt;= 4; .text:01066888 call HexToNum .text:0106688D or edi, eax ; or the next value into the 4-bit gap, i.e. total |= val. .text:0106688F movzx eax, word ptr [esi+6]; this process continues for the remaining wchars. .text:01066893 push eax .text:01066894 shl edi, 4 .text:01066897 call HexToNum .text:0106689C or edi, eax .text:0106689E movzx eax, word ptr [esi+8] .text:010668A2 push eax .text:010668A3 shl edi, 4 .text:010668A6 call HexToNum .text:010668AB or edi, eax .text:010668AD add esi, 0Ah ; account for number of bytes (not chars) consumed by the escape. .text:010668B0 jmp short FinishedEscape .text:010668B2 .text:010668B2 NotUnicode: .text:010668B2 call HexToNum ; this is the same code, but for non-unicode sequences (e.g. %41, instead of %u0041) .text:010668B7 mov edi, eax .text:010668B9 movzx eax, word ptr [esi] .text:010668BC push eax .text:010668BD call HexToNum .text:010668C2 shl eax, 4 .text:010668C5 or edi, eax .text:010668C7 add esi, 4 ; account for number of bytes (not chars) consumed by the escape. .text:010668CA .text:010668CA FinishedEscape: .text:010668CA test di, di .text:010668CD jz short loc_10668DA .text:010668CF .text:010668CF LiteralChar: .text:010668CF push edi ; append the final value to the normalised string using a std::string append. .text:010668D0 mov ecx, [ebp+unescaped] .text:010668D3 push 1 .text:010668D5 call std::string::append .text:010668DA mov di, [esi] ; fetch the next input character. .text:010668DD test di, di ; have we reached the NUL terminator? .text:010668E0 jnz Unescape ; process next char. MPC::HexToNum()处理出错情况的方式存在错误,相关代码如下: .text:0102D32A mov edi, edi .text:0102D32C push ebp .text:0102D32D mov ebp, esp ; function prologue. .text:0102D32F mov eax, [ebp+arg_0] ; fetch the character to convert. .text:0102D332 cmp eax, '0' .text:0102D335 jl short CheckUppercase ; is it a digit? .text:0102D337 cmp eax, '9' .text:0102D33A jg short CheckUppercase .text:0102D33C add eax, 0FFFFFFD0h ; atoi(), probably written val - '0' and optimised by compiler. .text:0102D33F jmp short Complete .text:0102D341 CheckUppercase: .text:0102D341 cmp eax, 'A' .text:0102D344 jl short CheckLowercase ; is it an uppercase xdigit? .text:0102D346 cmp eax, 'F' .text:0102D349 jg short CheckLowercase .text:0102D34B add eax, 0FFFFFFC9h ; atoi() .text:0102D34E jmp short Complete .text:0102D350 CheckLowercase: .text:0102D350 cmp eax, 'a' .text:0102D353 jl short Invalid ; lowercase xdigit? .text:0102D355 cmp eax, 'f' .text:0102D358 jg short Invalid .text:0102D35A add eax, 0FFFFFFA9h ; atoi() .text:0102D35D jmp short Complete .text:0102D35F Invalid: .text:0102D35F or eax, 0FFFFFFFFh ; invalid character, return -1 .text:0102D362 Complete: .text:0102D362 pop ebp .text:0102D363 retn 4 MPC::HTML::UrlUnescapeW()没有按照需求检查MPC::HexToNum()的返回代码,因此可能向std::strings附加内容,之后可以利用代码中的计算错误绕过/fromhcp白名单。 攻击者可以通过使用特制的hcp:// URL打开sysinfomain.htm帮助文档时的输入验证错误来利用这个漏洞执行任意命令。 Microsoft Windows XP SP3 Microsoft Windows XP SP2 Microsoft Windows Server 2003 SP2 临时解决方法: * 暂时去除HCP协议的注册 在命令窗口中执行: reg export HKEY_CLASSES_ROOT\HCP hcp_backup.reg 备份注册表中相关的表项到备份文件。 然后执行: reg delete HKEY_CLASSES_ROOT\HCP /f 删除相关的注册表项去除系统的HCP协议注册。在微软发布的相关漏洞补丁安装以后,双击备份出来的hcp_backup.reg文件导入数据到注册表后即可恢复对HCP的支持。 厂商补丁: Microsoft --------- 目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本: http://www.microsoft.com/technet/security/
idSSV:19788
last seen2017-11-19
modified2010-06-12
published2010-06-12
reporterRoot
sourcehttps://www.seebug.org/vuldb/ssvid-19788
titleMicrosoft Windows帮助和支持中心绕过白名单限制漏洞