expose linux/osx process rename functionality

MS-2855/keylogger-mettle-extension
Brent Cook 2018-01-23 09:56:12 -06:00
parent 03d1523d43
commit df633247bb
2 changed files with 11 additions and 1 deletions

View File

@ -66,6 +66,10 @@ module Msf
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

View File

@ -65,6 +65,12 @@ module Msf
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]
@ -85,7 +91,7 @@ module Msf
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