Cobalt Strike(十六)malleable C2的使用

35 篇文章 4 订阅
19 篇文章 8 订阅

1.什么是malleable C2

英文 Malleable Command and Control

可扩展的命令和控制

Mallerable C2 是一种特定的语言,主要用来控制 “Cobalt Strike Beacon”攻击载荷中的网络指针(网络参数)

使用malleable C2

./teasmserver [ip][password][/patch/profile]

2.malleable C2的作用

可以通过修改c2配置文件,更改beacon中 payload的属性、行为、通过框架修改这些配置文件的属性,伪造正常的通信的流量,实现一些ids 入侵检测防火墙的绕过。现在成熟的ids检测工具 都可以检测出Cobalt Strike 这些著名得商业渗透测试工具。在一些很严格的环境中,被检测出来基本上就很难继续深入进行渗透。

3.profiles配置文件的详解

选项关键词

jitter控制beacon的不稳定的抖动时间

maxdns 控制dns的最大访问次数

sleeptime 控制beacon的睡眠间隔时间

spawnto

uri 请求的url

useragent  每次攻击时的浏览器头信息

除了设置Malleable C2的选项外,还能增加任意的http头信息增加到beacon中进行交互通信。

增加任意指定的参数的命令

header "header" "value"

parameter "key" "value"

#
# Asprox botnet traffic profile
#   http://www.trendmicro.com/cloud-content/us/pdfs/security-intelligence/white-papers/wp-asprox-reborn.pdf
#
# Author: @harmj0y
#
set sample_name "Asprox Botnet";

set sleeptime "30000"; # use a ~30s delay between callbacks
set jitter    "20"; # throw in a 10% jitter
set maxdns    "255";
set useragent "Mozilla/4.0 (compatible; MSIE 6.0b; Windows NT 5.0; .NET CLR 1.0.2914)";

http-get {

    set uri "/";

    client {

        header "Accept" "*/*";
        header "Content-Type" "application/x-www-form-urlencoded";
        header "Content-Transfer-Encoding" "base64";
        header "Connection" "Keep-Alive";

        metadata {
            netbiosu;
            uri-append;
        }
    }

    server {

        header "Server" "nginx/1.2.5";
        header "Content-Type" "text/html";
        header "X-Powered-By" "PHP/5.4.4-7";
        header "Vary" "Accept-Encoding";

        output {
            base64;
            print;
        }
    }
}

http-post {

    # random hash to try to simulate the post uri in the report
    set uri "/78dc91f1A716DBBAA9E4E12C884C1CB1C27FFF2BEEED7DF1";

    client {
    
        header "Accept" "*/*";
        header "Content-Type" "application/x-www-form-urlencoded";
        header "Content-Transfer-Encoding" "base64";
        header "Connection" "Keep-Alive";

        id {
            parameter "id";
        }

        output {
            base64;
            print;
        }
    }

    server {

        header "Server" "nginx/1.2.5";
        header "Content-Type" "text/html";
        header "X-Powered-By" "PHP/5.4.4-7";
        header "Vary" "Accept-Encoding";

        output {
            base64;
            print;
        }
    }
}

 5.c2lint 的使用

c2lint的profiles的文件是否正确

绿色是正常 黄色是警告 红色是错误

 6.参考内容

https://github.com/rsmudge/Malleable-C2-Profiles

Broken Promises and Malleable C2 Profiles - Cobalt Strike R​​​​​​esearch and Development

https://www.cobaltstrike.com/help-malleable-c2

git clone https://github.com/rsmudge/Malleable-C2-Profiles

 ——————————————————————————所谓辉煌的人生,不过是欲望的囚徒

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

夜yesec

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值