Giter Club home page Giter Club logo

geacon_plus's Introduction

geacon_plus

golang实现的CobaltStrike stageless http(s)/dns beacon,支持windows/linux/macos

感谢好兄弟@H4de5提供的windows部分代码支持
二次开发思路CobaltStrike beacon二开指南
dns beacon实现细节CS DNS beacon二次开发指北

免责声明

请在完全阅读并认同如下内容后使用本项目

该项目仅用于对CobaltStrike协议的学习以及相关技术手法实现的测试。 请勿使用于任何非法用途,严禁使用该项目对计算机信息系统进行攻击。由此产生的后果由使用者自行承担

姊妹项目geacon_pro由于存在较高的攻击性,存在被滥用风险,已转为私有,不再对外开放
本项目未同步更新pro版本中后期添加的免杀相关功能,仅作为学习CS beacon的设计使用。

实现功能

支持跨平台使用,可在linux及macOS上执行简单命令(没有macOS所以是理论上可以执行)
已通过本地windows7/10,winserver 2012与ubuntu22.04的测试
实现了实验性质的dns beacon,在CS4.0和CS4.3版本下测试通过。

好像大家更喜欢高版本。。。所以进行了4.1+版本的兼容,可以在config/config.go中使用Support41Plus指定使用4.0版本还是4.1+版本

使用方法

本项目基于darkr4y/geacon进行改进,具体使用方法可参考原项目
c2profile支持部分编码和填充,项目中的c2profile来自于经典jquery.profile,此处一并给出
编译时可添加-ldflags "-H windowsgui -s -w"减小程序体积并取消黑框,同样可以使用go-strip项目删除符号表等数据(好像该项目在go高版本下已失效)

c2profile

实现了对c2profile的部分支持 支持对服务端客户端数据的编码以及prepend append,编码算法支持base64,base64url,netbios,netbiosu,mask

dns部分支持自定义域名前缀

文件管理

实现了mv,cp,mkdir,rm,upload,download,fileBrowse
以标准格式返回数据,支持CS图形化界面交互

进程管理

实现了listProcess和kill,同样支持图形化交互

命令执行

实现了shell、run和execute,使用本地shell执行命令,windows下使用CreateProcess创建进程

进程注入

仅支持windows平台 支持反射dll注入,实现有单纯进程注入与拉起傀儡进程注入,支持screenshot,portscan,netview等CobaltStrike RDI任务 由于注入远程线程有一定几率被抓,添加了一个patch dll的exitProcess为exitThread后将spawn+inject的改为注入自身的操作,可以在config中选开

token相关

尝试实现了runas、make token,steal token等功能 steal token能用,runas处报迷之错误,不清楚什么情况, make token很怪,用LOGON32_LOGON_BATCH输什么都密码错误,用LOGON32_LOGON_NEW_CREDENTIALS输啥都对拿回来的token用不了,好像是仅能用于网络交互?不是很熟

后渗透功能

支持内存加载PowerShell module,支持使用反射DLL注入或go语言内存执行C#

DNS beacon

在config/config.go中修改dns config,填入域名和nameserver ip 端口(可以是非53端口),并配置对应的dns listener即可 注意域名是.example.com.,前后两个点都不能忽略。

在c2profile.go中添加了域名前缀配置,该值为默认配置,若使用自定义profile需根据profile进行修改。

TODO

转到issue里了

reference

本项目开发过程中参考了如下优秀项目
mai1zhi2/SharpBeacon
darkr4y/geacon
WBGlIl/ReBeacon_Src

geacon_plus's People

Contributors

z3ratu1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

geacon_plus's Issues

Linux-dns协议无法上线

cs4.3,Windows 能正常上线,在 Linux-dns checkin不回来,只有个黑 session,用的是 作者的 jq profile,求救~

DNS 协议中 dnsMaskString 这个改设置为什么?

这个配置中

var (
	// 处理解析的服务器
	dnsServer = "8.8.8.8:53"
	//
	dnsMaskString = ""
	// 域名最后面需要加 .,例如 www.baidu.com.
	serverBaseDomain   = ".baidu.com.."
	dnsBeacon          = ""
	dnsTXT             = "api."
	dnsA               = "cdn."
	dnsAAA             = "www6."
	postResultPrefix   = ""
	postMetadataPrefix = "www."
)

dnsMaskString,dnsBeacon,postResultPrefix 默认分别是什么?

关于进程注入问题

老师你好,
geacon_plus,非常好用。但是适配profile的时候进程注入出现了问题。如何在代码层面修改process-inject的方法。

TODO list

  • shell和run命令的异步执行
  • 上传下载的异步操作
  • timestomp
  • ppid功能实现
  • 设置销毁时间
  • 实现端口转发,添加一个代理功能
  • 32位下测试
  • 域前置实现
  • 实现dns beacon
  • 在view file中对linux下的软链接进行了解析
  • 在Windows server 2008下窃取token后执行shell命令会导致用户桌面上出现一闪而过的黑框,暂且不能理解

data_jitter出现不支持问题

功能正常使用。
Cmd type 6
Cmd buffer: xxxxx
Cmd buffer bytes: [28 122 88 156 92 82 221 54 57 140 155 164 34 124 212 228 131]

cs控制台
[-] DEBUG: command type 6 is not support by geacon now
[-] DEBUG: command type 6 is not support by geacon now
[-] DEBUG: command type 6 is not support by geacon now
[-] DEBUG: command type 6 is not support by geacon now
[-] DEBUG: command type 6 is not support by geacon now
[-] DEBUG: command type 6 is not support by geacon now
[-] DEBUG: command type 6 is not support by geacon now
[-] DEBUG: command type 6 is not support by geacon now

使用教程

师傅 问个问题,咋用 有没有使用教程。。

建议

我感觉既然是做到这种,只做专一的就好了,比如只做Linux和MacOS的就好了,win说实在的CS本身已经还可以了。
如果只做Linux和MacOS的,此项目应该会很独特了。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.