Skip to content

Commit e44043b

Browse files
committed
fix: restored deleted comments
1 parent a7f4da5 commit e44043b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/msf/base/sessions/meterpreter.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,14 +183,17 @@ def bootstrap(datastore = {}, handler = nil)
183183
extensions = datastore['AutoLoadExtensions']&.split(';') || []
184184

185185
# BEGIN: This should be removed on MSF 7
186+
# Unhook the process prior to loading stdapi to reduce logging/inspection by any AV/PSP (by default unhook is first, see meterpreter_options/windows.rb)
186187
extensions.push('unhook') if datastore['AutoUnhookProcess'] && session.platform == 'windows'
187188
extensions.push('stdapi') if datastore['AutoLoadStdapi']
188-
extensions.push('priv') if datastore['AutoLoadStdapi'] && session.platform('windows')
189+
extensions.push('priv') if datastore['AutoLoadStdapi'] && session.platform == 'windows'
189190
extensions.push('android') if session.platform == 'android'
190191
extensions = extensions.uniq
191192
# END
192193
original = console.disable_output
193194
console.disable_output = true
195+
# TODO: abstract this a little, perhaps a "post load" function that removes
196+
# platform-specific stuff?
194197
extensions.each do |extension|
195198
console.run_single("load #{extension}")
196199
console.run_single('unhook_pe') if extension == 'unhook'

0 commit comments

Comments
 (0)