Interactive Console & Execution

Image

Beyond automated workflows, UTMStack SOAR provides an Interactive Console for running commands on agents in real time, Automation Variables for storing reusable values, and an Execution Audit view for tracking all SOAR activity.

Interactive Console

The Interactive Console provides a live, WebSocket-based terminal to any connected UTMStack agent. Access it from the SOAR section at SOAR > Interactive Console.

How It Works

  1. The left sidebar displays all registered agents, searchable by hostname

  2. Select an agent to open a terminal session

  3. Type commands directly — they are sent to the agent and executed in real time

  4. Output streams back to the console as the command runs

The console supports the same shell environments as automated workflows:

  • Windows agents: CMD or PowerShell

  • Linux agents: Bash

  • macOS agents: Bash

Switching to a different agent terminates the current session. A confirmation dialog warns before disconnecting.

Use Cases

  • Ad-hoc investigation: Run forensic commands on a compromised endpoint without needing SSH/RDP access

  • Manual containment: Execute response commands immediately when automated workflows are not configured

  • Workflow testing: Test commands before adding them to an automated workflow

  • Troubleshooting: Verify agent connectivity and command execution

Automation Variables

Automation Variables are reusable key-value pairs that can be injected into SOAR workflow commands. They are managed at SOAR > Automation Variables.

Variable Types

TypeIconDescription
RegularCogStored in plain text. Visible in logs and command output.
SecretLockEncrypted at rest using AES. Decrypted only at the agent level. Values are masked with asterisks in logs and console output.

Using Variables in Commands

Variables are referenced in workflow commands using the $[variables.variableName] syntax:

curl -H "Authorization: Bearer $[variables.apiToken]" https://api.example.com/block/$[variables.firewallEndpoint]

At execution time, the variable placeholders are replaced with their actual values. Secret variables are decrypted only at the agent-manager level — the backend never sees the decrypted values.

Security Protections

The system prevents commands that would expose secret variable values by detecting output commands such as echo, printf, Write-Output, cat, type, console.log, print, and pipe operators. Commands containing these patterns with secret variables are rejected.

Managing Variables

FieldDescription
variableNameUnique name used in $[variables.name] references
variableValueThe stored value (encrypted for secrets)
variableDescriptionDescription of the variable's purpose
secretBoolean — whether the variable is encrypted

Execution Flow (How Commands Reach Agents)

Understanding the execution pipeline helps with troubleshooting and performance expectations.

sequenceDiagram
    participant Alert as Alert Engine
    participant Backend as UTMStack Backend
    participant AgentMgr as Agent Manager (gRPC)
    participant Agent as Endpoint Agent

    Alert->>Backend: New alert detected
    Backend->>Backend: Evaluate active rules against alert
    Backend->>Backend: Create PENDING execution record
    Note over Backend: Scheduled job runs every 5 minutes
    Backend->>AgentMgr: ProcessCommand (gRPC)
    AgentMgr->>AgentMgr: Decrypt secret variables
    AgentMgr->>Agent: Forward command via bidirectional stream
    Agent->>Agent: Execute command in specified shell
    Agent->>AgentMgr: Return result
    AgentMgr->>Backend: CommandResult
    Backend->>Backend: Update execution status (EXECUTED/ERROR)

Key Details

AspectDetail
Execution pollingPending executions are picked up every 5 minutes
Command timeoutCommands time out after 5 minutes at the agent level
Offline agent retriesUp to 5 retries before marking execution as FAILED
Communication protocolgRPC bidirectional streaming between backend and agent-manager
False positive exclusionAlerts tagged as "False positive" are automatically excluded from rule evaluation

Execution Statuses

StatusDescription
PENDINGExecution created, waiting to be picked up by the scheduler
RUNNINGCommand sent to agent, awaiting result
EXECUTEDCommand completed successfully
ERRORCommand failed or agent was unreachable after retries

Non-Execution Causes

When a workflow cannot execute, the system records the reason:

CauseDescription
AGENT_OFFLINEThe target agent is not connected (retried up to 5 times)
AGENT_NOT_FOUNDNo agent found matching the alert's data source
UNKNOWNAn unexpected error occurred

Execution Audit

The SOAR > Audit view provides a real-time table (refreshing every 30 seconds) of all SOAR command executions.

Audit Table Columns

ColumnDescription
HostnameAgent that executed the command
ReasonWhy the command was executed
CommandThe shell command that was run
Applied inOrigin type (Alert, Incident, User Execution, etc.)
Applied toClickable link to the related alert or incident
Executed atTimestamp of execution
Executed byUser or system that triggered the execution
ExecutionLink to view full command output

Filtering

The audit view supports filtering by:

  • Origin type: Alert, Incident, Incident Response, User Execution

  • Agent: Filter by specific agent hostname

Origin Types

OriginDescription
ALERTTriggered automatically by an alert matching a workflow rule
USER_EXECUTIONManually executed by a user via the Interactive Console
INCIDENTTriggered from an incident response action
INCIDENT_RESPONSETriggered from the incident response module
INCIDENT_RESPONSE_AUTOMATIONTriggered by an automated SOAR workflow

API Endpoints

Workflow Rules

MethodEndpointDescription
POST/api/utm-alert-response-rulesCreate a new workflow
PUT/api/utm-alert-response-rulesUpdate an existing workflow
GET/api/utm-alert-response-rulesList workflows (paginated, filterable)
GET/api/utm-alert-response-rules/{id}Get workflow by ID
GET/api/utm-alert-response-rules/resolve-filter-valuesGet available platforms and users

Action Templates

MethodEndpointDescription
GET/api/utm-alert-response-action-templatesList all action templates

Execution History

MethodEndpointDescription
GET/api/utm-alert-response-rule-executionsList rule execution history
GET/api/utm-alert-response-rule-historiesList rule change audit log

Automation Variables

MethodEndpointDescription
POST/api/utm-incident-variablesCreate a variable
PUT/api/utm-incident-variablesUpdate a variable
GET/api/utm-incident-variablesList all variables
DELETE/api/utm-incident-variables/{id}Delete a variable

Jobs (Command Execution)

MethodEndpointDescription
POST/api/utm-incident-jobsCreate a job (execute a command)
GET/api/utm-incident-jobsList jobs
GET/api/utm-incident-jobs/{id}Get job by ID
GET/api/utm-incident-jobs/countCount jobs
DELETE/api/utm-incident-jobs/{id}Delete a job