⼀、内⽹渗透测试基础
Powershell
查看执⾏策略
Get-ExecutionPolicy
设置执⾏策略
Set-ExecutionPolicy [options]
Restricted
脚本不能执⾏【默认设置】
RemoteSigned
本地脚本可以运⾏,远程脚本不能运⾏
AllSigned
受信任的签名脚本才能运⾏
Unrestricted
允许所有脚本运
运⾏脚本
.\test.ps1
powershell.exe -ExecutionPolicy bypass -File powerup.ps1
powershell.exe -exec bypass -command "& {Import-Module c:\powerup.ps1;Invoke-AllChecks}"
⼀些常⽤参数
-ExecutionPolicy bypass
绕过执⾏安全策略
-W hidden
隐藏窗⼝
-NonI
不提供交互式的提示
-NoP
不加载当前 ⽤户的配置⽂件
-noexit
执⾏后不退出
shell
-nologo
不显示
powershell
版权信息
-enc xxxxxx
加载
base64
编码后的脚本内容
32
位与
64
位
32
位:
powershell.exe -Nop -NonI -W hidden -exec bypass
64