13

cobaltstrike反溯源 - ssooking

 2 years ago
source link: https://ssooking.github.io/2020/05/cobaltstrike%E5%8F%8D%E6%BA%AF%E6%BA%90/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

修改默认通信端口

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

修改默认证书

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

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

# 查看默认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域名上线


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK