-
Notifications
You must be signed in to change notification settings - Fork 14.6k
MeterpreterOptions break-up and default extension loading removal #20012
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MeterpreterOptions break-up and default extension loading removal #20012
Conversation
Let's resolve the conflicts once one of them is landed. |
…s, adding AutoLoadExtensions option (Windows, Linux)
…s, adding AutoLoadExtensions option (AppleIos,Php,Python,Java,Osx,Android)
9c568c0
to
70bafdf
Compare
|
||
extensions = datastore['AutoLoadExtensions']&.split(';') || [] | ||
|
||
# BEGIN: This should be removed on MSF 7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can keep this around in MSF 7 still; maybe we could just change the default behaviors in the upcoming malleable profile config file setup that we're wanting to ship so that these aren't loaded by default, and they need to be opt-in. That way we're being less detected by default, rather than fighting against these older default values
Co-authored-by: msutovsky-r7 <[email protected]>
Co-authored-by: msutovsky-r7 <[email protected]>
Co-authored-by: msutovsky-r7 <[email protected]>
Co-authored-by: msutovsky-r7 <[email protected]>
Co-authored-by: msutovsky-r7 <[email protected]>
Co-authored-by: msutovsky-r7 <[email protected]>
Co-authored-by: msutovsky-r7 <[email protected]>
Co-authored-by: msutovsky-r7 <[email protected]>
Co-authored-by: msutovsky-r7 <[email protected]>
Co-authored-by: msutovsky-r7 <[email protected]>
Thanks @msutovsky-r7 |
Release NotesThis introduces a change in Meterpreter options and adds more control over Meterpreter extension to user. The change adds new datastore option |
This PR is related to #19975
In order to reduce the memory footprint of Meterpreter on target system is necessary to be sure only necessary code is loaded inside Meterpreter.
While working on standard api split, I noticed the presence of two extensions that were loaded without the user knowladge,
priv
andunhook
.This PR modifies the loading logic to use a datastore option
AutoLoadExtension
which contains a ';' separated list of extensions to load. At the moment insidelib/msf/base/sessions/meterpreter.rb
is present a code block (commented) that keep the compability of the current working logic of Meterpreter.Since the AutoLoadExtension logic depends on the platform, the break-up of
meterpreter_option.rb
to platform-specific option was necessary.Tasks:
meterpreter_options/common.rb
meterpreter_options/linux.rb
meterpreter_options/windows.rb
meterpreter_options/android.rb
meterpreter_options/osx.rb
meterpreter_options/python.rb
meterpreter_options/php.rb
meterpreter_options/java.rb
meterpreter_options/apple_ios.rb
meterpreter_options/bsd.rb
meterpreter_options.rb