On this page
Building from Source
Clone the Repository
git clone https://github.com/sud0pls/JustC2.git
cd JustC2Build Everything
The simplest way to build all components (server, client, and extenders) is:
make allThis will:
- Clean and create the
dist/output directory - Build the Go server binary
- Build all extender
.soplugins - Build the Qt6 client
The compiled artifacts are placed in the dist/ directory.
Build Individual Components
Server Only
make serverProduces dist/justserver along with the default configuration files (profile.yaml, ssl_gen.sh, 404page.html).
The server is built with the following Go flags:
-buildvcs=false— Disables VCS stamping-ldflags="-s -w"— Strips debug symbols for a smaller binaryGOEXPERIMENT=jsonv2,greenteagc— Enables experimental JSON v2 encoder and green-tea GC
Extenders Only
make extendersBuilds all extender plugins found in JustServer/extenders/. Each extender directory must contain its own Makefile. The compiled .so files and configuration are placed in dist/extenders/<name>/.
Server + Extenders (VPS Deploy)
make server-extBuilds the server and extenders together. This is the recommended target for deploying to a VPS where you don’t need the GUI client.
Client Only
make clientBuilds the Qt6 client. Requires Qt6 development libraries and CMake.
For faster builds on multi-core machines:
make client-fastThis uses all available CPU cores (-j$(nproc)).
Build Output
After a successful make all, the dist/ directory contains:
dist/
├── justserver # Server binary
├── JustClient # Client binary
├── profile.yaml # Default configuration
├── ssl_gen.sh # TLS certificate generator
├── 404page.html # Default error page
└── extenders/
├── beacon_agent/
│ ├── agent_beacon.so
│ ├── config.yaml
│ ├── ax_config.axs
│ └── src_beacon/ # Agent source (for runtime compilation)
├── beacon_listener_http/
│ ├── listener_beacon_http.so
│ ├── config.yaml
│ └── ax_config.axs
├── beacon_listener_tcp/
├── beacon_listener_smb/
├── beacon_listener_dns/
├── gopher_agent/
│ ├── agent_gopher.so
│ ├── config.yaml
│ ├── ax_config.axs
│ └── src_gopher/ # Agent source (for runtime compilation)
└── gopher_listener_tcp/Generate TLS Certificates
Before starting the server, generate TLS certificates:
cd dist
bash ssl_gen.shThis creates server.rsa.crt and server.rsa.key using a self-signed RSA 2048-bit certificate valid for 10 years.
For ECDSA certificates:
openssl req -x509 -nodes -newkey ec:secp384r1 \
-keyout server.ecdsa.key -out server.ecdsa.crt -days 3650Post-Build Verification
Verify everything built correctly:
# Check server binary
./dist/justserver --help
# Check extenders are present
ls -la dist/extenders/*/
# Check agent source is present (required for runtime payload generation)
ls dist/extenders/beacon_agent/src_beacon/
ls dist/extenders/gopher_agent/src_gopher/
# Check Go is available system-wide (required for agent compilation)
go versionCleaning Build Artifacts
# Remove dist directory
make clean
# Remove all build artifacts (object files, libraries, logs)
make clean-allTroubleshooting
Go version mismatch
go: go.mod requires go >= 1.26.5Install Go 1.26.5 or later. See Requirements.
Qt6 not found
Could not find a package configuration file provided by "Qt6"Install Qt6 development packages:
sudo apt-get install qt6-base-dev qt6-websockets-dev qt6-5compat-devAgent generation fails at runtime
If agent payloads fail to generate after deployment, ensure:
- Go 1.26.5+ is installed on the server machine and in
$PATH - The agent source directories (
src_beacon/,src_gopher/) are present in the extender directories - The server process has write access to the extender directories