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
Metasploit console allows incompatible payloads to be set and used #5404
Comments
I'll take this given that it's stageless related. |
|
@jlee-r7 It has complained about unknown payloads, so seems strange that it wouldn't complain about an incompatible one. |
I got a patch for you:
I may submit a PR later. |
Thanks @wchen-r7 :) |
Resolve rapid7#5404. This patch will check payload compatibility when you are using set payload in msfconsole.
I was told that you could always override the compatible payloads by just typing it in manually. It wouldn't auto complete or be shown in the list of compatible payloads. I think this currently breaks payload_inject with x64 payloads |
@Meatballs1 Setting an incompatible payload would break most exploits (limited by size or characters). For non-exploit scenarios, the solution is to make the module accept the payload, not to allow any payload to be set. |
There is a bit of a corner case when checking for size. When you are setting the payload, we currently check for payloads that are compatible with the default parameters. The actual parameters one sets can also affect size. Thus, there are payloads that are incompatible by default, but can be modified after they are set into being compatible, and vice-versa. |
This example demonstrates how stageless meterpreter is accepted for psexec even though it is not compatible due to the payload space requirements.
The
show payloads
command makes it clear that this payload is not valid. This should have been caught both in theset
command handler and theexploit
command.The text was updated successfully, but these errors were encountered: