Resolve generic payload arch to prevent hanging encoder - #21870
Open
sjanusz-r7 wants to merge 1 commit into
Open
Resolve generic payload arch to prevent hanging encoder#21870sjanusz-r7 wants to merge 1 commit into
sjanusz-r7 wants to merge 1 commit into
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
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.
Description
This PR fixes an issue/bug when trying to encode a generic payload, causing the console to hang and spin endlessly. This was present for
exploit/windows/http/nowsmsandexploit/bsdi/softcart/mercantec_softcartmodules.The issue is caused by the encoders trying to brute-force through encoding an incompatible payload, e.g. the riscv64le encoder being used for a generic payload.
Additional logs show the encoders being stuck trying to bruteforce:
Additional logging diff:
Proof of Concept
Boot up metasploit framework, type
irbthen paste in the following commands:This can also be tested with the following commands in the console (Ctrl + C once the console hangs):
Before
After
Breaking Changes
None
Adding additional logging results in the following logs:
So hopefully, things should continue to work.
Reviewer Notes
None
Verification Steps
irbTest Evidence
Present above
AI Usage Disclosure
Debugged using Kiro