Nix flake for building and running the Adaptix C2 server component.
- NixOS or Nix package manager with flakes enabled
- x86_64-linux or aarch64-linux
# Generate SSL certificates
nix run .#gen-ssl
# Generate config file
nix run .#gen-config
# Run server
nix run . -- -profile profile.json# With profile file
nix run . -- -profile profile.json
# With command line options
nix run . -- -i 0.0.0.0 -p 40056 -pw yourpassword -sc ./server.crt -sk ./server.key
# All options
nix run . -- -h| Option | Description |
|---|---|
-profile <path> |
Path to JSON profile file |
-i <address> |
Listen interface (default: 0.0.0.0) |
-p <port> |
Handler port |
-pw <password> |
Server password |
-sc <path> |
SSL certificate path |
-sk <path> |
SSL key path |
-e <uri> |
Teamserver URI endpoint |
-ex <path> |
Path to extender file |
-debug |
Enable debug mode |
# Generate SSL certificates (creates server.crt and server.key)
nix run .#gen-ssl
# Generate config template (creates profile.json)
nix run .#gen-confignix build .
./result/bin/AdaptixServer -hFor manual builds or working with extenders:
nix develop
# Clone full repo (includes extenders)
git clone https://github.com/Adaptix-Framework/AdaptixC2.git
cd AdaptixC2
make server-ext
./dist/adaptixserver -profile profile.json{
"server": {
"host": "0.0.0.0",
"port": 40056
},
"ssl": {
"cert": "./server.crt",
"key": "./server.key"
},
"database": {
"path": "./adaptix.db"
}
}# Generate SSL
openssl req -x509 -newkey rsa:4096 -keyout server.key -out server.crt -days 365 -nodes -subj '/CN=localhost'
# Run with CLI options
nix run . -- -i 0.0.0.0 -p 40056 -pw mypassword -sc ./server.crt -sk ./server.key| Output | Command | Description |
|---|---|---|
packages.default |
nix build |
AdaptixServer binary |
apps.default |
nix run |
Run server |
apps.gen-config |
nix run .#gen-config |
Generate profile.json template |
apps.gen-ssl |
nix run .#gen-ssl |
Generate SSL certificates |
devShells.default |
nix develop |
Development environment |
- Adaptix Framework GitHub
- Adaptix Documentation
- NIX_FLAKES.md - How this flake works