Vulnerabilities > CVE-2011-1248 - Improper Input Validation vulnerability in Microsoft Windows Server 2003 and Windows Server 2008

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-20
critical
nessus
exploit available

Summary

WINS in Microsoft Windows Server 2003 SP2 and Server 2008 Gold, SP2, R2, and R2 SP1 does not properly handle socket send exceptions, which allows remote attackers to execute arbitrary code or cause a denial of service (memory corruption) via crafted packets, related to unintended stack-frame values and buffer passing, aka "WINS Service Failed Response Vulnerability."

Common Weakness Enumeration (CWE)

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.
  • Server Side Include (SSI) Injection
    An attacker can use Server Side Include (SSI) Injection to send code to a web application that then gets executed by the web server. Doing so enables the attacker to achieve similar results to Cross Site Scripting, viz., arbitrary code execution and information disclosure, albeit on a more limited scale, since the SSI directives are nowhere near as powerful as a full-fledged scripting language. Nonetheless, the attacker can conveniently gain access to sensitive files, such as password files, and execute shell commands.
  • Cross Zone Scripting
    An attacker is able to cause a victim to load content into their web-browser that bypasses security zone controls and gain access to increased privileges to execute scripting code or other web objects such as unsigned ActiveX controls or applets. This is a privilege elevation attack targeted at zone-based web-browser security. In a zone-based model, pages belong to one of a set of zones corresponding to the level of privilege assigned to that page. Pages in an untrusted zone would have a lesser level of access to the system and/or be restricted in the types of executable content it was allowed to invoke. In a cross-zone scripting attack, a page that should be assigned to a less privileged zone is granted the privileges of a more trusted zone. This can be accomplished by exploiting bugs in the browser, exploiting incorrect configuration in the zone controls, through a cross-site scripting attack that causes the attackers' content to be treated as coming from a more trusted page, or by leveraging some piece of system functionality that is accessible from both the trusted and less trusted zone. This attack differs from "Restful Privilege Escalation" in that the latter correlates to the inadequate securing of RESTful access methods (such as HTTP DELETE) on the server, while cross-zone scripting attacks the concept of security zones as implemented by a browser.
  • Cross Site Scripting through Log Files
    An attacker may leverage a system weakness where logs are susceptible to log injection to insert scripts into the system's logs. If these logs are later viewed by an administrator through a thin administrative interface and the log data is not properly HTML encoded before being written to the page, the attackers' scripts stored in the log will be executed in the administrative interface with potentially serious consequences. This attack pattern is really a combination of two other attack patterns: log injection and stored cross site scripting.
  • 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.

Exploit-Db

descriptionMicrosoft WINS Service <= 5.2.3790.4520 - Memory Corruption. CVE-2011-1248. Dos exploit for windows platform
idEDB-ID:17830
last seen2016-02-02
modified2011-09-13
published2011-09-13
reporterLuigi Auriemma
sourcehttps://www.exploit-db.com/download/17830/
titleMicrosoft WINS Service <= 5.2.3790.4520 - Memory Corruption

Msbulletin

bulletin_idMS11-035
bulletin_url
date2011-05-10T00:00:00
impactRemote Code Execution
knowledgebase_id2524426
knowledgebase_url
severityCritical
titleVulnerability in WINS Could Allow Remote Code Execution

