Skip to content

Commercial Native Commands

Native commands available exclusively in the commercial payload. These extend the core agent with metadata controls, privilege management, runtime override capabilities, and shell access on Linux, BSD, and macOS.

Quick Reference

Command OS Summary
chmod Linux / BSD / macOS Change file or directory permissions
metadata-fields-disable Win / Linux / FreeBSD / macOS Disable selected optional metadata fields
metadata-fields-enable Win / Linux / FreeBSD / macOS Enable selected optional metadata fields
metadata-fields-report Win / Linux / FreeBSD / macOS Report supported and enabled metadata fields
override-list Windows List all loaded override DLLs
override-load Windows Load a DLL to override agent functionality
override-set Windows Apply a loaded DLL override
override-unload Windows Unload an override DLL
override-unset Windows Remove an active override
privilege-disable Windows Disable a token privilege
privilege-enable Windows Enable a token privilege
privilege-list Windows List all current token privileges
sh Linux / BSD / macOS Execute a shell command via sh

The DLL Override Functions reference lists the supported Windows hook names and their DLL export signatures.


chmod

OS Support: Linux, BSD, macOS

Purpose: Changes the access permissions of a file or directory on the target system.

Parameter Type Required Default Description
path string Yes - Path of the file or directory to modify.
access string Yes - Permission string in symbolic or octal notation (e.g. 755, u+rw, a=rwx, o-wx, +x).

Example:

chmod --path /tmp/agent --access +x


override-list

OS Support: Windows (commercial payload only)

Purpose: Lists loaded override DLLs, their exported methods, and the current function bindings.

Parameters: None

Example:

override-list

Info

Override DLLs are loaded with override-load and bound to supported functions with override-set.


override-load

OS Support: Windows (commercial payload only)

Purpose: Uploads a DLL into the agent's memory, making it available to override core agent functionality.

Parameter Type Required Default Description
name string Yes - A display label for this DLL. Later commands refer to the numeric ID returned by override-load.
@files.dll file Yes - The DLL file to load.

Example:

override-load --name myalloc --@files.dll custom_alloc.dll

Tip

Loading runs the DLL's initialization callbacks. Use override-list to see its ID and exported method names, then consult the DLL Override Functions reference before binding a method.


override-set

OS Support: Windows (commercial payload only)

Purpose: Activates an override by directing a specific agent functionality to a method in a previously loaded DLL.

Each functionality has one binding. Setting it again replaces the previous binding while leaving the previous DLL loaded. Unsetting it later does not restore an earlier binding; see binding and DLL lifecycle.

Parameter Type Required Default Description
functionality string Yes - A case-sensitive supported override function name.
dll int Yes - The numeric ID of the loaded DLL (as shown by override-list).
method string Yes - An exported method name in the DLL; its signature must match the selected function contract.

Example:

override-set --functionality AllocateSelf --dll 1 --method MyAllocateSelf

Warning

This example assumes DLL ID 1 exports MyAllocateSelf with the required signature. The agent checks the export name but cannot verify its signature; a mismatch can destabilize the process.


override-unload

OS Support: Windows (commercial payload only)

Purpose: Unloads one or all override DLLs from the agent's memory and removes their bindings.

Parameter Type Required Default Description
id int Yes - The numeric ID of the DLL to unload, as shown by override-list. Use 16777215 (0xFFFFFF) to unload all override DLLs.

An ID that is not loaded succeeds without changing anything. See OVERRIDE_REMOVE for the protocol representation.

Example:

override-unload --id 1

Warning

Unloading a DLL removes its bindings before releasing the image, but does not wait for callbacks already underway. override-list shows bindings, not active calls, and cannot establish that the DLL is no longer in use. See binding and DLL lifecycle.


override-unset

OS Support: Windows (commercial payload only)

Purpose: Removes a function binding so future calls use the built-in path.

The DLL remains loaded. Unsetting does not invoke callback cleanup, undo effects of earlier calls, or restore an older binding. A recognized function that is already unbound succeeds without changing anything.

Parameter Type Required Default Description
functionality string Yes - The functionality from which to remove the override.

Example:

override-unset --functionality AllocateSelf


privilege-disable

OS Support: Windows (commercial payload only)

Purpose: Disables one or more privileges in the agent's current process token.

Parameter Type Required Default Description
privilege string Yes - Name of the privilege to disable (e.g. SeDebugPrivilege), or * to disable all.

Example:

privilege-disable --privilege SeDebugPrivilege

Warning

Disabling privileges cannot always be reversed within the same process. Use privilege-list first to confirm the current state, and avoid disabling privileges that the agent needs for its own operations.


privilege-enable

OS Support: Windows (commercial payload only)

Purpose: Enables one or more privileges in the agent's current process token.

Parameter Type Required Default Description
privilege string Yes - Name of the privilege to enable (e.g. SeDebugPrivilege), or * to enable all available.

Example:

privilege-enable --privilege SeDebugPrivilege

Tip

Common privileges to enable before sensitive operations:

  • SeDebugPrivilege - required for token-steal from other users' processes
  • SeImpersonatePrivilege - required for token impersonation techniques
  • SeTakeOwnershipPrivilege - allows taking ownership of files and registry keys

privilege-list

OS Support: Windows (commercial payload only)

Purpose: Lists all privileges in the agent's current process token along with their enabled/disabled state.

Parameters: None

Example:

privilege-list


sh

OS Support: Linux, BSD, macOS

Purpose: Executes a command using the system's sh shell.

Parameter Type Required Default Description
command string No - The shell command to execute. May be omitted when supplying input through stdin.
stdin string[] No - Lines sent to stdin, simulating Enter presses between each.

Example:

sh --command "id && hostname && cat /etc/passwd | head -5"