Generates a ready-to-build AdaptixC2 service extender plugin — optionally including a post-build wrapper pipeline for payload transformation.
A service plugin runs server-side and exposes callable functions to operators. Unlike agents (implant + plugin) or listeners (transport + plugin), services are pure server-side logic — think notifications, integrations, or utilities.
A wrapper is a specialized service that hooks into agent.generate (post-phase)
and applies configurable pipeline stages (encrypt, pack, obfuscate, …) to the
generated payload before it reaches the operator.
# Plain service
.\generator.ps1 -Name telegram
# Service with wrapper pipeline
.\generator.ps1 -Name crystalpalace -Wrapper
# Bash — plain service
NAME=telegram ./generator.sh
# Bash — with wrapper pipeline
NAME=crystalpalace WRAPPER=1 ./generator.shWhen neither -Wrapper nor WRAPPER=1 is set, the generator asks interactively:
Include post-build wrapper pipeline? [y/N]:
Plain service:
<name>_service/
├── config.yaml # Service manifest (extender_type: "service")
├── go.mod # Go module
├── Makefile # Build targets
├── pl_main.go # Plugin entry + Call handler
└── ax_config.axs # Service UI form
With wrapper pipeline (-Wrapper):
<name>_wrapper/
├── config.yaml # Service manifest (extender_type: "service")
├── go.mod # Go module
├── Makefile # Build targets
├── pl_main.go # Plugin entry + event hook + Call handler
├── pl_wrapper.go # Pipeline engine (Stage, RunPipeline)
└── ax_config.axs # Wrapper UI (status, config save/load)
Both variants implement adaptix.PluginService:
type PluginService interface {
Call(operator string, function string, args string)
}The Call method is invoked when an operator triggers a service function from
the Adaptix UI. function identifies which action to run, and args carries
the JSON-encoded arguments from the form defined in ax_config.axs.
- Add functions — extend the
switchinpl_main.go → Call(). - Add UI controls — edit
ax_config.axsto add your function names to the combo box and any extra form fields. - Add Teamserver methods — expand the
Teamserverinterface with any methods your service needs (see the agent/listener templates for the full set). - Build —
go mod tidy && make plugin. - Deploy — copy
dist/contents to<adaptix-server>/extenders/.
When the wrapper pipeline is included, pl_main.go contains an initStages()
function where you register transformation stages:
func initStages() {
RegisterStage(Stage{
Name: "rdll_loader",
Enabled: true,
Run: stageRdllLoader,
})
}Each stage function has the signature:
func(payload []byte, cfg map[string]string, ctx *BuildContext) ([]byte, error)Stages run in registration order. If any stage returns an error, the pipeline stops and the original payload is returned. See the root README for detailed pipeline documentation and examples.
The wrapper is the first addon. The generator checks the addon subdirectory
first for each template file -- if the addon provides an override, it is used;
otherwise the base template is used. Future addons (alerting, C2 bridges, etc.)
follow the same pattern under service/templates/<addon>/.
| Placeholder | Replaced with |
|---|---|
__NAME__ |
Lowercase service name |
__NAME_CAP__ |
Capitalized service name |