Skip to content

Commit 2056ff6

Browse files
committed
Merge master
Squashed commit of the following: commit 1dcad7c Merge: 1a2f35d 35d29f5 Author: OJ <[email protected]> Date: Thu Mar 19 14:43:27 2015 +1000 Land rapid7#4953 : Updated POSIX meterpreter binaries commit 35d29f5 Author: Brent Cook <[email protected]> Date: Wed Mar 18 22:57:03 2015 -0500 update linux meterpreter bins commit 1a2f35d Merge: 076f15f 346b1d5 Author: OJ <[email protected]> Date: Thu Mar 19 12:41:20 2015 +1000 Land rapid7#4951: Dynamic URI generation for Java/Python reverse_http(s) commit 076f15f Merge: b33e7f4 3f8ed56 Author: Spencer McIntyre <[email protected]> Date: Wed Mar 18 20:59:54 2015 -0400 Land rapid7#4792 @jakxx Publish It PUI file exploit commit 3f8ed56 Author: Spencer McIntyre <[email protected]> Date: Wed Mar 18 20:57:58 2015 -0400 Add available space to the payload info commit b33e7f4 Merge: 0d1f205 5dd718e Author: joev <[email protected]> Date: Wed Mar 18 17:17:34 2015 -0500 Land rapid7#4947, h0ng10's TWiki exploit. commit 346b1d5 Author: HD Moore <[email protected]> Date: Wed Mar 18 16:24:01 2015 -0500 Revert Java back to static size for cache purposes (less cpu usage on startup) commit 33bbf7c Author: HD Moore <[email protected]> Date: Wed Mar 18 16:08:11 2015 -0500 Dynamic URI generation for python/java http(s) stagers commit 0d1f205 Merge: e943cb5 dab4333 Author: HD Moore <[email protected]> Date: Wed Mar 18 15:31:22 2015 -0500 Lands rapid7#4949 which fixes rapid7#4845 commit dab4333 Author: rwhitcroft <[email protected]> Date: Wed Mar 18 16:07:46 2015 -0400 updated asm in block commit 7ae9739 Author: rwhitcroft <[email protected]> Date: Wed Mar 18 15:34:31 2015 -0400 fix x64/reverse_https stager shellcode commit e943cb5 Merge: d152c41 d1a2f58 Author: OJ <[email protected]> Date: Wed Mar 18 22:34:52 2015 +1000 Land rapid7#4585 : CVE-2015-0975 XXE in OpenNMS commit d1a2f58 Author: OJ <[email protected]> Date: Wed Mar 18 22:17:44 2015 +1000 Fix of regex for file capture and format tweaks commit 5dd718e Author: Hans-Martin Münch (h0ng10) <[email protected]> Date: Wed Mar 18 09:51:51 2015 +0100 Better description commit 00de437 Author: Hans-Martin Münch (h0ng10) <[email protected]> Date: Wed Mar 18 09:45:08 2015 +0100 Initial commit commit fa72423 Author: OJ <[email protected]> Date: Wed Mar 18 18:18:54 2015 +1000 Move the module to the correct location commit d152c41 Merge: b46e5f8 b62da42 Author: OJ <[email protected]> Date: Wed Mar 18 17:42:19 2015 +1000 Land rapid7#4934 : Proxy and auth support in reverse_http(s) commit b62da42 Merge: c607cf7 b46e5f8 Author: HD Moore <[email protected]> Date: Wed Mar 18 01:51:15 2015 -0500 Merge branch 'master' into feature/add-proxies-to-wininet commit b46e5f8 Merge: bd4738b 97def50 Author: OJ <[email protected]> Date: Wed Mar 18 16:49:13 2015 +1000 Land rapid7#4295 : Refactory proxy-enabled payload handling commit c607cf7 Merge: 0513852 bd4738b Author: HD Moore <[email protected]> Date: Wed Mar 18 01:45:44 2015 -0500 Merging master commit 97def50 Author: HD Moore <[email protected]> Date: Wed Mar 18 01:26:59 2015 -0500 Whitespace cleanup commit 8d3cb8b Author: HD Moore <[email protected]> Date: Wed Mar 18 01:25:42 2015 -0500 Fix up meterpreter patching arguments and names commit ef443c8 Author: HD Moore <[email protected]> Date: Wed Mar 18 01:21:53 2015 -0500 Fix overgreed search/replace commit 390a704 Author: HD Moore <[email protected]> Date: Wed Mar 18 01:19:05 2015 -0500 Cleanup proxyhost/proxyport arguments to match new names commit f7a06d8 Author: HD Moore <[email protected]> Date: Wed Mar 18 01:15:32 2015 -0500 Rework PROXY_{HOST|PORT|TYPE|USERNAME|PASSWORD) to the new syntax commit 3aa8cb6 Author: HD Moore <[email protected]> Date: Wed Mar 18 01:08:09 2015 -0500 Fix two use cases of PROXYHOST/PROXYPORT commit 87a4899 Author: HD Moore <[email protected]> Date: Mon Dec 15 14:48:09 2014 -0600 Place an IPv6 proxy IP between brackets commit 259db26 Author: HD Moore <[email protected]> Date: Tue Dec 2 15:36:14 2014 -0600 Remove user/pass and invalid class from the options commit 2ab14e7 Author: HD Moore <[email protected]> Date: Wed Mar 18 01:01:10 2015 -0500 Adds IPv6 and option-related issues with the previous patch commit 0601946 Author: HD Moore <[email protected]> Date: Tue Dec 2 13:29:39 2014 -0600 Don't mandate and default PROXY_HOST (miscopy from the proxy stager) commit a4df6d5 Author: HD Moore <[email protected]> Date: Wed Mar 18 00:59:59 2015 -0500 Cleanup proxy handling code (consistency & bugs) One subtle bug was that each time a request was received, a null byte was being appended to the datastore options for PROXY_USERNAME and PROXY_PASSWORD. Eventually this would break new sessions. This change centralizes the proxy configuration and cleans up the logic. commit 85fb534 Author: HD Moore <[email protected]> Date: Tue Dec 2 12:57:30 2014 -0600 Fix up the offset detection again, cleanup redundant code commit 2f13988 Author: HD Moore <[email protected]> Date: Tue Dec 2 12:33:53 2014 -0600 Use OptPort vs OptInt and cleanup the description commit a01be36 Author: HD Moore <[email protected]> Date: Wed Mar 18 00:59:13 2015 -0500 Rework PROXYHOST/PROXYPORT to PROXY_HOST/PROXY_PORT This also cleans up the windows reverse_https_proxy stager. commit b197b7a Author: jakxx <[email protected]> Date: Tue Mar 17 19:24:13 2015 -0400 Additional Updates -Removed unused mixin -Cleaned up Module name -Cleaned up author name commit bd4738b Merge: 47a7f99 d7fa0ec Author: James Lee <[email protected]> Date: Tue Mar 17 17:37:55 2015 -0500 Land rapid7#4827, capture and nbns fixups commit d7fa0ec Author: James Lee <[email protected]> Date: Tue Mar 17 17:36:45 2015 -0500 Let IPAddr#hton do the calculating commit 47a7f99 Merge: d1d6378 5fd3637 Author: Brent Cook <[email protected]> Date: Tue Mar 17 16:22:46 2015 -0500 Land rapid7#4930, @hmoore-r7 winhttp stager certificate check commit 085e6cc Author: jakxx <[email protected]> Date: Tue Mar 17 16:39:56 2015 -0400 Implemented Recommended Changes -corrected spelling error -set only option to required -dumped header data to included file -Used Rex for jmp values commit 0490af8 Author: jstnkndy <[email protected]> Date: Tue Mar 17 10:20:22 2015 -0400 Added error checks, randomness, and uuid delimeter commit f3fc400 Author: jstnkndy <[email protected]> Date: Tue Mar 17 10:19:40 2015 -0400 typo commit b92d243 Merge: e0a7f53 766a07a Author: jstnkndy <[email protected]> Date: Tue Mar 17 10:18:32 2015 -0400 Merge branch 'module-cve-2015-0975' of https://github.com/jstnkndy/metasploit-framework into module-cve-2015-0975 commit e0a7f53 Author: jstnkndy <[email protected]> Date: Tue Mar 17 10:10:51 2015 -0400 Added error checking, randomness, uuid delimiters commit 2ea9844 Author: HD Moore <[email protected]> Date: Mon Mar 16 14:08:01 2015 -0500 while(true)->loop, use thread.join commit 5fd3637 Author: HD Moore <[email protected]> Date: Mon Mar 16 14:00:51 2015 -0500 Remove the i32 size specifier (not needed) commit 69d9280 Author: HD Moore <[email protected]> Date: Mon Mar 16 13:52:13 2015 -0500 Fix yard docs, retries, push.i8 instructions. See commit 0513852 Note that StagerRetryCount is not defined here, but will be in the parent class once rapid7#4934 lands commit 0513852 Author: HD Moore <[email protected]> Date: Mon Mar 16 13:35:36 2015 -0500 Fix yard docs, fix retries, trim bytes, retested and working commit 69a808b Author: HD Moore <[email protected]> Date: Mon Mar 16 12:14:42 2015 -0500 StagerProxy -> PayloadProxy commit f361e4e Author: HD Moore <[email protected]> Date: Mon Mar 16 00:22:10 2015 -0500 Prefer the new-style proxy datastore options when available commit 7e89281 Author: HD Moore <[email protected]> Date: Mon Mar 16 00:03:31 2015 -0500 Adds proxy (with authentication) support to reverse_http(s) commit 8e37342 Author: HD Moore <[email protected]> Date: Sat Mar 14 16:52:04 2015 -0500 Comment typo commit 0d12ca4 Author: HD Moore <[email protected]> Date: Sat Mar 14 16:19:13 2015 -0500 Work around lack of option normalization during size calculation commit 03019cf Author: HD Moore <[email protected]> Date: Sat Mar 14 15:53:21 2015 -0500 Adds StagerVerifySSLCert support (SHA1 of HandlerSSLCert) commit 1159380 Author: HD Moore <[email protected]> Date: Sat Mar 14 15:52:23 2015 -0500 Move X509 PEM parsing into Rex::Parser::X509Certificate commit 1001061 Author: HD Moore <[email protected]> Date: Wed Mar 4 18:52:18 2015 -0600 Initialize @capture_count commit 1b1716b Author: HD Moore <[email protected]> Date: Sun Feb 22 22:01:01 2015 -0600 Fix a handful of bugs that broke this modules. Fixes rapid7#4799 commit 9730a16 Author: HD Moore <[email protected]> Date: Sun Feb 22 22:00:42 2015 -0600 Small cleanups to the LLMR responder module commit bdd5276 Author: HD Moore <[email protected]> Date: Sun Feb 22 21:53:47 2015 -0600 This fixes a number of issues with the Capture mixin * The use of www.metasploit.com in a datastore option results in a DNS lookup (infoleak). Switch to 8.8.8.8 (TTL=1) * The hackey code around #each_packet is no longer necessary in newer Ruby versions * The arp()/probe_gateway() calls to inject_reply() had broken logic leading to early exit and missed replies * The arp() function now tries up to three times to get a reply (helpful with lossy L2) * GC.start is extraneous and should be removed * Increased timeouts commit 615d71d Author: HD Moore <[email protected]> Date: Sun Feb 22 21:51:33 2015 -0600 Remove extraneous calls to GC.start() commit 44a7e7e Author: jakxx <[email protected]> Date: Wed Feb 18 13:22:54 2015 -0500 publish-it fileformat exploit commit 766a07a Author: jstnkndy <[email protected]> Date: Tue Jan 13 22:08:08 2015 -0500 Add CVE-2015-0975 XXE for OpenNMS <= 14.0.2
1 parent bd47a15 commit 2056ff6

