File tree Expand file tree Collapse file tree 4 files changed +17
-4
lines changed
modules/payloads/stagers/windows/x64 Expand file tree Collapse file tree 4 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -307,6 +307,8 @@ def is_valid_session?(timeout=10)
307
307
308
308
begin
309
309
self . machine_id = self . core . machine_id ( timeout )
310
+ self . payload_uuid ||= self . core . uuid ( timeout )
311
+
310
312
return true
311
313
rescue ::Rex ::Post ::Meterpreter ::RequestError
312
314
# This meterpreter doesn't support core_machine_id
@@ -329,8 +331,6 @@ def load_session_info()
329
331
username = self . sys . config . getuid
330
332
sysinfo = self . sys . config . sysinfo
331
333
332
- self . payload_uuid = self . core . uuid unless self . payload_uuid
333
-
334
334
safe_info = "#{ username } @ #{ sysinfo [ 'Computer' ] } "
335
335
safe_info . force_encoding ( "ASCII-8BIT" ) if safe_info . respond_to? ( :force_encoding )
336
336
# Should probably be using Rex::Text.ascii_safe_hex but leave
Original file line number Diff line number Diff line change 1
1
# -*- coding: binary -*-
2
2
3
3
require 'msf/core'
4
+ require 'msf/core/payload/transport_config'
4
5
require 'msf/core/payload/windows/reverse_http'
5
6
6
7
module Msf
@@ -15,6 +16,7 @@ module Msf
15
16
16
17
module Payload ::Windows ::ReverseHttps
17
18
19
+ include Msf ::Payload ::TransportConfig
18
20
include Msf ::Payload ::Windows ::ReverseHttp
19
21
20
22
#
Original file line number Diff line number Diff line change @@ -296,10 +296,12 @@ def use(mod, opts = { })
296
296
return true
297
297
end
298
298
299
- def uuid
299
+ def uuid ( timeout = nil )
300
300
request = Packet . create_request ( 'core_uuid' )
301
301
302
- response = client . send_request ( request )
302
+ args = [ request ]
303
+ args << timeout if timeout
304
+ response = client . send_request ( *args )
303
305
304
306
id = response . get_tlv_value ( TLV_TYPE_UUID )
305
307
Original file line number Diff line number Diff line change 5
5
6
6
7
7
require 'msf/core'
8
+ require 'msf/core/payload/transport_config'
8
9
require 'msf/core/handler/reverse_https'
9
10
10
11
module Metasploit3
11
12
12
13
CachedSize = 578
13
14
15
+ include Msf ::Payload ::TransportConfig
14
16
include Msf ::Payload ::Stager
15
17
include Msf ::Payload ::Windows
16
18
@@ -91,6 +93,13 @@ def initialize(info = {})
91
93
) )
92
94
end
93
95
96
+ #
97
+ # Generate the transport-specific configuration
98
+ #
99
+ def transport_config ( opts = { } )
100
+ transport_config_reverse_https ( opts )
101
+ end
102
+
94
103
#
95
104
# Do not transmit the stage over the connection. We handle this via HTTPS
96
105
#
You can’t perform that action at this time.
0 commit comments