-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
Fix timeout of duplicated sessions #16621
Merged
adfoster-r7
merged 2 commits into
rapid7:master
from
sjanusz-r7:fix-timeout-of-duplicated-sessions
May 27, 2022
Merged
Fix timeout of duplicated sessions #16621
adfoster-r7
merged 2 commits into
rapid7:master
from
sjanusz-r7:fix-timeout-of-duplicated-sessions
May 27, 2022
Conversation
This file contains 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
adfoster-r7
reviewed
May 25, 2022
adfoster-r7
reviewed
May 25, 2022
46ef7c5
to
fd7aedf
Compare
adfoster-r7
reviewed
May 25, 2022
adfoster-r7
reviewed
May 25, 2022
adfoster-r7
reviewed
May 25, 2022
fd7aedf
to
17a37a9
Compare
adfoster-r7
reviewed
May 27, 2022
adfoster-r7
reviewed
May 27, 2022
@msjenkins-r7 retest this please |
Release NotesFixes a bug when running |
3 tasks
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.
The PR here: #16369 allowed us to run
sessions -u {session_id}
on a Meterpreter session to 'duplicate' a Meterpreter session (read that as open a new Meterpreter session with a default payload that is decided by theshell_to_meterpreter.rb
script).On Python, this has resulted in the initial session waiting for the newly spawned session to exit, thus MSF Console thought the session has been timing out.
This PR:
cmd_exec
intransmit_payload
as non-channelized, meaning the initial session does not wait for the process to finish.cmd_exec
calls to non-channelized.Verification
msfconsole -q
use payload/python/meterpreter/reverse_tcp
set
your options and get a sessionsessions -u -1
to 'upgrade'/duplicate/spawn a new session