offensive-coding/adaptixc2-dev/SKILL.md
Auth/lab dev: AdaptixC2 extenders; agents, listeners, services, AxScript UI, configs, protocols, templates, build/validation workflows.
npx skillsauth add aeondave/malskill adaptixc2-devInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Workflows and patterns for building extenders (agents, listeners, services) for the AdaptixC2 framework and maintaining the Template-Generators scaffold system.
AdaptixC2 has three extension points — all are Go plugins (.so, -buildmode=plugin):
| Type | Purpose | InitPlugin signature |
|------|---------|---------------------|
| Agent | Implant builder + session handler | InitPlugin(ts any, moduleDir string, watermark string) adaptix.PluginAgent |
| Listener | Network transport + agent traffic handler | InitPlugin(ts any, moduleDir string, listenerDir string) adaptix.PluginListener |
| Service | Auxiliary pipeline (wrapper, hook, tool) | InitPlugin(ts any, moduleDir string, serviceConfig string) adaptix.PluginService |
The Teamserver loads plugins via plugin.Open(), calls InitPlugin, registers commands from ax_config.axs, and stores instances in safe maps. The axc2 v1.2.0 module defines all interfaces.
<name>_agent/
├── config.yaml # extender_type: "agent"
├── ax_config.axs # AxScript UI + command definitions
├── go.mod # requires axc2 v1.2.0
├── Makefile # go build -buildmode=plugin
├── pl_main.go # InitPlugin, PluginAgent, ExtenderAgent
├── pl_build.go # GenerateProfiles, BuildPayload
├── pl_utils.go # Wire types, crypto, helpers
└── src_<name>/ # Implant source tree
type PluginAgent interface {
GenerateProfiles(profile adaptix.BuildProfile) ([][]byte, error)
BuildPayload(profile adaptix.BuildProfile, agentProfiles [][]byte) ([]byte, string, error)
CreateAgent(beat []byte) (adaptix.AgentData, adaptix.ExtenderAgent, error)
GetExtender() adaptix.ExtenderAgent
}
type ExtenderAgent interface {
CreateCommand(agentData adaptix.AgentData, args map[string]any) (adaptix.TaskData, adaptix.ConsoleMessageData, error)
ProcessData(agentData adaptix.AgentData, decryptedData []byte) error
Encrypt(data []byte, key []byte) ([]byte, error)
Decrypt(data []byte, key []byte) ([]byte, error)
PackTasks(agentData adaptix.AgentData, tasks []adaptix.TaskData) ([]byte, error)
TunnelCallbacks() adaptix.TunnelCallbacks
TerminalCallbacks() adaptix.TerminalCallbacks
PivotPackData(pivotId string, data []byte) (adaptix.TaskData, error)
}
.\agent\generator.ps1 -Name <name> -Watermark <hex8> -Protocol <proto> -Language <lang> -Toolchain <tc>CreateCommand switch cases — one per command in ax_config.axsProcessData response handler — one per response codeGenerateProfiles — serialize listener profiles into agent config blobsBuildPayload — invoke build toolchain, return compiled binarysrc_<name>/go mod tidy && go vet ./...Select-String -Path *.go -Pattern '__[A-Z_]+__'extender_type: "agent"
extender_file: "agent_<name>.so"
ax_file: "ax_config.axs"
agent_name: "<name>"
agent_watermark: "<hex8>"
listeners:
- "<NameCap><ProtoCap>"
multi_listeners: false
See references/plugin-patterns.md for CreateCommand/ProcessData code patterns.
<name>_listener/
├── config.yaml # extender_type: "listener"
├── ax_config.axs # UI form for listener creation
├── go.mod, Makefile
├── pl_main.go # InitPlugin, PluginListener
├── pl_transport.go # Network transport
├── pl_crypto.go # Encrypt/Decrypt
└── pl_internal.go # Internal listener (optional)
type PluginListener interface {
Create(name string, config string, customData []byte) (adaptix.ExtenderListener, adaptix.ListenerData, []byte, error)
}
type ExtenderListener interface {
Start() error
Stop() error
Edit(config string) (adaptix.ListenerData, []byte, error)
GetProfile() ([]byte, error)
InternalHandler(data []byte) (string, error) // internal listeners only
}
.\listener\generator.ps1 -Name <name> -Protocol <proto> -ListenerType externalCreate() — parse JSON config, validate, build transportStart() — bind network, serve HTTP/TCP/DNS/etc.Stop() — graceful shutdownGetProfile() — serialize crypto keys + config for agent embeddinggo mod tidy && go vet ./...InternalHandler() processes relayed data.extender_type: "listener"
extender_file: "listener_<name>.so"
ax_file: "ax_config.axs"
listener_name: "<NameCap><ProtoCap>"
listener_type: "external"
protocol: "http"
<name>_service/
├── config.yaml # extender_type: "service"
├── ax_config.axs # Optional UI + service commands
├── go.mod, Makefile
└── pl_main.go # InitPlugin, PluginService
type PluginService interface {
Call(operator string, function string, args string)
}
.\service\generator.ps1 -Name <name> (add -Wrapper for post-build pipeline)Call() — dispatch by function name, parse args JSONTsEventHookRegister()agent.generate to intercept and transform payloadsextender_type: "service"
extender_file: "service_<name>.so"
ax_file: "ax_config.axs"
service_name: "<ServiceName>"
service_config: |
custom_key: value
See references/plugin-patterns.md for service dispatch pattern and wrapper pipeline.
AxScript is JavaScript (Goja engine) with bridge APIs for UI, commands, menus, and events. Files are loaded from ax_file in config.yaml.
| Plugin type | Required functions | Boot call |
|---|---|---|
| Agent | RegisterCommands(listenerType) → returns {commands_windows, commands_linux, commands_macos}; GenerateUI(listeners_type) → returns {ui_panel, ui_container, ui_height, ui_width} | None (top-level menus/events registered imperatively) |
| Listener | ListenerUI(mode_create) → returns {ui_panel, ui_container, ui_height, ui_width} | None |
| Service | InitService(), ServiceUI(), data_handler(data) | ServiceUI(); must be last line |
.setPanel(panel), never .setLayout() directlygetEnabled() not isEnabled() to read enabled stateax.service_command() is fire-and-forget; results arrive via data_handler(data)ax.service_command(...) must match config.yaml → service_name exactlySee references/axscript-patterns.md for lifecycle examples, UI layout patterns, signal connections, command definitions, and gotchas table. See references/axscript-api.md for complete function reference.
The Teamserver interface (type-asserted from ts any in InitPlugin) provides all server-side operations.
// Agent lifecycle
Ts.TsAgentCreate(agentCrc, agentId string, beat []byte, listenerName, externalIP string, async bool) (adaptix.AgentData, error)
Ts.TsAgentProcessData(agentId string, bodyData []byte) error
Ts.TsAgentUpdateData(newAgentData adaptix.AgentData) error
Ts.TsAgentGetHostedAll(agentId string, maxDataSize int) ([]byte, error)
// Tasks
Ts.TsTaskCreate(agentId, cmdline, client string, data adaptix.TaskData)
Ts.TsTaskUpdate(agentId string, data adaptix.TaskData)
// Downloads
Ts.TsDownloadAdd(agentId, fileId, fileName string, totalSize int) error
Ts.TsDownloadUpdate(agentId, fileId string, data []byte) error
Ts.TsDownloadClose(agentId, fileId string) error
// Services
Ts.TsServiceSendDataClient(serviceName, client, function, args string) error
Ts.TsServiceSendDataAll(serviceName, function, args string) error
// Events
Ts.TsEventHookRegister(event string, phase int, priority int, handler func(...)) (string, error)
AgentData.Sleep is uint (seconds) — convert with time.ParseDuration() then castAgentData.Pid is string — convert with fmt.Sprintf("%d", pid)AgentData.Os uses adaptix.OS_WINDOWS=1, OS_LINUX=2, OS_MAC=3 — never OS_MACOSBuildProfile.AgentConfig is JSON string from container.toJson() in GenerateUISee references/teamserver-api.md for full method signatures and data types.
The scaffold system at AdaptixC2-Template-Generators/ generates plugin + implant boilerplate.
# Agent
.\agent\generator.ps1 -Name <name> -Watermark a1b2c3d4 -Protocol <proto> -Language <lang> -Toolchain <tc>
# With evasion gate
.\agent\generator.ps1 -Name <name> -Watermark a1b2c3d4 -Protocol <proto> -Language <lang> -Toolchain <tc> -Evasion
# Listener
.\listener\generator.ps1 -Name <name> -Protocol <proto> -ListenerType external
# Service
.\service\generator.ps1 -Name <name>
# Service with wrapper pipeline
.\service\generator.ps1 -Name <name> -Wrapper
See references/generator-details.md for placeholder system, protocol overlays, toolchain YAML format, and evasion gate details.
wsl bash -lc 'cd /mnt/d/Sources/AdaptixC2-Template-Generators/output/<dir> && /usr/local/go/bin/go mod tidy && /usr/local/go/bin/go vet ./...'
Select-String -Path output\<dir>\*.go -Pattern '__[A-Z_]+__'
# Zero matches expected
Use this when a Rust agent is wrapped into shellcode by a service such as Ashura:
TcpStream) instead of forking the whole HTTP path.DllMain first with reserved != 0, then call a reflective start export; switching to PE AddressOfEntryPoint / CRT startup can regress even when it looks more loader-correct.make srdi or the repo's equivalent). Source edits to the loader are not enough.cargo check and a real cargo build --target x86_64-pc-windows-gnu --lib; cargo check can miss final import/link problems such as new windows-sys feature bindings.-buildmode=plugin.create_command() in ax_config.axs → matching CreateCommand case in pl_main.goCreateCommand case → matching ProcessData handlerpl_utils.gopl_main.go.tmpl overrides must pass go vet| Forbidden | Correct |
|-----------|---------|
| Edit output/ by hand in regeneration workflow | Fix template, re-generate |
| adaptix.OS_MACOS | adaptix.OS_MAC |
| SessionInfo.Sleep (string) → AgentData.Sleep (uint) | time.ParseDuration(si.Sleep) then cast |
| ProcessId (int) → AgentData.Pid (string) | fmt.Sprintf("%d", params.ProcessId) |
| # __EVASION_FEATURES__ outside [features] | Keep marker inside [features] TOML section |
| Adding command to ax_config.axs without handler | Add CreateCommand + ProcessData simultaneously |
| Module ref without implementation file | Create implementation file simultaneously |
| Stubs that compile but do nothing at runtime | Implement fully or remove entirely |
void* is a GCC extension. Use __builtin_return_address(0).-std=c++17 for C files. Compile C_SOURCES separately with -std=c11.lld. Route -mllvm flags as -Wl,-mllvm,<arg>.# __EVASION_FEATURES__ must be inside [features] to avoid duplicate sections..rsrc as import padding — conflicts with resource injection.AddressOfEntryPoint is safer than exported DllMain; test the specific loader/payload contract and preserve the path that reaches WraithReflectiveStart.| File | When to load |
|---|---|
| references/plugin-patterns.md | CreateCommand/ProcessData patterns, adding commands end-to-end, protocol/wrapper/build workflows |
| references/axscript-patterns.md | AxScript lifecycle examples, UI layout, signals, commands, containers, gotchas |
| references/axscript-api.md | Complete AxScript function reference with signatures |
| references/teamserver-api.md | Full Teamserver method signatures and data types |
| references/generator-details.md | Placeholders, protocol overlays, toolchain YAML, evasion gate |
| Online docs | https://adaptix-framework.gitbook.io/adaptix-framework/development/ |
| Extension-Kit | https://github.com/Adaptix-Framework/Extension-Kit |
| axc2 module | github.com/Adaptix-Framework/axc2 v1.2.0 |
data-ai
Scoped routing: Linux operator; hosts, sessions, users, services, packages, logs, containers, SSH, network paths, privilege evidence.
development
Offensive methodology for ICS/OT/SCADA environments in authorized industrial penetration testing and red team operations. Use when assessing PLCs, RTUs, HMIs, engineering workstations, historians, or field devices running Modbus, DNP3, EtherNet/IP, S7comm/S7+, Profinet, IEC 60870-5-104, BACnet, or OPC-UA. Covers passive OT network enumeration, protocol-level device interrogation, PLC coil/register read-write attacks, HMI session exploitation, historian and engineering workstation compromise, and safe escalation rules for critical infrastructure scope. Does not cover: general IT network exploitation (network-technique), physical hardware interfaces UART/JTAG/SPI (hardware-technique), wireless sensor network attacks (wireless-technique), RF/SDR signal analysis (hardware-ctf or wireless-technique), or CTF-framed ICS lab tasks (ics-ctf).
tools
Offensive methodology for authorized game security assessments, game client security research, and game-adjacent penetration testing in real-world engagements. Use when assessing game clients for cheating vulnerabilities, testing anti-cheat effectiveness, auditing game server protocols for score manipulation or economic fraud, reverse engineering game DRM or license validation, analyzing game save file protection, or assessing game mod/plugin security. Covers: process memory scanning and manipulation (Cheat Engine methodology), game binary reversing for license and DRM bypass, game network protocol analysis and packet replay, anti-cheat mechanism analysis, save file format reversing and tampering, speed hack and value injection techniques. Does NOT cover: CTF game challenges (game-ctf), game engine source code auditing (web-exploit-technique or vuln-search-technique for the backend), or general binary exploitation (pwn-ctf or reversing-technique).
development
Auth assessment: hardware/embedded methodology; UART/JTAG/SWD/SPI/I2C, firmware extraction, boot/debug paths, embedded OS evidence.