Skip to content

probird5/adaptix-server-flake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adaptix C2 Server - Nix Flake

Nix flake for building and running the Adaptix C2 server component.

Requirements

  • NixOS or Nix package manager with flakes enabled
  • x86_64-linux or aarch64-linux

Quick Start

# Generate SSL certificates
nix run .#gen-ssl

# Generate config file
nix run .#gen-config

# Run server
nix run . -- -profile profile.json

Usage

Run Server

# 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

Server Options

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

Helper Commands

# Generate SSL certificates (creates server.crt and server.key)
nix run .#gen-ssl

# Generate config template (creates profile.json)
nix run .#gen-config

Build Package

nix build .
./result/bin/AdaptixServer -h

Development Shell

For 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

Configuration

Profile JSON Format

{
  "server": {
    "host": "0.0.0.0",
    "port": 40056
  },
  "ssl": {
    "cert": "./server.crt",
    "key": "./server.key"
  },
  "database": {
    "path": "./adaptix.db"
  }
}

Minimal Command Line Setup

# 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

Flake Outputs

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

Links

About

Adaptix C2 server flake to run on nixos

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages