Skip to content

Commit 17bf0dc

Browse files
committed
Land rapid7#9452, expose linux/osx meterpreter process hiding
2 parents 03d1523 + df63324 commit 17bf0dc

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

lib/msf/base/sessions/meterpreter_options.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ def initialize(info = {})
6666
OptInt.new(
6767
'SessionCommunicationTimeout',
6868
[ false, 'The number of seconds of no activity before this session should be killed', TIMEOUT_COMMS]
69+
),
70+
OptString.new(
71+
'PayloadProcessCommandLine',
72+
[ false, 'The displayed command line that will be used by the payload', '']
6973
)
7074
],
7175
self.class

lib/msf/base/sessions/mettle_config.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ def generate_tcp_uri(opts)
6565
end
6666

6767
def generate_config(opts={})
68+
ds = opts[:datastore] || datastore
69+
70+
if ds['PayloadProcessCommandLine'] != ''
71+
opts[:name] ||= ds['PayloadProcessCommandLine']
72+
end
73+
6874
opts[:uuid] ||= generate_payload_uuid
6975

7076
case opts[:scheme]
@@ -85,7 +91,7 @@ def generate_config(opts={})
8591
end
8692
opts[:session_guid] = Base64.encode64(guid).strip
8793

88-
opts.slice(:uuid, :session_guid, :uri, :debug, :log_file)
94+
opts.slice(:uuid, :session_guid, :uri, :debug, :log_file, :name)
8995
end
9096

9197
end

0 commit comments

Comments
 (0)