File tree

32 files changed

+1066
-362
lines changed

32 files changed

+1066
-362
lines changed

data/exploits/CVE-2014-0980.pui

16.7 KB
Binary file not shown.
192 Bytes
Binary file not shown.
160 Bytes
Binary file not shown.
120 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

external/source/shellcode/windows/x64/src/block/block_reverse_https.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ download_more:
145145
test eax,eax ; download failed? (optional?)
146146
jz failure
147147

148-
mov rax, [rdi]
148+
mov ax, word ptr [edi]
149149
add rbx, rax ; buffer += bytes_received
150150

151151
test rax,rax ; optional?

lib/msf/core/exploit/capture.rb

Lines changed: 45 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def initialize(info = {})
4242
[
4343
true,
4444
'Send a TTL=1 random UDP datagram to this host to discover the default gateway\'s MAC',
45-
'www.metasploit.com']),
45+
'8.8.8.8']),
4646
OptPort.new('GATEWAY_PROBE_PORT',
4747
[
4848
false,
@@ -143,7 +143,6 @@ def close_pcap
143143
return unless self.capture
144144
self.capture = nil
145145
self.arp_capture = nil
146-
GC.start()
147146
end
148147

149148
def capture_extract_ies(raw)
@@ -163,26 +162,15 @@ def capture_extract_ies(raw)
163162
end
164163

165164
#
166-
# This monstrosity works around a series of bugs in the interrupt
167-
# signal handling of Ruby 1.9
165+
# Loop through each packet
168166
#
169167
def each_packet
170168
return unless capture
171-
begin
172-
@capture_count = 0
173-
reader = framework.threads.spawn("PcapReceiver", false) do
174-
capture.each do |pkt|
175-
yield(pkt)
176-
@capture_count += 1
177-
end
178-
end
179-
reader.join
180-
rescue ::Exception
181-
raise $!
182-
ensure
183-
reader.kill if reader.alive?
169+
@capture_count ||= 0
170+
capture.each do |pkt|
171+
yield(pkt)
172+
@capture_count += 1
184173
end
185-
186174
@capture_count
187175
end
188176

@@ -242,10 +230,9 @@ def inject_pcap(pcap_file, filter=nil, delay = 0, pcap=self.capture)
242230
pcap.inject(pkt)
243231
Rex.sleep((delay * 1.0)/1000)
244232
end
245-
GC.start
246233
end
247234

248-
# Capture_sendto is intended to replace the old Rex::Socket::Ip.sendto method. It requires
235+
# capture_sendto is intended to replace the old Rex::Socket::Ip.sendto method. It requires
249236
# a payload and a destination address. To send to the broadcast address, set bcast
250237
# to true (this will guarantee that packets will be sent even if ARP doesn't work
251238
# out).
@@ -262,24 +249,20 @@ def capture_sendto(payload="", dhost=nil, bcast=false, dev=nil)
262249

263250
# The return value either be a PacketFu::Packet object, or nil
264251
def inject_reply(proto=:udp, pcap=self.capture)
265-
reply = nil
266-
to = (datastore['TIMEOUT'] || 500).to_f / 1000.0
267-
if not pcap
268-
raise RuntimeError, "Could not access the capture process (remember to open_pcap first!)"
269-
else
270-
begin
271-
::Timeout.timeout(to) do
272-
pcap.each do |r|
273-
packet = PacketFu::Packet.parse(r)
274-
next unless packet.proto.map { |x| x.downcase.to_sym }.include? proto
275-
reply = packet
276-
break
277-
end
252+
# Defaults to ~2 seconds
253+
to = (datastore['TIMEOUT'] * 4) / 1000.0
254+
raise RuntimeError, "Could not access the capture process (remember to open_pcap first!)" if not pcap
255+
begin
256+
::Timeout.timeout(to) do
257+
pcap.each do |r|
258+
packet = PacketFu::Packet.parse(r)
259+
next unless packet.proto.map { |x| x.downcase.to_sym }.include? proto
260+
return packet
278261
end
279-
rescue ::Timeout::Error
280262
end
263+
rescue ::Timeout::Error
281264
end
282-
return reply
265+
nil
283266
end
284267

285268
# This ascertains the correct Ethernet addresses one should use to
@@ -328,20 +311,19 @@ def probe_gateway(addr)
328311
end
329312

330313
begin
331-
to = (datastore['TIMEOUT'] || 1500).to_f / 1000.0
314+
to = ((datastore['TIMEOUT'] || 500).to_f * 8) / 1000.0
332315
::Timeout.timeout(to) do
333-
while (my_packet = inject_reply(:udp, self.arp_capture))
334-
if my_packet.payload == secret
335-
dst_mac = self.arp_cache[:gateway] = my_packet.eth_daddr
336-
src_mac = self.arp_cache[Rex::Socket.source_address(addr)] = my_packet.eth_saddr
337-
return [dst_mac, src_mac]
338-
else
339-
next
340-
end
316+
loop do
317+
my_packet = inject_reply(:udp, self.arp_capture)
318+
next unless my_packet
319+
next unless my_packet.payload == secret
320+
dst_mac = self.arp_cache[:gateway] = my_packet.eth_daddr
321+
src_mac = self.arp_cache[Rex::Socket.source_address(addr)] = my_packet.eth_saddr
322+
return [dst_mac, src_mac]
341323
end
342324
end
343325
rescue ::Timeout::Error
344-
# Well, that didn't work (this common on networks where there's no gatway, like
326+
# Well, that didn't work (this is common on networks where there's no gateway, like
345327
# VMWare network interfaces. We'll need to use a fake source hardware address.
346328
self.arp_cache[Rex::Socket.source_address(addr)] = "00:00:00:00:00:00"
347329
end
@@ -354,26 +336,31 @@ def arp(target_ip=nil)
354336
return self.arp_cache[:gateway] unless should_arp? target_ip
355337
source_ip = Rex::Socket.source_address(target_ip)
356338
raise RuntimeError, "Could not access the capture process." unless self.arp_capture
339+
357340
p = arp_packet(target_ip, source_ip)
358-
inject_eth(:eth_type => 0x0806,
359-
:payload => p,
360-
:pcap => self.arp_capture,
361-
:eth_saddr => self.arp_cache[Rex::Socket.source_address(target_ip)]
362-
)
363-
begin
364-
to = (datastore['TIMEOUT'] || 500).to_f / 1000.0
365-
::Timeout.timeout(to) do
366-
while (my_packet = inject_reply(:arp, self.arp_capture))
367-
if my_packet.arp_saddr_ip == target_ip
341+
342+
# Try up to 3 times to get an ARP response
343+
1.upto(3) do
344+
inject_eth(:eth_type => 0x0806,
345+
:payload => p,
346+
:pcap => self.arp_capture,
347+
:eth_saddr => self.arp_cache[Rex::Socket.source_address(target_ip)]
348+
)
349+
begin
350+
to = ((datastore['TIMEOUT'] || 500).to_f * 8) / 1000.0
351+
::Timeout.timeout(to) do
352+
loop do
353+
my_packet = inject_reply(:arp, self.arp_capture)
354+
next unless my_packet
355+
next unless my_packet.arp_saddr_ip == target_ip
368356
self.arp_cache[target_ip] = my_packet.eth_saddr
369357
return self.arp_cache[target_ip]
370-
else
371-
next
372358
end
373359
end
360+
rescue ::Timeout::Error
374361
end
375-
rescue ::Timeout::Error
376362
end
363+
nil
377364
end
378365

379366
# Creates a full ARP packet, mainly for use with inject_eth()

lib/msf/core/exploit/ipv6.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ def close_icmp_pcap()
7676

7777
return if not @ipv6_icmp6_capture
7878
@ipv6_icmp6_capture = nil
79-
GC.start()
8079
end
8180

8281
#

lib/msf/core/handler/reverse_hop_http.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,11 @@ def send_new_stage
256256
:expiration => datastore['SessionExpirationTimeout'],
257257
:comm_timeout => datastore['SessionCommunicationTimeout'],
258258
:ua => datastore['MeterpreterUserAgent'],
259-
:proxyhost => datastore['PROXYHOST'],
260-
:proxyport => datastore['PROXYPORT'],
261-
:proxy_type => datastore['PROXY_TYPE'],
262-
:proxy_username => datastore['PROXY_USERNAME'],
263-
:proxy_password => datastore['PROXY_PASSWORD']
259+
:proxy_host => datastore['PayloadProxyHost'],
260+
:proxy_port => datastore['PayloadProxyPort'],
261+
:proxy_type => datastore['PayloadProxyType'],
262+
:proxy_user => datastore['PayloadProxyUser'],
263+
:proxy_pass => datastore['PayloadProxyPass']
264264

265265
blob = encode_stage(blob)
266266

lib/msf/core/handler/reverse_http.rb

Lines changed: 53 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -58,33 +58,25 @@ def initialize(info = {})
5858
], Msf::Handler::ReverseHttp)
5959
end
6060

