-
Notifications
You must be signed in to change notification settings - Fork 681
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
Build and ship debug builds for windows meterpreter #553
Build and ship debug builds for windows meterpreter #553
Conversation
gem/lib/metasploit-payloads.rb
Outdated
@@ -39,7 +37,8 @@ def self.readable_path(gem_path, *extra_paths) | |||
# | |||
# Get the path to a meterpreter binary by full name. | |||
# | |||
def self.meterpreter_path(name, binary_suffix) | |||
def self.meterpreter_path(name, binary_suffix, debug: false) | |||
binary_suffix&.gsub!(/dll$/, 'debug.dll') if debug |
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.
It's best to avoid mutating strings that aren't owned by this function, otherwise weird bugs can occur.
binary_suffix&.gsub!(/dll$/, 'debug.dll') if debug | |
binary_suffix = debug ? "debug.#{binary_suffix}" : binary_suffix |
gem/lib/metasploit-payloads.rb
Outdated
@@ -39,7 +37,8 @@ def self.readable_path(gem_path, *extra_paths) | |||
# | |||
# Get the path to a meterpreter binary by full name. | |||
# | |||
def self.meterpreter_path(name, binary_suffix) | |||
def self.meterpreter_path(name, binary_suffix, debug: false) | |||
binary_suffix&.gsub!(/dll$/, 'debug.dll') if debug |
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.
It's best to avoid mutating strings that aren't owned by this function, otherwise weird bugs can occur.
binary_suffix&.gsub!(/dll$/, 'debug.dll') if debug | |
binary_suffix = debug ? "debug.#{binary_suffix}" : binary_suffix if debug |
I built the debug and release libraries in Visual Studio 2022, version When getting a Example Debug OutputWith |
🤦♂️ of course just after i finish an ungodly meterpreter debug procedure do i find this little gem. Thanks for wiring this up |
Builds and packages the debug versions of Windows Meterpreter into the
metasploit-payloads
gemThe debug versions of the build will have the suffix
.debug.dll
instead of just.dll
and there will be an accompanying framework PR rapid7/metasploit-framework#16320 to add a datastore option for specifying the debug versionSide note: Spent some time trying to get the debug builds working with CMake on linux too, was able to build them all but not gain a stable session, it's not currently used by any automation so might come back to it at some point later