Khepri is a Cross-platform agent, the architecture and usage like Coblat Strike but free and open-source.

Related tags

Miscellaneous khepri
Overview

Khepri Logo

Khepri

Free,Open-Source,Cross-platform agent and Post-exploiton tool written in Golang and C++

Description

Khepri is a Cross-platform agent, the architecture and usage like Coblat Strike but free and open-source.


This project is for learning Golang and C++ only, if someone's rights have been violated, please contact me to remove the project, and the last DO NOT USE IT ILLEGALLY

architecture

  • beacon: Agent, written in C++.
  • teamserver: Server, written in Golang.
  • teamclient: User client, written in C++, the UI use Qt-GUI.

Features

architecture

  • Supported C2 Protocols:

    • TCP
    • UDP
  • Fast network serialization (Protocol Buffers)

  • Agent Features:

    • System Information
    • Process Manager
    • File Manager
    • Remote Shell
    • Remote Execution
  • Supported operating systems

System Windows Linux Macos
beacon
teamserver
teamclient

Quick Start

Please see Quick Start

TODO

  • Refactor teamserver code
  • Beacon supports more protocols:https、dns
  • Beacon supports https-dns
  • Beacon supports dynamic plugin
  • Beacon and Teamclient support proxy
  • Support CI
  • Beacon and teamclient support macos
  • Reduce beacon to 100kb(Don't use openssl、support Mingw compile) ...

Contributing

Issues and PR is welcome.

Issues
  • I try to compile in kali

    I try to compile in kali

    my mistake , i delete and add again git clone --recursive https://github.com/geemion/Khepri

    next :

    protoc -I=/root/Khepri/proto --go_out=/root/Khepri/src /root/Khepri/proto\client.proto
    or
    protoc -I=[/root/Khepri/proto] --go_out=[/root/Khepri/src] [/root/Khepri/proto]\client.proto
    
    #  protoc -I=/root/Khepri/proto --go_out=/root/Khepri/src /root/Khepri/proto\client.proto                                                                     
    Could not make proto path relative: /root/Khepri/protoclient.proto: No such file or directory
    
    protoc -I=[proto] --go_out=[src] [proto]\client.proto                                                                                                       1 ⨯
    [proto]: warning: directory does not exist.
    Could not make proto path relative: [proto]client.proto: No such file or directory
    
    
    

    ./gen-mk-project.sh
    mkdir buildmk CMake Error: The source directory "/root/Khepri" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI. ./gen-mk-project.sh: line 12: -DVCPKG_TARGET_TRIPLET=x64-linux: command not found make: *** No targets specified and no makefile found. Stop.

    I edit the gen-mk-project.sh
    -DCMAKE_TOOLCHAIN_FILE="/root/vcpkg/scripts/buildsystems/vcpkg.cmake"\ #edit it

    how i have same error mkdir buildmk CMake Error: The source directory "/root/Khepri" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI. ./gen-mk-project.sh: line 12: -DVCPKG_TARGET_TRIPLET=x64-linux: command not found make: *** No targets specified and no makefile found. Stop.

    I dont want make mistake

    opened by dodoaska 3
  • 您好,师傅,系统的学习了您的代码,感触很多,自己也有一些问题

    您好,师傅,系统的学习了您的代码,感触很多,自己也有一些问题

    beacon代码 win端beacon 因为是c++控制台程序特性,如果代码不加getchar程序就直接退出,运行出现黑框是个很难受的问题,尝试更改子系统为windows隐藏黑框 但是这样的话getchar函数没有任何意义 运行任然自动退出 我尝试创建线程启动yasio start方法 可惜无奈自己是个菜鸡 执行后出现空指针报错 目前任没有头绪

    我想着能和师傅一起开发此项目 (虽然我很菜) 并且我想着能结合红队渗透思路 已经横向的思想方法 对项目进行整体构建 希望您能给我这个机会 我深感荣幸 对我来说也是一种锻炼

    question 
    opened by ro0tmylove 2
  • teamclient编译问题

    teamclient编译问题

    太感谢师傅了 ,teamserver 和beacon已经编译成功

    teamclient编译不出所料也出现了问题 执行此命令出现问题

    cmake --build . --target teamclient --config MinSizeRel
    

    grpc_cpp_plugin.exe 是不是也需要和vckpg的包版本相同 导致的此问题

    image

    invalid 
    opened by xiaoheiwo 2
  • beacan编译求助

    beacan编译求助

    你好 非常感想您解决我上一个teamserver问题,我成功编译了他, 现在我又碰到新问题了. 我使用的环境如下

    window10
    vs2019 
    cmake最新
    vcpkg 
    ming-w64 
    

    我尝试编译beacon 我使用vcpkg安装了cryptopp、protobuf

    vcpkg install cryptopp:x64-windows-static
    vcpkg install protobuf:x64-windows-static
    

    我在vcpkg上面并没有找到yasio的包 于是我去gitlab参照官方教程

    一开始我是把yasio编译成lib文件 但是我发现这样并不行 我尝试把yasio的源码放在beacon项目的yasio目录里 使用如下命令 生成了vs的工程文件 cmake -S . -B buildvc64 -DCMAKE_TOOLCHAIN_FILE="C:/dev/vcpkg-master/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET="x64-windows-static"

    我使用vs2019打开工程后 一直提示我 yasio/yasio.hpp等相关文件无法找到

    于是我把include"yasio/yasio.hpp" 
    改成了include"yasio.hpp"
    

    解决了这个问题 但是新的问题又出现了 image 以及下面很多很多 错误

    希望师傅可以将你使用的环境告知一下 非常感谢

    从来没有使用cmake编译项目 好难

    documentation good first issue 
    opened by xiaoheiwo 2
  • teamserver 编译问题

    teamserver 编译问题

    Hello, there was a problem when I compiled teamserver, I did not find these definitions in the compiled proto file, how can I solve it, thank

    C:\Users\abc\Desktop\Khepri-main\Khepri-main\src\teamserver>go build cmd\teamserver\teamserver.go
    # teamserver/internal/rpc
    internal\rpc\teamrpc.go:39:2: undefined: protobuf.UnimplementedTeamRPCServiceServer
    internal\rpc\teamrpc.go:87:49: undefined: protobuf.TeamRPCService_CommandChannelServer
    internal\rpc\teamrpc.go:302:2: undefined: protobuf.RegisterTeamRPCServiceServer
    
    documentation good first issue 
    opened by xiaoheiwo 2
  • Linux beacon Bug

    Linux beacon Bug

    [yasio][1644127107420][global] the yasio-3.37.1 is initialized, the size of per transport is 65880 when object_pool enabled.

    [yasio]xxsocket::getipsv: flags=1 [yasio][1644127107422][index: 0] connecting server 192.168.3.176(192.168.3.176):10011...

    [yasio][1644127107423][index: 0] the connection #1(0x7f9a14000950) [192.168.86.137:57352] --> [192.168.3.176:10011] is established.

    [yasio]xxsocket::traverse_local_address: getifaddrs fail! [yasio]xxsocket::traverse_local_address: getifaddrs fail! [yasio]xxsocket::traverse_local_address: getifaddrs fail! [yasio]xxsocket::traverse_local_address: getifaddrs fail! [yasio]xxsocket::traverse_local_address: getifaddrs fail! [yasio]xxsocket::traverse_local_address: getifaddrs fail! [yasio]xxsocket::traverse_local_address: getifaddrs fail! [yasio]xxsocket::traverse_local_address: getifaddrs fail!

    操作系统Centos7.9 长时间运行后会出现getifaddrs fail!,客户端的任何操作都无法使用,心跳还是存在的。

    bug 
    opened by tin7safe 1
  • 编译问题

    编译问题

    F:\Khepri\src\teamserver>go build cmd\teamserver\teamserver.go cmd\teamserver\teamserver.go:21:2: use of internal package teamserver/internal/conf not allowed cmd\teamserver\teamserver.go:22:2: use of internal package teamserver/internal/rpc not allowed

    以及teamclient CMake Error at C:/Program Files (x86)/vcpkg/scripts/buildsystems/vcpkg.cmake:861 (_find_package): Found package configuration file:

    C:/Program Files/grpc/lib/cmake/grpc/gRPCConfig.cmake
    

    but it set gRPC_FOUND to FALSE so package "gRPC" is considered to be NOT FOUND. Reason given by package:

    The following imported targets are referenced, but are missing: absl::base absl::core_headers absl::memory absl::status absl::cord absl::str_format absl::strings absl::synchronization absl::time absl::optional absl::flat_hash_map absl::inlined_vector absl::bind_front absl::hash absl::statusor absl::variant absl::utility protobuf::libprotobuf protobuf::libprotoc

    Call Stack (most recent call first): CMakeLists.txt:98 (find_package)

    -- Configuring incomplete, errors occurred! See also "F:/Khepri/src/teamclient/buildvc64/CMakeFiles/CMakeOutput.log".

    help wanted wontfix 
    opened by whoami-Root 1
  • teamserver build  问题

    teamserver build 问题

    F:\Khepri\src\teamserver>go build cmd\teamserver\teamserver.go cmd\teamserver\teamserver.go:21:2: use of internal package teamserver/internal/conf not allowed cmd\teamserver\teamserver.go:22:2: use of internal package teamserver/internal/rpc not allowed

    以及 teamclient

    CMake Error at C:/Program Files (x86)/vcpkg/scripts/buildsystems/vcpkg.cmake:861 (_find_package): Found package configuration file:

    C:/Program Files/grpc/lib/cmake/grpc/gRPCConfig.cmake
    

    but it set gRPC_FOUND to FALSE so package "gRPC" is considered to be NOT FOUND. Reason given by package:

    The following imported targets are referenced, but are missing: absl::base absl::core_headers absl::memory absl::status absl::cord absl::str_format absl::strings absl::synchronization absl::time absl::optional absl::flat_hash_map absl::inlined_vector absl::bind_front absl::hash absl::statusor absl::variant absl::utility protobuf::libprotobuf protobuf::libprotoc

    Call Stack (most recent call first): CMakeLists.txt:98 (find_package)

    -- Configuring incomplete, errors occurred! See also "F:/Khepri/src/teamclient/buildvc64/CMakeFiles/CMakeOutput.log".

    opened by whoami-Root 1
  • Error in compiling teamserver

    Error in compiling teamserver

    Hi, I've been compiling this project for a whole week now, after generating the protobuf and grpc codes for teamserver I encountered following error.

    # teamserver/internal/proto/protobuf
    internal/proto/protobuf/teamrpc_grpc.pb.go:21:33: undefined: LoginUserReq
    internal/proto/protobuf/teamrpc_grpc.pb.go:21:74: undefined: LoginUserRsp
    internal/proto/protobuf/teamrpc_grpc.pb.go:23:37: undefined: ServerCmdReq
    internal/proto/protobuf/teamrpc_grpc.pb.go:23:78: undefined: ServerCmdRsp
    internal/proto/protobuf/teamrpc_grpc.pb.go:34:63: undefined: LoginUserReq
    internal/proto/protobuf/teamrpc_grpc.pb.go:34:104: undefined: LoginUserRsp
    internal/proto/protobuf/teamrpc_grpc.pb.go:53:8: undefined: CommandReq
    internal/proto/protobuf/teamrpc_grpc.pb.go:54:11: undefined: CommandRsp
    internal/proto/protobuf/teamrpc_grpc.pb.go:62:54: undefined: CommandReq
    internal/proto/protobuf/teamrpc_grpc.pb.go:66:55: undefined: CommandRsp
    internal/proto/protobuf/teamrpc_grpc.pb.go:66:55: too many errors
    

    What's the problem here?

    FYI I noticed a typo in protobuf code generating section in the doc protoc -I=[Khepri Proto Dir] --go_out=plugins=grpc:[Khepri Src Dir] -I=[Khepri Proto Dir]\teamrpc.proto Will produce error Missing input file. Instead I think this should be protoc -I=[Khepri Proto Dir] --go_out=plugins=grpc:[Khepri Src Dir] [Khepri Proto Dir]\teamrpc.proto Don't know if this is correct.

    Regards.

    documentation 
    opened by PZRdUqv15P 1
  • teamclient编译问题 求助

    teamclient编译问题 求助

    beacon已经编译成功 cmake报错 image

    VS2015中 image image

    前提是 在protoc -I=[Khepri Proto Dir] --go_out=plugins=grpc:[Khepri Src Dir] -I=[Khepri Proto Dir]\teamrpc.proto 时显示 Missing input file. image 后面我把 -I=去掉 为 protoc -I=C:\src\Khepri\proto --go_out=plugins=grpc:C:/src/Khepri/src C:/src/Khepri/proto/teamrpc.proto 不知道有没有影响

    opened by NO3389 0
Releases(v1.0.0)
  • v1.0.0(Jul 31, 2021)

    CHANGELOG

    • refactor: fix beacon info display
    • feat: doubleclick file list
    • docs: disclaimer
    • feat: teamclient support http_proxy
    • feat: beacon support macos
    • chore: doc add badges,teamclient support macos build
    • chore: debug message
    • refactor: use library xchacha20
    • docs: statement
    • refactor: remove openssl,use cryptopp
    • feat: delete beacon
    • fix: format mac
    • fix: rpc token check
    • docs: add quick_start.md
    • fix: fix linux get_mac
    • feat: init commit
    • Initial commit
    Source code(tar.gz)
    Source code(zip)
Owner
Young
Young
Vimb - the vim like browser is a webkit based web browser that behaves like the vimperator plugin for the firefox and usage paradigms from the great editor vim.

Vimb - the vim like browser is a webkit based web browser that behaves like the vimperator plugin for the firefox and usage paradigms from the great editor vim. The goal of vimb is to build a completely keyboard-driven, efficient and pleasurable browsing-experience.

Daniel Carl 1.1k Jun 28, 2022
SDR++ is a cross-platform and open source SDR software with the aim of being bloat free and simple to use.

SDR++ is a cross-platform and open source SDR software with the aim of being bloat free and simple to use.

AlexandreRouma 1.8k Jul 3, 2022
A free and open-source cross-platform application to control your Philips hue compatible lights💡

?? OpenHue ?? A cross platform application to control your Philips hue compatible lights. licensed under the gpl 3.0 license. Currently in super early

BOB450 3 Dec 19, 2021
SomeSmile - a free, open source and not yet cross-platform

SomeSmile - a free, open source and not yet cross-platform Table Of Contents For What? Structure Start Usage Guide How To Build Screenshots End For Wh

SonicTheHedgehog 3 Jan 23, 2022
PRINT++ is a simple, open source print library for C++, the main usage of PRINT++ is printing out "log" messages

note that for now, print++ is using std::cout. In future it will be using own print function. Windows version can be unstable That library is in alpha

Ksawery 3 Jan 23, 2022
A repo with the source code for Nullboard Backup Agent

This is a repo with the source code for Nullboard Backup Agent - a small companion utility for Nullboard that lives in the Windows system tray and acts as a storage provider for making automatic backups of NB's boards.

Alexander Pankratov 5 Feb 12, 2022
It's a simple and free x86_64 architecture operating system created by one person, GoofOS started since 2022

This project is while developing... GoofOS GoofOS is a text operating system for x86 computers. About This is a 32 bit x86_64 graphical operating syst

null 3 May 1, 2022
Cutter is a free and open-source reverse engineering platform powered by rizin

Cutter is a free and open-source reverse engineering platform powered by rizin. It aims at being an advanced and customizable reverse engineering platform while keeping the user experience in mind. Cutter is created by reverse engineers for reverse engineers.

Rizin Organization 11.6k Jun 29, 2022
Sourcetrail - free and open-source interactive source explorer

Sourcetrail Important Note: This project was archived by the original autors and maintainers of Sourcetrail by the end of 2021. If you want to know mo

Coati Software 12.7k Jun 27, 2022
A cross platform shader language with multi-threaded offline compilation or platform shader source code generation

A cross platform shader language with multi-threaded offline compilation or platform shader source code generation. Output json reflection info and c++ header with your shaders structs, fx-like techniques and compile time branch evaluation via (uber-shader) "permutations".

Alex Dixon 273 Jun 10, 2022
This is a helper library to abstract away interfacing with floppy disk drives in a cross-platform and open source library.

Adafruit Floppy This is a helper library to abstract away interfacing with floppy disk drives in a cross-platform and open source library. Adafruit Fl

Adafruit Industries 125 Jun 22, 2022
FireDog - Open source cross-platform lightweight virus signature detection engine.

FireDog 开源跨平台轻量级病毒特征检测引擎。Open source cross-platform lightweight virus signature detection engine. 语言 Language C++ 11 LICENSE 是你们喜欢的:MIT License. 让我们搞起

null 38 Jun 21, 2022
First open-source Geometry Dash cross-platform Modding SDK

BoolkaSDK First open-source Geometry Dash cross-platform Modding SDK Requirements CMake 3.21 Android NDK r23 LLVM x86 Java and ApkTool Building Open C

null 6 Jun 9, 2022
agent-less and lightweight communication library compatible with rclcpp for embedded devices

mros2 mros2 (formally mROS 2) realizes an agent-less and lightweight runtime environment compatible with ROS 2 for embedded devices. It consists of ba

null 93 Jun 24, 2022
TiEtwAgent - PoC memory injection detection agent based on ETW, for offensive and defensive research purposes

TiEtwAgent - ETW-based process injection detection This project was created to research, build and test different memory injection detection use cases

Filip Olszak 135 Jun 17, 2022
Unicorn is a lightweight, multi-platform, multi-architecture CPU emulator framework, based on QEMU.

Unicorn Engine Unicorn is a lightweight, multi-platform, multi-architecture CPU emulator framework, based on QEMU. Unicorn offers some unparalleled fe

lazymio 1 Nov 7, 2021
Online multi-agent trajectory planner using linear safe corridor (LSC)

lsc_planner This package presents an efficient multi-agent trajectory planning algorithm which generates safe trajectories in obstacle-dense environme

Jungwon Park 21 Jun 1, 2022
Following Automotive Open System Architecture (AUTOSAR)

Following Automotive Open System Architecture (AUTOSAR), Diagnostic Communication Manager Module Implemented over Communication Stack Based on AUTOSAR Specification Document (SWS) Release 4.3.1 Classic Platform, ISO-14229 Standard (Road Vehicle Unified Diagnostic Services (UDS)) and ISO-15765 (Road Vehicle Diagnostics on Controller Area Network (CAN)).

null 7 Jun 17, 2022