61-
# Toggle for IPv4 vs IPv6 mode
62-
#
63-
def ipv6?
64-
Rex::Socket.is_ipv6?(datastore['LHOST'])
65-
end
66-
6761
# Determine where to bind the server
6862
#
6963
# @return [String]
7064
def listener_address
71-
if datastore['ReverseListenerBindAddress'].to_s.empty?
72-
bindaddr = (ipv6?) ? '::' : '0.0.0.0'
65+
if datastore['ReverseListenerBindAddress'].to_s == ""
66+
bindaddr = Rex::Socket.is_ipv6?(datastore['LHOST']) ? '::' : '0.0.0.0'
7367
else
7468
bindaddr = datastore['ReverseListenerBindAddress']
7569
end
7670

7771
bindaddr
7872
end
7973

74+
# Return a URI suitable for placing in a payload
75+
#
8076
# @return [String] A URI of the form +scheme://host:port/+
8177
def listener_uri
82-
if ipv6?
83-
listen_host = "[#{listener_address}]"
84-
else
85-
listen_host = listener_address
86-
end
87-
"#{scheme}://#{listen_host}:#{datastore['LPORT']}/"
78+
uri_host = Rex::Socket.is_ipv6?(listener_address) ? "[#{listener_address}]" : listener_address
79+
"#{scheme}://#{uri_host}:#{datastore['LPORT']}/"
8880
end
8981

