Skip to content

7 ‐ Build

Maxime dcb edited this page Nov 15, 2024 · 3 revisions

Build TeamServer

Sumbodule & External Projects:

Build

sudo apt install gcc-mingw-w64
sudo apt install g++-mingw-w64
sudo apt install golang-cfssl
sudo apt install cmake 

pip3 install pycryptodome
pip3 install conan==2.1.0
pip3 install grpcio==1.66.1
pip3 install PyQt5
pip3 install pyqtdarktheme
pip3 install protobuf==5.27.0

conan profile detect

git clone https://github.com/maxDcb/C2TeamServer.git
cd C2TeamServer
git submodule update --init

mkdir build
cd build
cmake .. -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=./conan_provider.cmake
make -j4

The TeamServer binary is in ./Release/TeamServer
it's launched using './TeamServer'

The Python Client is in ./Release/Client
It's launched using 'python3 GUI.py'

tree ./Release
├── Client
...
│   ├── GUI.py
├── LinuxBeacons
│   ├── BeaconDns
│   ├── BeaconGithub
│   ├── BeaconHttp
│   ├── BeaconSmb
│   ├── BeaconTcp
│   └── libBeaconHttpDll.so
├── LinuxModules
│   ├── libAssemblyExec.so
│   ├── libCat.so
│   ├── libChangeDirectory.so
│   ├── libChisel.so
│   ├── libCoff.so
│   ├── libDownload.so
│   ├── libEvasion.so
│   ├── libInject.so
│   ├── libKerberosUseTicket.so
│   ├── libKeyLogger.so
│   ├── libListDirectory.so
│   ├── libListProcesses.so
│   ├── libMakeToken.so
│   ├── libPowershell.so
│   ├── libPrintWorkingDirectory.so
│   ├── libPsExec.so
│   ├── libRev2self.so
│   ├── libRun.so
│   ├── libScript.so
│   ├── libSpawnAs.so
│   ├── libStealToken.so
│   ├── libTree.so
│   ├── libUpload.so
│   └── libWmiExec.so
├── Scripts
├── TeamServer
...
│   ├── TeamServer
│   └── TeamServerConfig.json
├── TeamServerModules
│   ├── libAssemblyExec.so
│   ├── libCat.so
│   ├── libChangeDirectory.so
│   ├── libChisel.so
│   ├── libCoff.so
│   ├── libDownload.so
│   ├── libEvasion.so
│   ├── libInject.so
│   ├── libKerberosUseTicket.so
│   ├── libKeyLogger.so
│   ├── libListDirectory.so
│   ├── libListProcesses.so
│   ├── libMakeToken.so
│   ├── libPowershell.so
│   ├── libPrintWorkingDirectory.so
│   ├── libPsExec.so
│   ├── libRev2self.so
│   ├── libRun.so
│   ├── libScript.so
│   ├── libSpawnAs.so
│   ├── libStealToken.so
│   ├── libTree.so
│   ├── libUpload.so
│   └── libWmiExec.so
├── Tools
├── WindowsBeacons
│   ├── BeaconDns.exe
│   ├── BeaconGithub.exe
│   ├── BeaconHttpDll.dll
│   ├── BeaconHttp.exe
│   ├── BeaconSmb.exe
│   └── BeaconTcp.exe
├── WindowsModules
│   ├── AssemblyExec.dll
│   ├── Cat.dll
│   ├── ChangeDirectory.dll
│   ├── Chisel.dll
│   ├── Coff.dll
│   ├── Download.dll
│   ├── Evasion.dll
│   ├── Inject.dll
│   ├── KerberosUseTicket.dll
│   ├── KeyLogger.dll
│   ├── ListDirectory.dll
│   ├── ListProcesses.dll
│   ├── MakeToken.dll
│   ├── Powershell.dll
│   ├── PrintWorkingDirectory.dll
│   ├── PsExec.dll
│   ├── Rev2self.dll
│   ├── Run.dll
│   ├── Script.dll
│   ├── SpawnAs.dll
│   ├── StealToken.dll
│   ├── Tree.dll
│   ├── Upload.dll
│   └── WmiExec.dll
└── www

Build Beacons & Modules

Sumbodule & External Projects:

Build the Windows Beacons and Modules

git clone https://github.com/maxDcb/C2Implant.git
cd C2Implant
git submodule update --init   
mkdir buildWindows  
cd buildWindows 

Windows x64

with "x64 Native Tools Command Prompt for VS":

# Without tests and logs  
cmake  -G "Visual Studio 17 2022" ..   
# With tests and logs  
cmake  -G "Visual Studio 17 2022" -DWITH_TESTS=ON ..   
msbuild .\C2Implant.sln /property:Configuration=Release -m  

or
compile the generated C2.sln in release with Visual studio (config Runtime Library Multi-threaded (/MT) & Release)

Windows x86

cmake  -G "Visual Studio 17 2022" -A "Win32" ..   
msbuild .\C2Implant.sln /property:Configuration=Release /p:Platform=Win32 -m  

Production

Beacons are in: "Release\Beacons"
Modules DLL in: "Release\Modules"