Skip to content
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

Remove all references to Msf::SymbolicModule #18803

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

dwelch-r7
Copy link
Contributor

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 the create 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 since Msf::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

  • Boot up msfconsole and set features set defer_module_loads false, save and restart `msfconsole
  • use exploit/multi/handler and then set payload cmd/windows/http/x64/encrypted_shell_reverse_tcp
  • You get a stacktrace printed out to console (Note: this will only fail if your system doesn't meet the pre-requisites for encrypted payloads)
  • Switch to this PR
  • use exploit/multi/handler and then set payload cmd/windows/http/x64/encrypted_shell_reverse_tcp again
  • expected output should be [-] The value specified for payload is not valid. with no stacktrace

@dwelch-r7 dwelch-r7 added the rn-fix release notes fix label Feb 7, 2024
@adfoster-r7 adfoster-r7 merged commit 108e5af into rapid7:master Feb 7, 2024
50 checks passed
@adfoster-r7
Copy link
Contributor

Release Notes

Fixes a crash when using exploit/multi/handler with an invalid payload name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rn-fix release notes fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exploit failed: undefined method `cached_size' for "__SYMBOLIC__":String
2 participants