Remove all references to Msf::SymbolicModule
#18803
Merged
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.
Resolves #18791
Fixes a bug introduced in #18704 that caused msfconsole to error when attempting to set a modules payload to some invalid payload (i.e. the encrypted payloads when not supported by the system)
The issue appeared when I refactored the module sets a little bit to not
create
a module when all we needed was the modules class to be loaded into the module set. Unfortunately I missed a side effect of thecreate
function which deleted the modules entry into the module set if an instance wasn't able to be created.Removing the references to
Msf::SymbolicModule
made the most sense to me here rather than adding in additional checks sinceMsf::SymbolicModule
isn't used for anything useful and was intended to be temporary when it was originally added anyway. Now that we have the on demand loading it was just causing issues.Verification steps
msfconsole
and setfeatures set defer_module_loads false
, save and restart `msfconsoleuse exploit/multi/handler
and thenset payload cmd/windows/http/x64/encrypted_shell_reverse_tcp
use exploit/multi/handler
and thenset payload cmd/windows/http/x64/encrypted_shell_reverse_tcp
again[-] The value specified for payload is not valid.
with no stacktrace