maestro-ioc-poll-ip

Retrieves an IP address IOC from the indicator queue of a Maestro playbook and returns it as a record. Use this command to obtain an IP address indicator for analysis within a playbook execution context.

Command properties

ItemDescription
Command typeDriver query
Required permissionUser
License usageNot counted toward license
Parallel executionNot supported
Distributed executionRuns on Data Node (mapper)

Syntax

maestro-ioc-poll-ip [limit=INT]

Options

limit=INT
Number of indicators to retrieve at once. Default is 1.

Output fields

FieldTypeDescription
ipstringIP address IOC value retrieved from the queue

Error codes

Parse errors
Error codeMessageDescription
user-not-founduser-not-foundRaised when the logged-in user for the query session cannot be found.
Runtime errors
Error codeMessageDescriptionPost-action
(none)company guid not foundRaised when the company GUID cannot be determined from the session.Query aborted
(none)no more ip indicator for playbook {playbookGuid}Raised when there are no pending IP address IOCs for the specified playbook.Query aborted

Description

During Maestro playbook execution, this command retrieves an indicator of type IP address from the indicator queue (IndicatorQueueService). The retrieved indicator is returned in the ip field. You can specify the number of items to retrieve at once using the limit option, but the current implementation returns one item at a time.

The playbook GUID is automatically looked up from the execution context (playbook_guid constant). If there are no pending indicators in the queue, a runtime error is raised and the query is aborted.

Usage examples

  1. Retrieve one IP address IOC from a playbook

    maestro-ioc-poll-ip
    

    Retrieves one IP address IOC from the indicator queue and returns it in the ip field.

  2. Retrieve an IP address IOC and compare it against a threat intelligence feed

    maestro-ioc-poll-ip
    | eval matched = matchfeed("threat_intel", ip)
    | search matched == true
    

    Compares the retrieved IP address IOC against a threat intelligence feed to check whether it is malicious.

  3. Retrieve an IP address IOC and update its reputation to malicious

    maestro-ioc-poll-ip
    | maestro-ioc-update-ip resource=$(ip) reputation=MALICIOUS risk=HIGH
    

    Updates the reputation of the retrieved IP address IOC to malicious.

Compatibility

The maestro-ioc-poll-ip command is available since before Sonar 4.0.

Related