Skip to content

Commit 69a808b

Browse files
author
HD Moore
committed
StagerProxy -> PayloadProxy
1 parent f361e4e commit 69a808b

File tree

4 files changed

+27
-27
lines changed

4 files changed

+27
-27
lines changed

lib/msf/core/handler/reverse_http.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ def on_request(cli, req, obj)
204204
blob.sub!('HTTP_COMMUNICATION_TIMEOUT = 300', "HTTP_COMMUNICATION_TIMEOUT = #{datastore['SessionCommunicationTimeout']}")
205205
blob.sub!('HTTP_USER_AGENT = None', "HTTP_USER_AGENT = '#{var_escape.call(datastore['MeterpreterUserAgent'])}'")
206206

207-
unless datastore['PROXYHOST'].blank? && datastore['StagerProxyHost'].blank?
208-
proxy_url = "http://#{datastore['StagerProxyHost']||datastore['PROXYHOST']}:#{datastore['StagerProxyPort']||datastore['PROXYPORT']}"
207+
unless datastore['PROXYHOST'].blank? && datastore['PayloadProxyHost'].blank?
208+
proxy_url = "http://#{datastore['PayloadProxyHost']||datastore['PROXYHOST']}:#{datastore['PayloadProxyPort']||datastore['PROXYPORT']}"
209209
blob.sub!('HTTP_PROXY = None', "HTTP_PROXY = '#{var_escape.call(proxy_url)}'")
210210
end
211211

@@ -268,11 +268,11 @@ def on_request(cli, req, obj)
268268
:expiration => datastore['SessionExpirationTimeout'],
269269
:comm_timeout => datastore['SessionCommunicationTimeout'],
270270
:ua => datastore['MeterpreterUserAgent'],
271-
:proxyhost => datastore['StagerProxyHost'] || datastore['PROXYHOST'],
272-
:proxyport => datastore['StagerProxyPort'] || datastore['PROXYPORT'],
273-
:proxy_type => datastore['StagerProxyType'] || datastore['PROXY_TYPE'],
274-
:proxy_username => datastore['StagerProxyUser'] || datastore['PROXY_USERNAME'],
275-
:proxy_password => datastore['StagerProxyPass'] || datastore['PROXY_PASSWORD']
271+
:proxyhost => datastore['PayloadProxyHost'] || datastore['PROXYHOST'],
272+
:proxyport => datastore['PayloadProxyPort'] || datastore['PROXYPORT'],
273+
:proxy_type => datastore['PayloadProxyType'] || datastore['PROXY_TYPE'],
274+
:proxy_username => datastore['PayloadProxyUser'] || datastore['PROXY_USERNAME'],
275+
:proxy_password => datastore['PayloadProxyPass'] || datastore['PROXY_PASSWORD']
276276

277277
resp.body = encode_stage(blob)
278278

lib/msf/core/payload/windows/reverse_http.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ def initialize(*args)
2828
register_advanced_options(
2929
[
3030
OptInt.new('StagerURILength', [false, 'The URI length for the stager (at least 5 bytes)']),
31-
OptString.new('StagerProxyHost', [false, 'An optional proxy server IP address or hostname']),
32-
OptPort.new('StagerProxyPort', [false, 'An optional proxy server port']),
33-
OptString.new('StagerProxyUser', [false, 'An optional proxy server username']),
34-
OptString.new('StagerProxyPass', [false, 'An optional proxy server password']),
35-
OptEnum.new('StagerProxyType', [false, 'The type of HTTP proxy (HTTP or SOCKS)', 'HTTP', ['HTTP', 'SOCKS']]),
31+
OptString.new('PayloadProxyHost', [false, 'An optional proxy server IP address or hostname']),
32+
OptPort.new('PayloadProxyPort', [false, 'An optional proxy server port']),
33+
OptString.new('PayloadProxyUser', [false, 'An optional proxy server username']),
34+
OptString.new('PayloadProxyPass', [false, 'An optional proxy server password']),
35+
OptEnum.new('PayloadProxyType', [false, 'The type of HTTP proxy (HTTP or SOCKS)', 'HTTP', ['HTTP', 'SOCKS']]),
3636
], self.class)
3737
end
3838

@@ -55,11 +55,11 @@ def generate
5555
port: datastore['LPORT'],
5656
url: generate_uri,
5757
exitfunk: datastore['EXITFUNC'],
58-
proxy_host: datastore['StagerProxyHost'],
59-
proxy_port: datastore['StagerProxyPort'],
60-
proxy_user: datastore['StagerProxyUser'],
61-
proxy_pass: datastore['StagerProxyPass'],
62-
proxy_type: datastore['StagerProxyType']
58+
proxy_host: datastore['PayloadProxyHost'],
59+
proxy_port: datastore['PayloadProxyPort'],
60+
proxy_user: datastore['PayloadProxyUser'],
61+
proxy_pass: datastore['PayloadProxyPass'],
62+
proxy_type: datastore['PayloadProxyType']
6363
}
6464

6565
generate_reverse_http(conf)

lib/msf/core/payload/windows/reverse_https.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ def generate
5252
port: datastore['LPORT'],
5353
url: generate_uri,
5454
exitfunk: datastore['EXITFUNC'],
55-
proxy_host: datastore['StagerProxyHost'],
56-
proxy_port: datastore['StagerProxyPort'],
57-
proxy_user: datastore['StagerProxyUser'],
58-
proxy_pass: datastore['StagerProxyPass'],
59-
proxy_type: datastore['StagerProxyType']
55+
proxy_host: datastore['PayloadProxyHost'],
56+
proxy_port: datastore['PayloadProxyPort'],
57+
proxy_user: datastore['PayloadProxyUser'],
58+
proxy_pass: datastore['PayloadProxyPass'],
59+
proxy_type: datastore['PayloadProxyType']
6060
}
6161

6262
generate_reverse_https(conf)

lib/rex/post/meterpreter/client_core.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -411,11 +411,11 @@ def generate_windows_stub(process)
411411
:expiration => self.client.expiration,
412412
:comm_timeout => self.client.comm_timeout,
413413
:ua => client.exploit_datastore['MeterpreterUserAgent'],
414-
:proxyhost => client.exploit_datastore['StagerProxyHost'] || client.exploit_datastore['PROXYHOST'],
415-
:proxyport => client.exploit_datastore['StagerProxyPort'] || client.exploit_datastore['PROXYPORT'],
416-
:proxy_type => client.exploit_datastore['StagerProxyType'] || client.exploit_datastore['PROXY_TYPE'],
417-
:proxy_username => client.exploit_datastore['StagerProxyUser'] || client.exploit_datastore['PROXY_USERNAME'],
418-
:proxy_password => client.exploit_datastore['StagerProxyPass'] || client.exploit_datastore['PROXY_PASSWORD']
414+
:proxyhost => client.exploit_datastore['PayloadProxyHost'] || client.exploit_datastore['PROXYHOST'],
415+
:proxyport => client.exploit_datastore['PayloadProxyPort'] || client.exploit_datastore['PROXYPORT'],
416+
:proxy_type => client.exploit_datastore['PayloadProxyType'] || client.exploit_datastore['PROXY_TYPE'],
417+
:proxy_username => client.exploit_datastore['PayloadProxyUser'] || client.exploit_datastore['PROXY_USERNAME'],
418+
:proxy_password => client.exploit_datastore['PayloadProxyPass'] || client.exploit_datastore['PROXY_PASSWORD']
419419

420420
end
421421

0 commit comments

Comments
 (0)