cobaltstrike流量特征
cobaltstrike是红队攻防中常用的工具,用以连接目标和cobaltstrike服务器,方便红队进一步对目标渗透,在双方通信过程中cobaltstrike流量具有很明显的特征
1、http 请求
http-beacon通信中,默认使用get方法向 /dpixel、/__utm.gif、/pixel.gif 、/load等地址发起请求,同时请求头存在 cookie 字段并且值为 base64 编码后的非对算算法加密数据。
# default c2-http profile# define indicators for an HTTP GEThttp-get { # Beacon will randomly choose from this pool of URIs
set uri "/ca /dpixel /__utm.gif /pixel.gif /g.pixel /dot.gif /updates.rss /fwlink /cm /cx /pixel /match /visit.js /load /push /ptj /j.ad /ga.js /en_US/all.js /activity /IE9CompatViewList.xml";
client { # base64 encode session metadata and store it in the Cookie header.
metadata { base64;
header "Cookie";
}
}
server { # server should send output with no changes
header "Content-Type" "application/octet-stream";
output { print;
}
}
}
2、https 证书
https-beacon 通信中,默认使用空证书建立加密通道,流量中可以看见这一过程。
3、dns 异常返回值
dns-beacon 通信中,默认使用 “cdn.”、“www6.”、“api.”、“www.”、“post.” 为开头发起 dns 请求,并且查询结果伴随 0.0.0.0、0.0.0.80、0.0.0.241 等非常规 IP 。
4、chechsum8
运行 staging 模式的pe文件,会向指定服务器的checksum8 路径发起请求来下载 stage 。
即使通过 profile 文件改变下载地址,但c2服务器依然会对checksum8 地址请求作出响应。
5、ja3/ja3s
ja3 和 ja3s 分别代表 tls 握手阶段的 client-hello、server-hello 的数据集合计算出的哈希值(md5),相同版本相同系统下指纹相同,该特征与操作系统、cobaltstrike 版本有关,profile 文件无法对其修改。
示例:
# win10-https-beacon-ja3 指纹:72a589da586844d7f0818ce684948eea
# centos-cs4.4-ja3s 指纹:fd4bc6cea4877646ccd62f0792ec0b62
6、小结
伪造证书和修改C2的profile文件可以解决大部分特征,还可以使用域前置来进一步隐蔽。
参考:https://mp.weixin.qq.com/s/tI7fp4DJjjSCnog-YSQXqg