Adaptix Framework
AdaptixC2 GitHubExtension-Kit
  • Welcome
  • Adaptix C2
    • Getting Starting
      • Installation
      • Starting
    • User Interface
    • Listeners and Agents
    • Agent Browsers
      • File Browser
      • Process Browser
    • Data management
      • Tasks storage
      • Downloads Storage
      • Screenshots Storage
    • BOF and Extensions
    • Pivoting
    • Linking Agents
  • Extenders
    • Listeners
      • Beacon HTTP
      • Beacon SMB
      • Beacon TCP
      • Gopher TCP
    • Agents
      • Beacon
        • Beacon BOFs
      • Gopher
  • Development
    • Plugins
    • Listener plugin
    • Agent plugin
  • AX Support Soft
    • AxChecker
    • CmdChecker
  • Changelog
    • v0.1 -> v0.2
    • v0.2 -> v0.3
    • v0.3 -> v0.4
Powered by GitBook
On this page
  • What is it?
  • File Format
  • Command
  • Command Args
  • Subcommands
  1. AX Support Soft

CmdChecker

Last updated 3 months ago

What is it?

The of CmdChecker is available on GitHub. CmdChecker is a helper application for checking AX scripts used in the Adaptix agent plugin and client extensions. CmdChecker parses the JSON file, processes the entered commands and outputs data that will be sent to the Adaptix server.

File Format

Command

The JSON file must contain a json-array of commands. For example, consider the following file.

doc.json
[
  {
    "command": "test_command",
    "message": "Task: this message from server",
    "description": "Description command",
    "example": "test_command -int 123 qweasd",
    "args": [
      "STRING <str> (default value) {String value}",
      "INT <-int digest>",
      "BOOL [-b]",
      "FILE [content] {Will be encoded in base64}"
    ]
  },
  {
    ...
  }
]

The Adaptix command structure has the following JSON parameters:

  • command - сonsole command name;

  • message - the message displayed in the console after entering the command;

  • description - description of the command;

  • example - example of command input;

  • args - command arguments.

For all commands from the file, a 'help' menu is automatically created.

Command Args

The args parameter is a json-array of strings. Each string contains information about the parameter according to the following mask:

"Type [or<Argument_name>or] (Default_value) {Argument_description}"

Example:
"STRING <str> (default value) {String value}"
  • Type - is a required parameter that must have one of the following values: BOOL, INT, STRING, FILE. If the type is "FILE", then the path to the file will need to be specified in the console. In the received JSON data, the file contents will be encoded in base64.

  • Argument_name - is a required parameter that defines the name of the parameter. If Argument_name is specified in brackets <>, then the parameter is mandatory, and if in brackets [], then it is optional. The argument name can be specified as a simple string, or as a flag (starting with - or /) and a simple string. For the BOOL type, the Argument_name is specified by a flag in square brackets [].

  • Default_value - is an optional parameter that specifies the default value. To do this, Argument_name must be specified in brackets <>.

  • Argument_description - is an optional parameter that describes the parameter for the 'help' menu.

An example of data that will be sent to the server:

Subcommands

A command can have subcommands defined. This parameter is a JSON array of commands.

{
  "command": "ps",
  "description": "Process manager",
  "subcommands":
  [
    {
      "name": "list",
      "message": "Task: show process list",
      "description": "Show process list",
      "example": "ps list"
    },
    {
      "name": "kill",
      "message": "Task: kill process",
      "description": "Kill a process with a given PID",
      "example": "ps kill 7865",
      "args": [
        "INT <pid>"
      ]
    },
    {
      "name": "run",
      "message": "Task: create new process",
      "description": "Run a program",
      "example": "run -s cmd.exe \"whoami /all\"",
      "args": [
        "BOOL [-s] {Suspend process}",
        "BOOL [-o] {Output to console}",
        "STRING <program>",
        "STRING [args]"
      ]
    }
  ]
}
source code