【笔记】CobaltStrike的HTTP协议上线方式指纹

前言

CobaltStrike的HTTP协议上线方式指纹

上线原理

  • CobaltStrike服务会监听80端口和443端口建立Web服务,并在Web访问路径为/aaa9的页面返回CobaltStrike的Agent文件
    • 其中aaa9为随机字符串
      • 如果是32位上线程序,则经过checksum8计算后的结果为92
      • 如果是64位上线程序,则经过checksum8计算后的结果为93

checksum8计算

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
public class Main {
public static long checksum8(String text) {
if (text.length() < 4) {
return 0L;
}
text = text.replace("/", "");
long sum = 0L;
for (int x = 0; x < text.length(); x++) {
sum += text.charAt(x);
}
return sum % 256;
}

public static void main(String[] args) throws Exception {
System.out.println(checksum8("aaa9"));
}
}

完成

参考文献

freebuf——G孤桜懶契Y