Nessus

  • NASL familyWindows : Microsoft Bulletins
    NASL idSMB_NT_MS11-035.NASL
    descriptionThe version of WINS (Windows Internet Name Service) installed on the remote Windows host is affected by a memory corruption vulnerability due to a logic error when handling a socket send exception. By sending specially crafted packets to the affected WINS system, a remote attacker can potentially exploit this issue to execute arbitrary code as either SYSTEM on Windows 2003 or Local Service on Windows 2008 / 2008 R2. Note that WINS is not installed by default on any of the affected operating systems, although Nessus has determined it is on this host.
    last seen2020-06-01
    modified2020-06-02
    plugin id53858
    published2011-05-10
    reporterThis script is Copyright (C) 2011-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/53858
    titleMS11-035: Vulnerability in WINS Could Allow Remote Code Execution (2524426)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    
    include("compat.inc");
    
    
    if (description)
    {
      script_id(53858);
      script_version("1.17");
      script_cvs_date("Date: 2018/11/15 20:50:30");
    
      script_cve_id("CVE-2011-1248");
      script_bugtraq_id(47730);
      script_xref(name:"EDB-ID", value:"17830");
      script_xref(name:"MSFT", value:"MS11-035");
      script_xref(name:"MSKB", value:"2524426");
    
      script_name(english:"MS11-035: Vulnerability in WINS Could Allow Remote Code Execution (2524426)");
      script_summary(english:"Checks the file version of wins.exe.");
    
      script_set_attribute(
        attribute:"synopsis",
        value:
    "Arbitrary code can be executed on the remote host through Microsoft
    Windows Internet Name Service (WINS)."
      );
      script_set_attribute(
        attribute:"description",
        value:
    "The version of WINS (Windows Internet Name Service) installed on the
    remote Windows host is affected by a memory corruption vulnerability due
    to a logic error when handling a socket send exception.
    
    By sending specially crafted packets to the affected WINS system, a
    remote attacker can potentially exploit this issue to execute arbitrary
    code as either SYSTEM on Windows 2003 or Local Service on Windows 2008 /
    2008 R2.
    
    Note that WINS is not installed by default on any of the affected
    operating systems, although Nessus has determined it is on this host."
      );
      script_set_attribute(attribute:"see_also", value:"https://www.zerodayinitiative.com/advisories/ZDI-11-167/");
      script_set_attribute(attribute:"see_also", value:"https://docs.microsoft.com/en-us/security-updates/SecurityBulletins/2011/ms11-035");
      script_set_attribute(
        attribute:"solution",
        value:
    "Microsoft has released a set of patches for Windows 2003, 2008, and
    2008 R2."
      );
      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:F/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:"vuln_publication_date", value:"2011/05/10");
      script_set_attribute(attribute:"patch_publication_date", value:"2011/05/10");
      script_set_attribute(attribute:"plugin_publication_date", value:"2011/05/10");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:microsoft:windows");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Windows : Microsoft Bulletins");
    
      script_copyright(english:"This script is Copyright (C) 2011-2018 Tenable Network Security, Inc.");
    
      script_dependencies("smb_hotfixes.nasl", "ms_bulletin_checks_possible.nasl");
      script_require_keys("SMB/MS_Bulletin_Checks/Possible");
      script_require_ports(139, 445, 'Host/patch_management_checks');
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("smb_func.inc");
    include("smb_hotfixes.inc");
    include("smb_hotfixes_fcheck.inc");
    include("misc_func.inc");
    
    get_kb_item_or_exit("SMB/MS_Bulletin_Checks/Possible");
    
    bulletin = 'MS11-035';
    kb = '2524426';
    
    kbs = make_list(kb);
    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(win2003:'2', vista:'1,2', win7:'0,1') <= 0) audit(AUDIT_OS_SP_NOT_VULN);
    if ( ! get_kb_item("SMB/Registry/HKLM/SYSTEM/CurrentControlSet/Services/WINS/DisplayName") )
      exit(0, "The host is not running WINS and is therefore not affected.");
    
    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);
    
    if (
      # Windows Server 2003
      hotfix_is_vulnerable(os:"5.2", sp:2, file:"Wins.exe", version:"5.2.3790.4849", dir:"\System32", bulletin:bulletin, kb:kb) ||
    
      # Windows Server 2008
      hotfix_is_vulnerable(os:"6.0", sp:1, file:"Wins.exe", version:"6.0.6001.18629", min_version:"6.0.6001.18000", dir:"\System32", bulletin:bulletin, kb:kb) ||
      hotfix_is_vulnerable(os:"6.0", sp:1, file:"Wins.exe", version:"6.0.6001.22891", min_version:"6.0.6001.22000", dir:"\System32", bulletin:bulletin, kb:kb) ||
      hotfix_is_vulnerable(os:"6.0", sp:2, file:"Wins.exe", version:"6.0.6002.18441", min_version:"6.0.6001.18000", dir:"\System32", bulletin:bulletin, kb:kb) ||
      hotfix_is_vulnerable(os:"6.0", sp:2, file:"Wins.exe", version:"6.0.6002.22621", min_version:"6.0.6002.22000", dir:"\System32", bulletin:bulletin, kb:kb) ||
    
      # Windows Server 2008 R2
      hotfix_is_vulnerable(os:"6.1", sp:0, file:"Wins.exe", version:"6.1.7600.16788", min_version:"6.1.7600.16000", dir:"\System32", bulletin:bulletin, kb:kb) ||
      hotfix_is_vulnerable(os:"6.1", sp:0, file:"Wins.exe", version:"6.1.7600.20934", min_version:"6.1.7600.20000", dir:"\System32", bulletin:bulletin, kb:kb) ||
      hotfix_is_vulnerable(os:"6.1", sp:1, file:"Wins.exe", version:"6.1.7601.17586", min_version:"6.1.7600.17000", dir:"\System32", bulletin:bulletin, kb:kb) ||
      hotfix_is_vulnerable(os:"6.1", sp:1, file:"Wins.exe", version:"6.1.7601.21692", min_version:"6.1.7601.21000", dir:"\System32", bulletin:bulletin, kb:kb)
    )
    {
      set_kb_item(name:"SMB/Missing/"+bulletin, value:TRUE);
      hotfix_security_hole();
      hotfix_check_fversion_end();
      exit(0);
    }
    else
    {
      hotfix_check_fversion_end();
      audit(AUDIT_HOST_NOT, 'affected');
    }
    
  • NASL familyWindows
    NASL idWINS_MS11-035.NASL
    descriptionThe version of WINS (Windows Internet Name Service) installed on the remote Windows host is affected by a memory corruption vulnerability due to a logic error when handling a socket send exception. By sending specially crafted packets to the affected WINS system, a remote attacker can potentially exploit this issue to execute arbitrary code as either SYSTEM on Windows 2003 or Local Service on Windows 2008 / 2008 R2. Note that WINS is not installed by default on any of the affected operating systems, although Nessus has determined it is on this host. Note also that this plugin only checks for the vulnerability in Windows 2003.
    last seen2020-06-01
    modified2020-06-02
    plugin id54585
    published2011-05-19
    reporterThis script is Copyright (C) 2011-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/54585
    titleMS11-035: Vulnerability in WINS Could Allow Remote Code Execution (2524426) (uncredentialed check)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    
    if (description)
    {
      script_id(54585);
      script_version("1.9");
      script_cvs_date("Date: 2018/11/15 20:50:29");
    
      script_cve_id("CVE-2011-1248");
      script_bugtraq_id(47730);
      script_xref(name:"MSFT", value:"MS11-035");
      script_xref(name:"MSKB", value:"2524426");
    
      script_name(english:"MS11-035: Vulnerability in WINS Could Allow Remote Code Execution (2524426) (uncredentialed check)");
      script_summary(english:"Checks uninitialized memory returned in the WINS packet for a known return address.");
    
      script_set_attribute(
        attribute:"synopsis",
        value:
    "Arbitrary code can be executed on the remote host through Microsoft
    Windows Internet Name Service (WINS)."
      );
      script_set_attribute(
        attribute:"description",
        value:
    "The version of WINS (Windows Internet Name Service) installed on the
    remote Windows host is affected by a memory corruption vulnerability
    due to a logic error when handling a socket send exception. 
    
    By sending specially crafted packets to the affected WINS system, a
    remote attacker can potentially exploit this issue to execute  
    arbitrary code as either SYSTEM on Windows 2003 or Local Service on
    Windows 2008 / 2008 R2.   
    
    Note that WINS is not installed by default on any of the affected
    operating systems, although Nessus has determined it is on this host.
    
    Note also that this plugin only checks for the vulnerability in
    Windows 2003."
      );
      script_set_attribute(attribute:"see_also",value:"https://www.zerodayinitiative.com/advisories/ZDI-11-167/");
      script_set_attribute(attribute:"see_also",value:"https://docs.microsoft.com/en-us/security-updates/SecurityBulletins/2011/ms11-035");
      script_set_attribute(
        attribute:"solution",
        value:
    "Microsoft has released a set of patches for Windows 2003, 2008, and
    2008 R2.");
      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:F/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:"vuln_publication_date", value:"2011/05/10");
      script_set_attribute(attribute:"patch_publication_date", value:"2011/05/10");
      script_set_attribute(attribute:"plugin_publication_date", value:"2011/05/19");
    
      script_set_attribute(attribute:"plugin_type", value:"remote");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:microsoft:windows");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Windows");
    
      script_copyright(english:"This script is Copyright (C) 2011-2018 Tenable Network Security, Inc.");
    
      script_dependencies("wins_detect.nasl", "os_fingerprint.nasl");
      script_require_ports(42);
      exit(0);
    }
    
    include("byte_func.inc");
    include("misc_func.inc");
    
    port = get_service(svc:'wins', default:42, exit_on_fail:TRUE);
    if (!get_port_state(port)) exit(0, "Port "+port+" is not open.");
    
    s = open_sock_tcp(port);
    if (!s) exit(0, "Can't open a socket on port "+port+".");
    
    os = get_kb_item("Host/OS");
    if (!isnull(os) && '2003' >!< os)
      exit(1, "This plugin only detects vulnerable installations of Windows 2003.");
    
    # Build a request that's missing padding
    request = mkdword(0x00007800) + # opcode (supposed to be 0)
              mkdword(0x00000000) + # context (0 for the first packet)
              mkdword(0x00000000) + # message type (start_association = 0)
              mkdword(0x00000040) + # context (will be echoed back)
              mkword(0x0002) + # minor version
              mkword(0x0005);  # major version
              # There should be padding up to 0x29 bytes here (0x15 bytes)
              # The patched version checks for padding, unpatched doesn't
    # Length
    request = mkdword(strlen(request)) + request;
    
    # Send the initial request and see if it fails
    send(socket:s, data:request);
    r = recv(socket:s, length:0xFFFF);
    if (isnull(r)) patched = TRUE;
    else patched = FALSE;
    
    # Just to make sure the server's actually responding, send a second (valid)
    # request that both patched and unpatched responds to
    request = mkdword(0x00007800) + # opcode (supposed to be 0)
              mkdword(0x00000000) + # context (0 for the first packet)
              mkdword(0x00000000) + # message type (start_association = 0)
              mkdword(0x00000012) + # context (will be echoed back)
              mkword(0x0002) + # minor version
              mkword(0x0005) + # major version
              crap(length:0x15); # proper padding
    # Length
    request = mkdword(strlen(request)) + request;
    send(socket:s, data:request);
    r = recv(socket:s, length:0xFFFF);
    if (isnull(r)) exit(1, "The server on port "+port+" failed to respond.");
    
    # Make sure we're seeing the correct response and not a delayed response to
    # the first message
    context = getdword(blob:r, pos:8);
    if (context != 0x00000012)
      exit(1, "The server on port "+port+" returned an unexpected response.");
    
    
    # Clean up the connection
    request = mkdword(0x00007800) + # opcode (supposed to be 0)
              mkdword(0x00000040) + # context
              mkdword(0x00000002) + # message type (stop_association = 2)
              mkdword(0x00000000) + # stop reason (0 = normal, 4 = error)
              crap(length:0x18); # padding
    request = mkdword(strlen(request)) + request;
    send(socket:s, data:request);
    close(s);
    
    if (!patched)
    {
      security_hole(port);
      exit(0);
    }
    else exit(0, "The WINS server on port "+port+" is not affected.");
    

Oval

accepted2012-03-26T04:02:40.404-04:00
classvulnerability
contributors
  • nameJosh Turpin
    organizationSymantec Corporation
  • nameDragos Prisaca
    organizationSymantec Corporation
definition_extensions
  • 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
  • commentMicrosoft Windows Server 2008 (32-bit) is installed
    ovaloval:org.mitre.oval:def:4870
  • commentMicrosoft Windows Server 2008 (64-bit) is installed
    ovaloval:org.mitre.oval:def:5356
  • commentMicrosoft Windows Server 2008 (32-bit) Service Pack 2 is installed
    ovaloval:org.mitre.oval:def:5653
  • commentMicrosoft Windows Server 2008 x64 Edition Service Pack 2 is installed
    ovaloval:org.mitre.oval:def:6216
  • commentMicrosoft Windows Server 2008 R2 x64 Edition is installed
    ovaloval:org.mitre.oval:def:6438
  • commentMicrosoft Windows Server 2008 R2 x64 Service Pack 1 is installed
    ovaloval:org.mitre.oval:def:12567
descriptionWINS in Microsoft Windows Server 2003 SP2 and Server 2008 Gold, SP2, R2, and R2 SP1 does not properly handle socket send exceptions, which allows remote attackers to execute arbitrary code or cause a denial of service (memory corruption) via crafted packets, related to unintended stack-frame values and buffer passing, aka "WINS Service Failed Response Vulnerability."
familywindows
idoval:org.mitre.oval:def:12724
statusaccepted
submitted2011-05-10T13:00:00
titleWINS Service Failed Response Vulnerability
version76