9082
# Return a URI suitable for placing in a payload.
@@ -158,6 +150,7 @@ def setup_handler
158150
'VirtualDirectory' => true)
159151

160152
print_status("Started #{scheme.upcase} reverse handler on #{listener_uri}")
153+
lookup_proxy_settings
161154
end
162155

163156
#
@@ -175,6 +168,45 @@ def stop_handler
175168

176169
protected
177170

171+
#
172+
# Parses the proxy settings and returns a hash
173+
#
174+
def lookup_proxy_settings
175+
info = {}
176+
return @proxy_settings if @proxy_settings
177+
178+
if datastore['PayloadProxyHost'].to_s == ""
179+
@proxy_settings = info
180+
return @proxy_settings
181+
end
182+
183+
info[:host] = datastore['PayloadProxyHost'].to_s
184+
info[:port] = (datastore['PayloadProxyPort'] || 8080).to_i
185+
info[:type] = datastore['PayloadProxyType'].to_s
186+
187+
uri_host = info[:host]
188+
189+
if Rex::Socket.is_ipv6?(uri_host)
190+
uri_host = "[#{info[:host]}]"
191+
end
192+
193+
info[:info] = "#{uri_host}:#{info[:port]}"
194+
195+
if info[:type] == "SOCKS"
196+
info[:info] = "socks=#{info[:info]}"
197+
else
198+
info[:info] = "http://#{info[:info]}"
199+
if datastore['PayloadProxyUser'].to_s != ""
200+
info[:username] = datastore['PayloadProxyUser'].to_s
201+
end
202+
if datastore['PayloadProxyPass'].to_s != ""
203+
info[:password] = datastore['PayloadProxyPass'].to_s
204+
end
205+
end
206+
207+
@proxy_settings = info
208+
end
209+
178210
#
179211
# Parses the HTTPS request
180212
#
@@ -204,8 +236,8 @@ def on_request(cli, req, obj)
204236
blob.sub!('HTTP_COMMUNICATION_TIMEOUT = 300', "HTTP_COMMUNICATION_TIMEOUT = #{datastore['SessionCommunicationTimeout']}")
205237
blob.sub!('HTTP_USER_AGENT = None', "HTTP_USER_AGENT = '#{var_escape.call(datastore['MeterpreterUserAgent'])}'")
206238

