Skip to content

Commit

Permalink
Land rapid7#9452, expose linux/osx meterpreter process hiding
Browse files Browse the repository at this point in the history
  • Loading branch information
busterb authored and jmartin-tech committed Jan 24, 2018
1 parent d6beb94 commit 15f631d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/msf/base/sessions/meterpreter_options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ def initialize(info = {})
OptInt.new(
'SessionCommunicationTimeout',
[ false, 'The number of seconds of no activity before this session should be killed', TIMEOUT_COMMS]
),
OptString.new(
'PayloadProcessCommandLine',
[ false, 'The displayed command line that will be used by the payload', '']
)
],
self.class
Expand Down
8 changes: 7 additions & 1 deletion lib/msf/base/sessions/mettle_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ def generate_tcp_uri(opts)
end

def generate_config(opts={})
ds = opts[:datastore] || datastore

if ds['PayloadProcessCommandLine'] != ''
opts[:name] ||= ds['PayloadProcessCommandLine']
end

opts[:uuid] ||= generate_payload_uuid

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

opts.slice(:uuid, :session_guid, :uri, :debug, :log_file)
opts.slice(:uuid, :session_guid, :uri, :debug, :log_file, :name)
end

end
Expand Down

0 comments on commit 15f631d

Please sign in to comment.