AxMenu type

AxScripts can also complement the AdaptixClient menu structure. The menu namespace allows you to create a menu structure with actions and separators.

AxItem

AxItem create_menu(string text) - Create a submenu item in the context menu. This item can contain a submenu, an action, or a separator.

AxItem create_separator() - Create a separator.

AxItem create_action(string text, handler(){}) - Creates an action that the handler will execute when this menu item is selected.

To add an AxItem object to any use the function.

void menu.add_MENU_TYPE(AxItem item, string[] agents, string[] os = [], string[] listeners = []);
  • item - AxItem object

  • agents - an array of strings containing the names of agents for which the menu item will be displayed. Available options are "beacon", "gopher", etc.

  • os - an array of strings with the names of the operating systems for which the menu item will be displayed. The following options are available: "windows", "linux", "macos". If an empty array [] is specified, the command group will be registered for all operating systems.

  • listeners - An array of strings with the names of registered listeners for which the menu item will be displayed. The following options are available: "BeaconHTTP", "BeaconSMB", etc. If an empty array [] is specified, the command group will be registered for all listeners.


Sessions Table and Graph menu

  • menu.add_session_main - Adds item to the context menu after the Access item.

  • menu.add_session_agent - Adds an item as a submenu to the Agent menu.

  • menu.add_session_browser - Adds an item as a submenu to the Browsers menu.

  • menu.add_session_access - Adds an item as a submenu to the Access menu.

For these context menu items, the action must have a handler in the following format.

  • ids - array of selected agent ids

Example

This code adds a Process Browser action to the Browser menu, which opens Process Browser for all selected sessions.


File Browser menu

  • menu.add_filebrowser - Adds item to the context menu

For these context menu items, the action must have a handler in the following format.

  • files - array of selected files

Example

This code adds a Download action to the File Browser context menu, which executes a command to download a file.


Process Browser menu

  • menu.add_processbrowser - Adds item to the context menu

For these context menu items, the action must have a handler in the following format.

  • processes - array of selected processes

Example

This code adds a "Steal Token" action to the Process Browser context menu that performs the token steal BOF.


Downloads Table menu

  • menu.add_downloads_running - Adds an item to the context menu if the file is in the download stage.

  • menu.add_downloads_finished - Adds an item to the context menu if the file is already downloaded.

For these context menu items, the action must have a handler in the following format.

  • files - array of selected downloads

Example

This code adds the actions Pause, Resume, Cancel and a separator to the context menu of the Downloads Table.


Task Manager menu

  • menu.add_tasks - Adds an item to the context menu for all tasks.

  • menu.add_tasks_job - Adds an item to the context menu if the task is of type JOB and is in the running state.

For these context menu items, the action must have a handler in the following format.

  • tasks - array of selected tasks

Example

This code adds the action Stop job to the context menu of the Tasks Manager.


Targets Manager menu

Adds an item to a specific position (top, center, bottom) in the context menu for all targets.

For these context menu items, the action must have a handler in the following format.

  • ids - list of selected targets ids

Example

This code adds the action Stop job to the context menu of the Tasks Manager.


Credentials Manager menu

Adds an item to the context menu for all creds.

For these context menu items, the action must have a handler in the following format.

  • ids - list of selected creds ids

Example

This code adds the action Stop job to the context menu of the Tasks Manager.


Last updated