207-
unless datastore['PROXYHOST'].blank?
208-
proxy_url = "http://#{datastore['PROXYHOST']}:#{datastore['PROXYPORT']}"
239+
unless datastore['PayloadProxyHost'].blank?
240+
proxy_url = "http://#{datastore['PayloadProxyHost']||datastore['PROXYHOST']}:#{datastore['PayloadProxyPort']||datastore['PROXYPORT']}"
209241
blob.sub!('HTTP_PROXY = None', "HTTP_PROXY = '#{var_escape.call(proxy_url)}'")
210242
end
211243

@@ -268,11 +300,11 @@ def on_request(cli, req, obj)
268300
:expiration => datastore['SessionExpirationTimeout'],
269301
:comm_timeout => datastore['SessionCommunicationTimeout'],
270302
:ua => datastore['MeterpreterUserAgent'],
271-
:proxyhost => datastore['PROXYHOST'],
272-
:proxyport => datastore['PROXYPORT'],
273-
:proxy_type => datastore['PROXY_TYPE'],
274-
:proxy_username => datastore['PROXY_USERNAME'],
275-
:proxy_password => datastore['PROXY_PASSWORD']
303+
:proxy_host => datastore['PayloadProxyHost'],
304+
:proxy_port => datastore['PayloadProxyPort'],
305+
:proxy_type => datastore['PayloadProxyType'],
306+
:proxy_user => datastore['PayloadProxyUser'],
307+
:proxy_pass => datastore['PayloadProxyPass']
276308

277309
resp.body = encode_stage(blob)
278310

0 commit comments

Comments
 (0)