cobaltstrike反溯源
ssooking Lv5

修改默认通信端口

CobaltStrike客户端服务器默认通信端口为50050,可以修改teamserver文件,将50050端口改成其他端口。

修改默认证书

cobaltstrike.store是cobalt strike服务器端默认使用的证书密钥库文件,里面包含了一些特征,我们可以自己生成新的证书库,或者通过cloudflare申请的密钥库代理。

注意,这个证书与通过https上线使用的证书是不一样的,如果想要修改https上线的证书,需要修改Malleable C2 profile。

1
2
3
4
5
6
7
8
# 查看默认store文件
keytool -list -v -keystore cobaltstrike.store

# 生成新的证书秘钥库
keytool -keystore ./cobaltstrike.store -storepass 123456 -keypass 123456 -genkey -keyalg RSA -alias you_name -dname "CN=alibaba.com OU=Alibaba Cloud, O=Alibaba, L=HangZhou, ST=HangZhou, C=01"

# 迁移到行业标准格式PKCS12
keytool -importkeystore -srckeystore cobaltstrike.store -destkeystore cobaltstrike.store -deststoretype pkcs12

在启动CobaltStrike的时候,指定一个profile文件,然后在profile文件中配置上线时使用的store证书文件即可修改上线时默认的证书。可以将生成证书的命令加入teamserver启动脚本的generate a certificate部分,这样如果启动时检测不到就会自动生成。

常见配置Malleable-C2-Profiles:https://github.com/rsmudge/Malleable-C2-Profiles.git

域名上线

免费域名

注册freenom

辅助在线工具

不要用freenom自带的域名解析服务,因为它自带的没上CDN ping一下域名就知道VPS ip了

CDN、云函数

结合CDN、云函数进行上线。注意某些CDN服务的特殊性。如Cloudflare仅支持部分特定端口,使用其他端口无法连接。Cloudflare支持端口如下:

  • http:80,8080,8880,2052,2082,2086,2095
  • https:443,2053,2083,2087,2096,8443

其他技术

参考

如何隐蔽你的C2

C2服务隐藏

https://www.freebuf.com/articles/network/262445.html

反溯源-cs和msf域名上线

  • Post title:cobaltstrike反溯源
  • Post author:ssooking
  • Create time:2020-05-18 11:18:00
  • Post link:https://ssooking.github.io/2020/05/cobaltstrike反溯源/
  • Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.