【内网渗透】隐藏cobaltstrike服务器—自定义证书+C2侧写

admin 2023年12月23日10:12:45评论18 views字数 1070阅读3分34秒阅读模式

简介

【内网渗透】隐藏cobaltstrike服务器—自定义证书+C2侧写

自定义证书

查看Cobalt strike默认证书

发现特征含有cobaltstrike关键字
【内网渗透】隐藏cobaltstrike服务器—自定义证书+C2侧写

常用keytool命令
查看证书文件:keytool -list -v -keystore xx.store

修改证书密码:keytool -storepasswd -keystore test.store

修改alias别名:keytool -changealias -keystore test.store -alias sourame -destalias new_name

制作自己的证书

eytool -keystore cobaltstrike.store -storepass cs12138 -keypass cs12138 -genkey -keyalg RSA -alias xiaoc -dname "CN=(CN), OU=(SHANGHAI), O=(SHANGHAI), L=(DONGCHENG), ST=(SHANGHAI), C=(CN)"

【内网渗透】隐藏cobaltstrike服务器—自定义证书+C2侧写

删除Cobalt strike默认证书,导入刚生成的证书

修改默认证书

可以不用自己制作证书,修改配置文件并删除原有证书,Cobalt strike会根据填写信息生成证书
【内网渗透】隐藏cobaltstrike服务器—自定义证书+C2侧写

建议还是更改配置,防止证书被删后会生成默认的证书信
【内网渗透】隐藏cobaltstrike服务器—自定义证书+C2侧写
默认证书:
【内网渗透】隐藏cobaltstrike服务器—自定义证书+C2侧写
新证书:
【内网渗透】隐藏cobaltstrike服务器—自定义证书+C2侧写
【内网渗透】隐藏cobaltstrike服务器—自定义证书+C2侧写

C2侧写

我们所使用的C2工具等,可能早已被AV等防护软件所标记,所以需要订制攻击工具。Malleable C2 是 Cobalt Strike 的一项功能, 意为 "可定制的" 的 C2 服务器.。Malleable C2 允许我们仅通过一个简单的配置文件来改变 Beacon 与 C2 通信时的流量特征与行为。
我们可以使用CS自带 C2lint 来测试,看jquery.profile侧写和生成的test.profile侧写的语法是否正确
这里的jquery-c2.4.9.profile是最新版,默认版本
【内网渗透】隐藏cobaltstrike服务器—自定义证书+C2侧写
【内网渗透】隐藏cobaltstrike服务器—自定义证书+C2侧写

也可以使用SourcePoint定制化侧写
填好相关配置后,用sourcepoint 根据 yaml 文件生成自定义的 C2 侧写,侧写名字为xiaoc.profile
./SourcePoint -Yaml profile.yaml

这里直接用jquery-c2.4.9.profile进行演示
使用自己的证书+个性化C2侧写文件,在修改下默认端口
./teamserver x.x.x.x 12138 jquery-c2.4.9.profile
【内网渗透】隐藏cobaltstrike服务器—自定义证书+C2侧写

Nginx 反向代理

受害机器<——————>重定向(可部署多个)<——————>CS服务器

后续继续!!!!!!!!!!!!!!!


原文始发于微信公众号(小C学安全):【内网渗透】隐藏cobaltstrike服务器—自定义证书+C2侧写

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2023年12月23日10:12:45
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   【内网渗透】隐藏cobaltstrike服务器—自定义证书+C2侧写http://cn-sec.com/archives/2330541.html

发表评论

匿名网友 填写信息