普通CS没有做流量混淆会被防火墙拦住流量,所以偶尔会看到CS上线了机器但是进行任何操作都没有反应,这里尝试一下做流量混淆。参考网上的文章,大部分是两种方法,一种更改teamserver 里面与CS流量相关的内容,一种是利用Keytool工具生成新的store证书,我们需要做的修改大概为3个地方:
1)修改默认端口
2)去除store证书特征
3)修改profile
1.修改默认端口
编辑teamserver文件,更改server port部分50000
2.去除store证书特征
查看证书,默认密码123456
keytool -list -v -keystore cobaltstrike.store
可以看到未修改的证书还是有很明显的cs特征的,比如 Alias name、Owner、Issuer字段
Keytool是一个Java的证书管理工具,下面用Keytool生成一个store证书
keytool -h
Illegal option: -h
ey and Certificate Management Tool
Commands:
-certreq Generates a certificate request
-changealias Changes an entry's alias
-delete Deletes an entry
-exportcert Exports certificate
-genkeypair Generates a key pair
-genseckey Generates a secret key
-gencert Generates certificate from a certificate request
-importcert Imports a certificate or a certificate chain
-importpass Imports a password
-importkeystore Imports one or all entries from another keystore
-keypasswd Changes the key password of an entry
-list Lists entries in a keystore
-printcert Prints the content of a certificate
-printcertreq Prints the content of a certificate request
-printcrl Prints the content of a CRL file
-storepasswd Changes the store password of a keystore
使用以下命令生成一个新的store证书,-alias 和 -dname 可以自由发挥,也可以用其他的来混淆流量
keytool -keystore cobaltstrike.store -storepass 123456 -keypass 123456 -genkey -keyalg RSA -alias Microsec.com -dname "CN=Microsec e-Szigno Root CA, OU=e-Szigno CA, O=Microsec Ltd., L=Budapest, S=HU, C=HU"
参数 含义
-alias 指定别名
-storepass 指定更改密钥库的存储口令
-keypass pass 指定更改条目的密钥口令
-keyalg 指定算法
-dname 指定所有者信息
也可以编辑 teamserver
文件来生成证书
3.修改profiles
现在很多WAF都能检测出CS的流量特征,而CS的流量由Malleable C2配置来掌控的,所以我们需要定向去配置这个Malleable-C2。
下载Malleable-C2-Profiles文件
CS中集成了一个包含在Linux平台下的C2lint工具,可以检查profile代码是否有问题
chmod 777 c2lint
./c2lint ./Malleable-C2-Profiles/APT/havex.profile
因为0.0.0.0是Cobalt Strike DNS Beacon特征,可以在profile内加一段 set dns_idle "8.8.8.8"; 之后profile内默认的能改则改
http-get部分,包括uri和header都可以根据实战抓包进行修改
原文始发于微信公众号(网络安全自修室):魔改Cobaltstrike该注意哪些?
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论