StagerProxy -> PayloadProxy

This commit is contained in:
HD Moore 2015-03-16 12:14:42 -05:00
parent f361e4ee52
commit 69a808b744
4 changed files with 27 additions and 27 deletions

View File

@ -204,8 +204,8 @@ protected
blob.sub!('HTTP_COMMUNICATION_TIMEOUT = 300', "HTTP_COMMUNICATION_TIMEOUT = #{datastore['SessionCommunicationTimeout']}")
blob.sub!('HTTP_USER_AGENT = None', "HTTP_USER_AGENT = '#{var_escape.call(datastore['MeterpreterUserAgent'])}'")
unless datastore['PROXYHOST'].blank? && datastore['StagerProxyHost'].blank?
proxy_url = "http://#{datastore['StagerProxyHost']||datastore['PROXYHOST']}:#{datastore['StagerProxyPort']||datastore['PROXYPORT']}"
unless datastore['PROXYHOST'].blank? && datastore['PayloadProxyHost'].blank?
proxy_url = "http://#{datastore['PayloadProxyHost']||datastore['PROXYHOST']}:#{datastore['PayloadProxyPort']||datastore['PROXYPORT']}"
blob.sub!('HTTP_PROXY = None', "HTTP_PROXY = '#{var_escape.call(proxy_url)}'")
end
@ -268,11 +268,11 @@ protected
:expiration => datastore['SessionExpirationTimeout'],
:comm_timeout => datastore['SessionCommunicationTimeout'],
:ua => datastore['MeterpreterUserAgent'],
:proxyhost => datastore['StagerProxyHost'] || datastore['PROXYHOST'],
:proxyport => datastore['StagerProxyPort'] || datastore['PROXYPORT'],
:proxy_type => datastore['StagerProxyType'] || datastore['PROXY_TYPE'],
:proxy_username => datastore['StagerProxyUser'] || datastore['PROXY_USERNAME'],
:proxy_password => datastore['StagerProxyPass'] || datastore['PROXY_PASSWORD']
:proxyhost => datastore['PayloadProxyHost'] || datastore['PROXYHOST'],
:proxyport => datastore['PayloadProxyPort'] || datastore['PROXYPORT'],
:proxy_type => datastore['PayloadProxyType'] || datastore['PROXY_TYPE'],
:proxy_username => datastore['PayloadProxyUser'] || datastore['PROXY_USERNAME'],
:proxy_password => datastore['PayloadProxyPass'] || datastore['PROXY_PASSWORD']
resp.body = encode_stage(blob)

View File

@ -28,11 +28,11 @@ module Payload::Windows::ReverseHttp
register_advanced_options(
[
OptInt.new('StagerURILength', [false, 'The URI length for the stager (at least 5 bytes)']),
OptString.new('StagerProxyHost', [false, 'An optional proxy server IP address or hostname']),
OptPort.new('StagerProxyPort', [false, 'An optional proxy server port']),
OptString.new('StagerProxyUser', [false, 'An optional proxy server username']),
OptString.new('StagerProxyPass', [false, 'An optional proxy server password']),
OptEnum.new('StagerProxyType', [false, 'The type of HTTP proxy (HTTP or SOCKS)', 'HTTP', ['HTTP', 'SOCKS']]),
OptString.new('PayloadProxyHost', [false, 'An optional proxy server IP address or hostname']),
OptPort.new('PayloadProxyPort', [false, 'An optional proxy server port']),
OptString.new('PayloadProxyUser', [false, 'An optional proxy server username']),
OptString.new('PayloadProxyPass', [false, 'An optional proxy server password']),
OptEnum.new('PayloadProxyType', [false, 'The type of HTTP proxy (HTTP or SOCKS)', 'HTTP', ['HTTP', 'SOCKS']]),
], self.class)
end
@ -55,11 +55,11 @@ module Payload::Windows::ReverseHttp
port: datastore['LPORT'],
url: generate_uri,
exitfunk: datastore['EXITFUNC'],
proxy_host: datastore['StagerProxyHost'],
proxy_port: datastore['StagerProxyPort'],
proxy_user: datastore['StagerProxyUser'],
proxy_pass: datastore['StagerProxyPass'],
proxy_type: datastore['StagerProxyType']
proxy_host: datastore['PayloadProxyHost'],
proxy_port: datastore['PayloadProxyPort'],
proxy_user: datastore['PayloadProxyUser'],
proxy_pass: datastore['PayloadProxyPass'],
proxy_type: datastore['PayloadProxyType']
}
generate_reverse_http(conf)

View File

@ -52,11 +52,11 @@ module Payload::Windows::ReverseHttps
port: datastore['LPORT'],
url: generate_uri,
exitfunk: datastore['EXITFUNC'],
proxy_host: datastore['StagerProxyHost'],
proxy_port: datastore['StagerProxyPort'],
proxy_user: datastore['StagerProxyUser'],
proxy_pass: datastore['StagerProxyPass'],
proxy_type: datastore['StagerProxyType']
proxy_host: datastore['PayloadProxyHost'],
proxy_port: datastore['PayloadProxyPort'],
proxy_user: datastore['PayloadProxyUser'],
proxy_pass: datastore['PayloadProxyPass'],
proxy_type: datastore['PayloadProxyType']
}
generate_reverse_https(conf)

View File

@ -411,11 +411,11 @@ class ClientCore < Extension
:expiration => self.client.expiration,
:comm_timeout => self.client.comm_timeout,
:ua => client.exploit_datastore['MeterpreterUserAgent'],
:proxyhost => client.exploit_datastore['StagerProxyHost'] || client.exploit_datastore['PROXYHOST'],
:proxyport => client.exploit_datastore['StagerProxyPort'] || client.exploit_datastore['PROXYPORT'],
:proxy_type => client.exploit_datastore['StagerProxyType'] || client.exploit_datastore['PROXY_TYPE'],
:proxy_username => client.exploit_datastore['StagerProxyUser'] || client.exploit_datastore['PROXY_USERNAME'],
:proxy_password => client.exploit_datastore['StagerProxyPass'] || client.exploit_datastore['PROXY_PASSWORD']
:proxyhost => client.exploit_datastore['PayloadProxyHost'] || client.exploit_datastore['PROXYHOST'],
:proxyport => client.exploit_datastore['PayloadProxyPort'] || client.exploit_datastore['PROXYPORT'],
:proxy_type => client.exploit_datastore['PayloadProxyType'] || client.exploit_datastore['PROXY_TYPE'],
:proxy_username => client.exploit_datastore['PayloadProxyUser'] || client.exploit_datastore['PROXY_USERNAME'],
:proxy_password => client.exploit_datastore['PayloadProxyPass'] || client.exploit_datastore['PROXY_PASSWORD']
end