-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Open
dledda-r7
wants to merge
8
commits into
rapid7:master
Choose a base branch
from
dledda-r7:feat/remove-default-extensions
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dledda-r7
commented
Apr 8, 2025
Let's resolve the conflicts once one of them is landed. |
dledda-r7
commented
Apr 9, 2025
jvoisin
reviewed
Apr 9, 2025
…s, adding AutoLoadExtensions option (Windows, Linux)
…s, adding AutoLoadExtensions option (AppleIos,Php,Python,Java,Osx,Android)
9c568c0
to
70bafdf
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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