ARIA Packet Intelligence

The ARIA Cybesecurity Solutions Software-Defined Security (SDS) platform integrates with Cortex XSOAR to add robustness when responding to incidents. The combination of ARIA hardware, in the form of a Secure Intelligent Adapter (SIA), and software, specifically Packet Intelligence and SDS orchestrator (SDSo), provides the elements required to react instantly when an incident is detected. When integrated with the ARIA solution, you can create playbooks that instruct one or more SIAs to add, modify, or delete rules automatically. These rule changes, which take effect immediately, can block conversations, redirect packets to a recorder or VLAN, or perform a variety of other actions.

Network Security · ARIAPacketIntelligence

Details

IDARIA Packet Intelligence
ProviderAriaNetworks
CategoryNetwork Security
From Version5.0.0
Docker Imagedemisto/python3:3.12.13.10116658
Supported ModulesAgentix XSIAM EDR Cortex Cloud Cloud Runtime Security

README

The ARIA Cybesecurity Solutions Software-Defined Security (SDS) platform integrates with Cortex XSOAR to add robustness when responding to incidents. The combination of ARIA hardware, in the form of a Secure Intelligent Adapter (SIA), and software, specifically Packet Intelligence and SDS orchestrator (SDSo), provides the elements required to react instantly when an incident is detected. When integrated with the ARIA solution, you can create playbooks that instruct one or more SIAs to add, modify, or delete rules automatically. These rule changes, which take effect immediately, can block conversations, redirect packets to a recorder or VLAN, or perform a variety of other actions.
This integration was integrated and tested with version 1.0.9 of ARIA Packet Intelligence

Configure ARIA Packet Intelligence in Cortex

Parameter Description Required
sdso SDSo Base URL (e.g. http://<IP address or FQDN of SDSo Node>:7443) True
proxy Use system proxy settings False
insecure Trust any certificate (not secure) False

Commands

You can execute these commands from the CLI, as part of an automation, or in a playbook.
After you successfully execute a command, a DBot message appears in the War Room with the command details.

Note that all commands support a remediation configuration string (RCS). It is a set of parameters that defines how and
where the rule will be deployed. This string consists of two sets containing comma-separated lists, with the dollar sign ($)
separating the sets. For details of the RCS, please refer to the Appendix at the end of this document and the ARIA SOAR Integration Guide for Cortex XSOAR.

aria-block-conversation


Creates a rule that drops all packets that match the specified 5-tuple values.

Base Command

aria-block-conversation

Input

Argument Name Description Required
src_ip The source IP address. Required
src_port The source port(s). This accepts a comma-separated list (e.g., “1, 3”), a range (e.g., “1-3”), or a combination (e.g., “1, 3-5”). Optional
target_ip The destination IP address. Required
target_port The destination port(s). This accepts a comma-separated list (e.g., “1, 3”), a range (e.g., “1-3”), or a combination (e.g., “1, 3-5”). Optional
protocol The protocol used for the packets (e.g., TCP). Optional
rule_name The name of the rule to create. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.BlockConversation.Rule string Specifies the name of the rule and the settings that define the rule.
Aria.BlockConversation.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.BlockConversation.Endpoints string Returns endpoints information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-block-conversation src_ip="192.168.10.23" src_port="389" target_ip="192.168.0.1" target_port="390" protocol="tcp" rule_name="convBlock" rcs="PIdevice@all"

Context Example

{
    "Aria": {
        "BlockConversation": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia12>.<sds_component_PacketIntelligence>.<sds_uuid_07023d45-d4a0-4204-949d-86ce009fd172>",
                    "IPAddress": "192.168.0.100",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "instance_number": "0",
                    "trid": "230e10c2-0dea-c12f-8929-092130038061"
                },
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "instance_number": "0",
                    "trid": "04972eb4-45b2-a877-12f2-4fcc7638f6c1"
                }
            ],
            "Rule": {
                "Definition": "192.168.0.1/32 @ 390 & 192.168.10.23/32 @ 389 <> TCP : DROP, END",
                "Name": "convBlock",
                "RCS": "PIdevice@all"
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688609
            }
        }
    }
}

Human Readable Output

aria-block-conversation

Rule Status Endpoints
Name: convBlock
Definition: 192.168.0.1/32 @ 390 & 192.168.10.23/32 @ 389 <> TCP : DROP, END
RCS: PIdevice@all
command_state: Success
timestamp: 1601688609
{‘FQN’: ‘...', 'IPAddress': '192.168.0.100', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '230e10c2-0dea-c12f-8929-092130038061', 'instance_number': '0', 'completion': True},
{'FQN': '...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '04972eb4-45b2-a877-12f2-4fcc7638f6c1', 'instance_number': '0', 'completion': True}

aria-unblock-conversation


Deletes a named rule from the 5-tuple logic block. This allows the previously blocked conversation to resume.

Base Command

aria-unblock-conversation

Input

Argument Name Description Required
rule_name The name of the rule to delete. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.UnblockConversation.Rule string Specifies the name of the rule and the settings that define the rule.
Aria.UnblockConversation.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.UnblockConversation.Endpoints string Returns endpoints information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-unblock-conversation rule_name="convBlock" rcs="PIdevice@all"

Context Example

{
    "Aria": {
        "UnblockConversation": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "trid": "09a47807-a7c1-2870-2f32-6cdcf0c908a4"
                },
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia12>.<sds_component_PacketIntelligence>.<sds_uuid_07023d45-d4a0-4204-949d-86ce009fd172>",
                    "IPAddress": "192.168.0.100",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "trid": "de1db8f5-4c79-c425-1f6d-ff6bec3b7214"
                }
            ],
            "Rule": {
                "Definition": "Remove convBlock",
                "Name": "convBlock",
                "RCS": "PIdevice@all"
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688613
            }
        }
    }
}

Human Readable Output

aria-unblock-conversation

Rule Status Endpoints
Name: convBlock
Definition: Remove convBlock
RCS: PIdevice@all
command_state: Success
timestamp: 1601688613
{‘FQN’: ‘...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '09a47807-a7c1-2870-2f32-6cdcf0c908a4', 'completion': True},
{'FQN': '...', 'IPAddress': '192.168.0.100', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': 'de1db8f5-4c79-c425-1f6d-ff6bec3b7214', 'completion': True}

aria-record-conversation


Creates a rule that redirects a conversation that matches 5-tuple values to the Packet Recorder. Packets are tagged with the VID specified in the instance.

Base Command

aria-record-conversation

Input

Argument Name Description Required
src_ip The source IP address. Required
src_port The source port(s). This accepts a comma-separated list (e.g., “1, 3”), a range (e.g., “1-3”), or a combination (e.g., “1, 3-5”). Optional
target_ip The destination IP address. Required
target_port The destination port(s). This accepts a comma-separated list (e.g., “1, 3”), a range (e.g., “1-3”), or a combination (e.g., “1, 3-5”). Optional
protocol The protocol used for the packets (e.g., TCP) . Optional
vlan_id The VLAN ID that your network switch uses to forward packets to the Packet Recorder. Required
rule_name The name of the rule to create. Required
sia_interface The letter of the interface on the SIA used for forwarding packets. Can be A or B. If omitted, interface A is used. Optional
transport_type The type of notification to generate. Can be email or syslog. Optional
tti_index The index of the entry in the transport type table. Optional
aio_index The index of the entry in the alert information object table. Optional
trigger_type The frequency of the alert. one-shot: The alert is triggered when the number of packets matching the criteria reaches the threshold specified in the trigger_value field. After the alert triggers, it is disabled until the flow expires or times out. re-trigger-count: The alert is triggered when the number of packets that match the criteria reaches the threshold specified in the trigger_value field. The counter then resets to 0, and the alert is triggered again the next time the threshold is met. re-trigger-timed-ms: The alert is triggered, and then the application waits the amount of time (in msecs) defined in the trigger_value field. Once this time passes, the alert is triggered again. re-trigger-timed-sec: The alert is triggered, and then the application waits the amount of time (in seconds) defined in the trigger_value field. After this time passes, the alert is triggered again. Optional
trigger_value The threshold that must be met before the alert is triggered. The value entered here depends on the trigger_type. If the trigger_type is one-shot or retrigger-count, this is the total number of packets that must be received before the alert is triggered. The valid range is 1-8191. If the trigger_type is re-trigger-ms or re-triggersec, this is the total amount of time (in msecs or secs), respectively, that must elapse before the alert is triggered again. The valid range is 1-8191. Optional
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.RecordConversation.Rule string Specifies the name of the rule and the settings that define the rule.
Aria.RecordConversation.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.RecordConversation.Endpoints string Returns endpoints information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-record-conversation src_ip="192.168.10.23" src_port="389" target_ip="192.168.0.1" target_port="390" protocol="tcp" rule_name="convRecord" vlan_id="1234" transport_type="email" tti_index="2" aio_index="4" trigger_type="one-shot" trigger_value="1" rcs="PIdevice@all"

Context Example

{
    "Aria": {
        "RecordConversation": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "instance_number": "0",
                    "trid": "0fbc758b-ab0d-95f4-9955-56c96089fa98"
                },
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia12>.<sds_component_PacketIntelligence>.<sds_uuid_07023d45-d4a0-4204-949d-86ce009fd172>",
                    "IPAddress": "192.168.0.100",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "instance_number": "0",
                    "trid": "ab63e403-4f3a-1f3c-6005-c01d249eb185"
                }
            ],
            "Rule": {
                "Definition": "192.168.0.1/32 @ 390 & 192.168.10.23/32 @ 389 <> TCP : REDIRECT-VLAN A 1234, ALERT email 2 4 one-shot 1, END",
                "Name": "convRecord",
                "RCS": "PIdevice@all"
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688621
            }
        }
    }
}

Human Readable Output

aria-record-conversation

Rule Status Endpoints
Name: convRecord
Definition: 192.168.0.1/32 @ 390 & 192.168.10.23/32 @ 389 <> TCP : REDIRECT-VLAN A 1234, ALERT email 2 4 one-shot 1, END
RCS: PIdevice@all
command_state: Success
timestamp: 1601688621
{‘FQN’: ‘...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '0fbc758b-ab0d-95f4-9955-56c96089fa98', 'instance_number': '0', 'completion': True},
{'FQN': '...', 'IPAddress': '192.168.0.100', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': 'ab63e403-4f3a-1f3c-6005-c01d249eb185', 'instance_number': '0', 'completion': True}

aria-stop-recording-conversation


Removes the named rule from the 5-tuple block. This stops redirecting traffic to the Packet Recorder.

Base Command

aria-stop-recording-conversation

Input

Argument Name Description Required
rule_name The name of the rule to delete. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.StopRecordingConversation.Rule string Specifies the name of the rule and the settings that define the rule.
Aria.StopRecordingConversation.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.StopRecordingConversation.Endpoints string Returns endpoints information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-stop-recording-conversation rule_name="convRecord" rcs="PIdevice@all"

Context Example

{
    "Aria": {
        "StopRecordingConversation": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "trid": "2d4d8363-176b-2dc7-b9a2-2815d78c186b"
                },
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia12>.<sds_component_PacketIntelligence>.<sds_uuid_07023d45-d4a0-4204-949d-86ce009fd172>",
                    "IPAddress": "192.168.0.100",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "trid": "423e0e00-6eff-b471-385e-040ea4c89455"
                }
            ],
            "Rule": {
                "Definition": "Remove convRecord",
                "Name": "convRecord",
                "RCS": "PIdevice@all"
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688630
            }
        }
    }
}

Human Readable Output

aria-stop-recording-conversation

Rule Status Endpoints
Name: convRecord
Definition: Remove convRecord
RCS: PIdevice@all
command_state: Success
timestamp: 1601688630
{‘FQN’: ‘...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '2d4d8363-176b-2dc7-b9a2-2815d78c186b', 'completion': True},
{'FQN': '...', 'IPAddress': '192.168.0.100', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '423e0e00-6eff-b471-385e-040ea4c89455', 'completion': True}

aria-alert-conversation


Adds a rule that generates an alert when a conversation that matches the specified 5-tuple values is detected.

Base Command

aria-alert-conversation

Input

Argument Name Description Required
src_ip The source IP address. Required
src_port The source port(s). This accepts a comma-separated list (e.g., “1, 3”), a range (e.g., “1-3”), or a combination (e.g., “1, 3-5”). Optional
target_ip The destination IP address. Required
target_port The destination port(s). This accepts a comma-separated list (e.g., “1, 3”), a range (e.g., “1-3”), or a combination (e.g., “1, 3-5”). Optional
protocol The protocol used for the packets (e.g., TCP) . Optional
rule_name The name of the rule to create. Required
transport_type The type of notification to generate. Required
tti_index The index of the entry in the transport type table. Required
aio_index The index of the entry in the alert information object table. Required
trigger_type The frequency of the alert. one-shot: The alert is triggered when the number of packets matching the criteria reaches the threshold specified in the trigger_value field. After the alert triggers, it is disabled until the flow expires or times out. re-trigger-count: The alert is triggered when the number of packets that match the criteria reaches the threshold specified in the trigger_value field. The counter then resets to 0, and the alert is triggered again the next time the threshold is met. re-trigger-timed-ms: The alert is triggered, and then the application waits the amount of time (in msecs) defined in the trigger_value field. Once this time passes, the alert is triggered again. re-trigger-timed-sec: The alert is triggered, and then the application waits the amount of time (in seconds) defined in the trigger_value field. After this time passes, the alert is triggered again. Required
trigger_value The threshold that must be met before the alert is triggered. The value entered here depends on the trigger_type. If the trigger_type is one-shot or retrigger-count, this is the total number of packets that must be received before the alert is triggered. The valid range is 1-8191. If the trigger_type is re-trigger-ms or re-triggersec, this is the total number of msecs or secs, respectively, that must elapse before the alert is triggered again. The valid range is 1-8191. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.AlertConversation.Rule string Specifies the name of the rule and the settings that define the rule.
Aria.AlertConversation.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.AlertConversation.Endpoints string Returns endpoints information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-alert-conversation src_ip="192.168.10.23" src_port="389" target_ip="192.168.0.1" target_port="390" protocol="tcp" rule_name="convAlert" transport_type="email" tti_index="2" aio_index="4" trigger_type="re-trigger-count" trigger_value="1000"

Context Example

{
    "Aria": {
        "AlertConversation": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "instance_number": "0",
                    "trid": "92573cdb-9e81-b408-1417-6668cddae433"
                },
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia12>.<sds_component_PacketIntelligence>.<sds_uuid_07023d45-d4a0-4204-949d-86ce009fd172>",
                    "IPAddress": "192.168.0.100",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "instance_number": "0",
                    "trid": "48808901-91b2-5284-d1a3-39cb5fcb1add"
                }
            ],
            "Rule": {
                "Definition": "192.168.0.1/32 @ 390 & 192.168.10.23/32 @ 389 <> TCP : ALERT email 2 4 re-trigger-count 1000, END",
                "Name": "convAlert",
                "RCS": null
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688638
            }
        }
    }
}

Human Readable Output

aria-alert-conversation

Rule Status Endpoints
Name: convAlert
Definition: 192.168.0.1/32 @ 390 & 192.168.10.23/32 @ 389 <> TCP : ALERT email 2 4 re-trigger-count 1000, END
RCS: null
command_state: Success
timestamp: 1601688638
{‘FQN’: ‘...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '92573cdb-9e81-b408-1417-6668cddae433', 'instance_number': '0', 'completion': True},
{'FQN': '...', 'IPAddress': '192.168.0.100', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '48808901-91b2-5284-d1a3-39cb5fcb1add', 'instance_number': '0', 'completion': True}

aria-mute-alert-conversation


Removes a named rule from the 5-tuple logic block, disabling the alerts.

Base Command

aria-mute-alert-conversation

Input

Argument Name Description Required
rule_name The name of the rule to delete. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.MuteAlertConversation.Rule string The name of the rule and the settings that define the rule.
Aria.MuteAlertConversation.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.MuteAlertConversation.Endpoints string Returns endpoints information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-mute-alert-conversation rule_name="convAlert"

Context Example

{
    "Aria": {
        "MuteAlertConversation": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia12>.<sds_component_PacketIntelligence>.<sds_uuid_07023d45-d4a0-4204-949d-86ce009fd172>",
                    "IPAddress": "192.168.0.100",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "trid": "6fd436e6-1b5c-9e6d-7e93-a76c4da30be5"
                },
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "trid": "5d379b52-7100-3238-7d63-e2e77613ead3"
                }
            ],
            "Rule": {
                "Definition": "Remove convAlert",
                "Name": "convAlert",
                "RCS": null
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688644
            }
        }
    }
}

Human Readable Output

aria-mute-alert-conversation

Rule Status Endpoints
Name: convAlert
Definition: Remove convAlert
RCS: null
command_state: Success
timestamp: 1601688644
{‘FQN’: ‘...', 'IPAddress': '192.168.0.100', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '6fd436e6-1b5c-9e6d-7e93-a76c4da30be5', 'completion': True},
{'FQN': '...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '5d379b52-7100-3238-7d63-e2e77613ead3', 'completion': True}

aria-block-dest-port


Creates a rule that blocks packets destined for one or more specified ports.

Base Command

aria-block-dest-port

Input

Argument Name Description Required
port_range The destination port(s) to block. This accepts a comma-separated list (e.g., “1, 3”), a range (e.g., “1-3”), or a combination (e.g., “1, 3-5”). Required
rule_name The name of the rule to create. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.BlockDestPort.Rule string The name of the rule and the settings that define the rule.
Aria.BlockDestPort.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.BlockDestPort.Endpoints string Returns endpoints information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-block-dest-port port_range="389, 400-404" rule_name="destPortBlock"

Context Example

{
    "Aria": {
        "BlockDestPort": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia12>.<sds_component_PacketIntelligence>.<sds_uuid_07023d45-d4a0-4204-949d-86ce009fd172>",
                    "IPAddress": "192.168.0.100",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "instance_number": "0",
                    "trid": "acfb02ca-5c8c-82d6-dedf-4ba0dfc23244"
                },
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "instance_number": "0",
                    "trid": "7d46ce85-88ab-0802-2d84-8019fcbd4635"
                }
            ],
            "Rule": {
                "Definition": "389, 400 - 404: DROP, END",
                "Name": "destPortBlock",
                "RCS": null
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688652
            }
        }
    }
}

Human Readable Output

aria-block-dest-port

Rule Status Endpoints
Name: destPortBlock
Definition: 389, 400 - 404: DROP, END
RCS: null
command_state: Success
timestamp: 1601688652
{‘FQN’: ‘...', 'IPAddress': '192.168.0.100', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': 'acfb02ca-5c8c-82d6-dedf-4ba0dfc23244', 'instance_number': '0', 'completion': True},
{'FQN': '...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '7d46ce85-88ab-0802-2d84-8019fcbd4635', 'instance_number': '0', 'completion': True}

aria-unblock-dest-port


Removes a named rule from the destination port logic block. This allows the previously blocked traffic to resume.

Base Command

aria-unblock-dest-port

Input

Argument Name Description Required
rule_name The name of the rule to delete. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.UnblockDestPort.Rule string The name of the rule and the settings that define the rule.
Aria.UnblockDestPort.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.UnblockDestPort.Endpoints string Returns endpoints information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-unblock-dest-port rule_name="destPortBlock"

Context Example

{
    "Aria": {
        "UnblockDestPort": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia12>.<sds_component_PacketIntelligence>.<sds_uuid_07023d45-d4a0-4204-949d-86ce009fd172>",
                    "IPAddress": "192.168.0.100",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "trid": "75355cd0-d6c9-27ae-cd9d-440a124d45bf"
                },
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "trid": "57d55eb9-e48b-3925-aaa0-cc1134182aab"
                }
            ],
            "Rule": {
                "Definition": "Remove destPortBlock",
                "Name": "destPortBlock",
                "RCS": null
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688659
            }
        }
    }
}

Human Readable Output

aria-unblock-dest-port

Rule Status Endpoints
Name: destPortBlock
Definition: Remove destPortBlock
RCS: null
command_state: Success
timestamp: 1601688659
{‘FQN’: ‘...', 'IPAddress': '192.168.0.100', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '75355cd0-d6c9-27ae-cd9d-440a124d45bf', 'completion': True},
{'FQN': '...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '57d55eb9-e48b-3925-aaa0-cc1134182aab', 'completion': True}

aria-record-dest-port


Adds a rule that redirects traffic that is destined for one or more ports to the Packet Recorder. Packets are tagged with the VID specified in the instance.

Base Command

aria-record-dest-port

Input

Argument Name Description Required
port_range The destination port(s). This accepts a comma-separated list (e.g., “1, 3”), a range (e.g., “1-3”), or a combination (e.g., “1, 3-5”). Required
vlan_id The VLAN ID that your network switch uses to forward packets to the Packet Recorder. Required
rule_name The name of the rule to create. Required
sia_interface The letter of the interface on the SIA used for forwarding packets. Can be A or B. If omitted, interface A is used. Optional
transport_type The type of notification to generate. Can be email or syslog. Optional
tti_index The index of the entry in the transport type table. Optional
aio_index The index of the entry in the alert information object table. Optional
trigger_type The frequency of the alert. one-shot: The alert is triggered when the number of packets matching the criteria reaches the threshold specified in the trigger_value field. After the alert triggers, it is disabled until the flow expires or times out. re-trigger-count: The alert is triggered when the number of packets that match the criteria reaches the threshold specified in the trigger_value field. The counter then resets to 0, and the alert is triggered again the next time the threshold is met. re-trigger-timed-ms: The alert is triggered, and then the application waits the amount of time (in msecs) defined in the trigger_value field. Once this time passes, the alert is triggered again. re-trigger-timed-sec: The alert is triggered, and then the application waits the amount of time (in seconds) defined in the trigger_value field. After this time passes, the alert is triggered again. Optional
trigger_value The threshold that must be met before the alert is triggered. The value entered here depends on the trigger_type. If the trigger_type is one-shot or retrigger-count, this is the total number of packets that must be received before the alert is triggered. The valid range is 1-8191, If the trigger_type is re-trigger-ms or re-triggersec, this is the total number of msecs or secs, respectively, that must elapse before the alert is triggered again. The valid range is 1-8191. Optional
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.RecordDestPort.Rule string Specifies the name of the rule and the settings that define the rule.
Aria.RecordDestPort.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.RecordDestPort.Endpoints string Returns endpoints information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-record-dest-port port_range="390, 420, 421" rule_name="destPortRecord" vlan_id="1234" transport_type="email" tti_index="2" aio_index="4" trigger_type="one-shot" trigger_value="1"rcs="PIdevice@sia12"

Context Example

{
    "Aria": {
        "RecordDestPort": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia12>.<sds_component_PacketIntelligence>.<sds_uuid_07023d45-d4a0-4204-949d-86ce009fd172>",
                    "IPAddress": "192.168.0.100",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "instance_number": "0",
                    "trid": "c09ea941-6c65-ccde-7048-6150ba936d2b"
                }
            ],
            "Rule": {
                "Definition": "390, 420, 421: REDIRECT-VLAN A 1234, ALERT email 2 4 one-shot 1, END",
                "Name": "destPortRecord",
                "RCS": "PIdevice@sia12"
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688666
            }
        }
    }
}

Human Readable Output

aria-record-dest-port

Rule Status Endpoints
Name: destPortRecord
Definition: 390, 420, 421: REDIRECT-VLAN A 1234, ALERT email 2 4 one-shot 1, END
RCS: PIdevice@sia12
command_state: Success
timestamp: 1601688666
{‘FQN’: ‘...', 'IPAddress': '192.168.0.100', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': 'c09ea941-6c65-ccde-7048-6150ba936d2b', 'instance_number': '0', 'completion': True}

aria-stop-recording-dest-port


Removes a named rule from the destination port logic block. This stops redirecting traffic to the Packet Recorder.

Base Command

aria-stop-recording-dest-port

Input

Argument Name Description Required
rule_name The name of the rule to delete. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.StopRecordingDestPort.Rule string Specifies the name of the rule and the settings that define the rule.
Aria.StopRecordingDestPort.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.StopRecordingDestPort.Endpoints string Endpoint information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-stop-recording-dest-port rule_name="destPortRecord" rcs="PIdevice@sia12"

Context Example

{
    "Aria": {
        "StopRecordingDestPort": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia12>.<sds_component_PacketIntelligence>.<sds_uuid_07023d45-d4a0-4204-949d-86ce009fd172>",
                    "IPAddress": "192.168.0.100",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "trid": "0fcc428c-5aa9-de08-c41c-4ed82d63ae5d"
                }
            ],
            "Rule": {
                "Definition": "Remove destPortRecord",
                "Name": "destPortRecord",
                "RCS": "PIdevice@sia12"
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688671
            }
        }
    }
}

Human Readable Output

aria-stop-recording-dest-port

Rule Status Endpoints
Name: destPortRecord
Definition: Remove destPortRecord
RCS: PIdevice@sia12
command_state: Success
timestamp: 1601688671
{‘FQN’: ‘...', 'IPAddress': '192.168.0.100', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '0fcc428c-5aa9-de08-c41c-4ed82d63ae5d', 'completion': True}

aria-alert-dest-port


Creates a rule that generates an alert when traffic destined for one or more ports is detected.

Base Command

aria-alert-dest-port

Input

Argument Name Description Required
port_range The destination port(s). This accepts a comma-separated list (e.g., “1, 3”), a range (e.g., “1-3”), or a combination (e.g., “1, 3-5”). Required
rule_name The name of the rule to create. Required
transport_type The type of notification to generate. Required
tti_index The index of the entry in the transport type table. Required
aio_index The index of the entry in the alert information object table. Required
trigger_type The frequency of the alert. one-shot: The alert is triggered when the number of packets matching the criteria reaches the threshold specified in the trigger_value field. After the alert triggers, it is disabled until the flow expires or times out. re-trigger-count: The alert is triggered when the number of packets that match the criteria reaches the threshold specified in the trigger_value field. The counter then resets to 0, and the alert is triggered again the next time the threshold is met. re-trigger-timed-ms: The alert is triggered, and then the application waits the amount of time (in msecs) defined in the trigger_value field. Once this time passes, the alert is triggered again. re-trigger-timed-sec: The alert is triggered, and then the application waits the amount of time (in seconds) defined in the trigger_value field. After this time passes, the alert is triggered again. Required
trigger_value The threshold that must be met before the alert is triggered. The value entered here depends on the trigger_type. If the trigger_type is one-shot or retrigger-count, this is the total number of packets that must be received before the alert is triggered. The valid range is 1-8191, If the trigger_type is re-trigger-ms or re-triggersec, this is the total number of msecs or secs, respectively, that must elapse before the alert is triggered again. The valid range is 1-8191. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.AlertDestPort.Rule string The name of the rule and the settings that define the rule.
Aria.AlertDestPort.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.AlertDestPort.Endpoints string Endpoint information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-alert-dest-port port_range="389-400" rule_name="destPortAlert" transport_type="syslog" tti_index="2" aio_index="4" trigger_type="re-trigger-timed-sec" trigger_value="200" rcs="PIdevice@sia12"

Context Example

{
    "Aria": {
        "AlertDestPort": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia12>.<sds_component_PacketIntelligence>.<sds_uuid_07023d45-d4a0-4204-949d-86ce009fd172>",
                    "IPAddress": "192.168.0.100",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "instance_number": "0",
                    "trid": "62dcb6da-b233-b0af-46df-e940087fe267"
                }
            ],
            "Rule": {
                "Definition": "389 - 400: ALERT syslog 2 4 re-trigger-timed-sec 200, END",
                "Name": "destPortAlert",
                "RCS": "PIdevice@sia12"
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688680
            }
        }
    }
}

Human Readable Output

aria-alert-dest-port

Rule Status Endpoints
Name: destPortAlert
Definition: 389 - 400: ALERT syslog 2 4 re-trigger-timed-sec 200, END
RCS: PIdevice@sia12
command_state: Success
timestamp: 1601688680
{‘FQN’: ‘...', 'IPAddress': '192.168.0.100', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '62dcb6da-b233-b0af-46df-e940087fe267', 'instance_number': '0', 'completion': True}

aria-mute-alert-dest-port


Removes a named rule from the destination port logic block, disabling the alerts.

Base Command

aria-mute-alert-dest-port

Input

Argument Name Description Required
rule_name The name of the rule to delete. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.MuteAlertDestPort.Rule string Specifies the name of the rule and the settings that define the rule.
Aria.MuteAlertDestPort.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.MuteAlertDestPort.Endpoints string Endpoint information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-mute-alert-dest-port rule_name="destPortAlert" rcs="PIdevice@sia12"

Context Example

{
    "Aria": {
        "MuteAlertDestPort": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia12>.<sds_component_PacketIntelligence>.<sds_uuid_07023d45-d4a0-4204-949d-86ce009fd172>",
                    "IPAddress": "192.168.0.100",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "trid": "b79b2d3c-af73-e7d5-eaaf-d8e080c03cfd"
                }
            ],
            "Rule": {
                "Definition": "Remove destPortAlert",
                "Name": "destPortAlert",
                "RCS": "PIdevice@sia12"
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688687
            }
        }
    }
}

Human Readable Output

aria-mute-alert-dest-port

Rule Status Endpoints
Name: destPortAlert
Definition: Remove destPortAlert
RCS: PIdevice@sia12
command_state: Success
timestamp: 1601688687
{‘FQN’: ‘...', 'IPAddress': '192.168.0.100', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': 'b79b2d3c-af73-e7d5-eaaf-d8e080c03cfd', 'completion': True}

aria-block-src-port


Adds a rule that blocks packets originating from one or more specific ports.

Base Command

aria-block-src-port

Input

Argument Name Description Required
port_range The source port(s). This accepts a comma-separated list (e.g., “1, 3”), a range (e.g., “1-3”), or a combination (e.g., “1, 3-5”). Required
rule_name The name of the rule to create. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.BlockSrcPort.Rule string Specifies the name of the rule and the settings that define the rule.
Aria.BlockSrcPort.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.BlockSrcPort.Endpoints string Endpoint information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-block-src-port port_range="389, 400-404" rule_name="srcPortBlock" rcs="PIdevice@all.all.sia32"

Context Example

{
    "Aria": {
        "BlockSrcPort": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "instance_number": "0",
                    "trid": "b4b8e8e2-39f8-7af7-beca-f256f7d4eb93"
                }
            ],
            "Rule": {
                "Definition": "389, 400 - 404: DROP, END",
                "Name": "srcPortBlock",
                "RCS": "PIdevice@all.all.sia32"
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688693
            }
        }
    }
}

Human Readable Output

aria-block-src-port

Rule Status Endpoints
Name: srcPortBlock
Definition: 389, 400 - 404: DROP, END
RCS: PIdevice@all.all.sia32
command_state: Success
timestamp: 1601688693
{‘FQN’: ‘...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': 'b4b8e8e2-39f8-7af7-beca-f256f7d4eb93', 'instance_number': '0', 'completion': True}

aria-unblock-src-port


Removes a named rule from the source port logic block. This allows the previously blocked traffic to resume.

Base Command

aria-unblock-src-port

Input

Argument Name Description Required
rule_name The name of the rule to delete. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.UnblockSrcPort.Rule string The name of the rule and the settings that define the rule.
Aria.UnblockSrcPort.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.UnblockSrcPort.Endpoints string Endpoint information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-unblock-src-port rule_name="srcPortBlock" rcs="PIdevice@all.all.sia32"

Context Example

{
    "Aria": {
        "UnblockSrcPort": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "trid": "7e389793-bc05-0b45-8a95-f0d7e9fa1da8"
                }
            ],
            "Rule": {
                "Definition": "Remove srcPortBlock",
                "Name": "srcPortBlock",
                "RCS": "PIdevice@all.all.sia32"
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688699
            }
        }
    }
}

Human Readable Output

aria-unblock-src-port

Rule Status Endpoints
Name: srcPortBlock
Definition: Remove srcPortBlock
RCS: PIdevice@all.all.sia32
command_state: Success
timestamp: 1601688699
{‘FQN’: ‘...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '7e389793-bc05-0b45-8a95-f0d7e9fa1da8', 'completion': True}

aria-record-src-port


Adds a rule that redirects traffic originating from one or more ports to the Packet Recorder. Packets are tagged with the VID specified in the instance.

Base Command

aria-record-src-port

Input

Argument Name Description Required
port_range The source port(s). This accepts a comma-separated list (e.g., “1, 3”), a range (e.g., “1-3”), or a combination (e.g., “1, 3-5”). Required
vlan_id The VLAN ID your network switch uses to forward packets to the Packet Recorder. Required
rule_name The name of the rule to create. Required
sia_interface The letter of the interface on the SIA used for forwarding packets. Can be A or B. If omitted, interface A is used. Optional
transport_type The type of notification to generate. Can be email or syslog. Optional
tti_index The index of the entry in the transport type table. Optional
aio_index The index of the entry in the alert information object table. Optional
trigger_type The frequency of the alert. one-shot: The alert is triggered when the number of packets matching the criteria reaches the threshold specified in the trigger_value field. After the alert triggers, it is disabled until the flow expires or times out. re-trigger-count: The alert is triggered when the number of packets that match the criteria reaches the threshold specified in the trigger_value field. The counter then resets to 0, and the alert is triggered again the next time the threshold is met. re-trigger-timed-ms: The alert is triggered, and then the application waits the amount of time (in msecs) defined in the trigger_value field. Once this time passes, the alert is triggered again. re-trigger-timed-sec: The alert is triggered, and then the application waits the amount of time (in seconds) defined in the trigger_value field. After this time passes, the alert is triggered again. Optional
trigger_value The threshold that must be met before the alert is triggered. The value entered here depends on the trigger_type. If the trigger_type is one-shot or retrigger-count, this is the total number of packets that must be received before the alert is triggered. The valid range is 1-8191, If the trigger_type is re-trigger-ms or re-triggersec, this is the total number of msecs or secs, respectively, that must elapse before the alert is triggered again. The valid range is 1-8191. Optional
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.RecordSrcPort.Rule string The name of the rule and the settings that define the rule.
Aria.RecordSrcPort.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.RecordSrcPort.Endpoints string Endpoint information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-record-src-port port_range="390, 420" rule_name="srcPortRecord" sia_interface="B" vlan_id="1234" transport_type="email" tti_index="2" aio_index="4" trigger_type="one-shot" trigger_value="1" rcs="PIdevice@all.all.sia32"

Context Example

{
    "Aria": {
        "RecordSrcPort": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "instance_number": "0",
                    "trid": "2684d0ed-c355-fdb9-85ae-3d6464108ff2"
                }
            ],
            "Rule": {
                "Definition": "390, 420: REDIRECT-VLAN B 1234, ALERT email 2 4 one-shot 1, END",
                "Name": "srcPortRecord",
                "RCS": "PIdevice@all.all.sia32"
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688706
            }
        }
    }
}

Human Readable Output

aria-record-src-port

Rule Status Endpoints
Name: srcPortRecord
Definition: 390, 420: REDIRECT-VLAN B 1234, ALERT email 2 4 one-shot 1, END
RCS: PIdevice@all.all.sia32
command_state: Success
timestamp: 1601688706
{‘FQN’: ‘...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '2684d0ed-c355-fdb9-85ae-3d6464108ff2', 'instance_number': '0', 'completion': True}

aria-stop-recording-src-port


Removes a named rule from the source port logic block. This stops redirecting traffic to the Packet Recorder.

Base Command

aria-stop-recording-src-port

Input

Argument Name Description Required
rule_name The name of the rule to delete. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.StopRecordingSrcPort.Rule string The name of the rule and the settings that define the rule.
Aria.StopRecordingSrcPort.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.StopRecordingSrcPort.Endpoints string Endpoint information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-stop-recording-src-port rule_name="srcPortRecord" rcs="PIdevice@all.all.sia32"

Context Example

{
    "Aria": {
        "StopRecordingSrcPort": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "trid": "68464a28-1502-7421-9ac0-e4f9672a2a33"
                }
            ],
            "Rule": {
                "Definition": "Remove srcPortRecord",
                "Name": "srcPortRecord",
                "RCS": "PIdevice@all.all.sia32"
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688712
            }
        }
    }
}

Human Readable Output

aria-stop-recording-src-port

Rule Status Endpoints
Name: srcPortRecord
Definition: Remove srcPortRecord
RCS: PIdevice@all.all.sia32
command_state: Success
timestamp: 1601688712
{‘FQN’: ‘...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '68464a28-1502-7421-9ac0-e4f9672a2a33', 'completion': True}

aria-alert-src-port


Creates a rule that generates an alert when traffic originating from one or more ports is detected.

Base Command

aria-alert-src-port

Input

Argument Name Description Required
port_range The source port(s). This accepts a comma-separated list (e.g., “1, 3”), a range (e.g., “1-3”), or a combination (e.g., “1, 3-5”). Required
rule_name The name of the rule to create. Required
transport_type The type of notification to generate. Can be email or syslog Required
tti_index The index of the entry in the transport type table. Required
aio_index The index of the entry in the alert information object table. Required
trigger_type The frequency of the alert. one-shot: The alert is triggered when the number of packets matching the criteria reaches the threshold specified in the trigger_value field. After the alert triggers, it is disabled until the flow expires or times out. re-trigger-count: The alert is triggered when the number of packets that match the criteria reaches the threshold specified in the trigger_value field. The counter then resets to 0, and the alert is triggered again the next time the threshold is met. re-trigger-timed-ms: The alert is triggered, and then the application waits the amount of time (in msecs) defined in the trigger_value field. Once this time passes, the alert is triggered again. re-trigger-timed-sec: The alert is triggered, and then the application waits the amount of time (in seconds) defined in the trigger_value field. After this time passes, the alert is triggered again. Required
trigger_value The threshold that must be met before the alert is triggered. The value entered here depends on the trigger_type. If the trigger_type is one-shot or retrigger-count, this is the total number of packets that must be received before the alert is triggered. The valid range is 1-8191, If the trigger_type is re-trigger-ms or re-triggersec, this is the total number of msecs or secs, respectively, that must elapse before the alert is triggered again. The valid range is 1-8191. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.AlertSrcPort.Rule string The name of the rule and the settings that define the rule.
Aria.AlertSrcPort.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.AlertSrcPort.Endpoints string Endpoint information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-alert-src-port port_range="389-400" rule_name="srcPortAlert" transport_type="syslog" tti_index="2" aio_index="4" trigger_type="re-trigger-timed-sec" trigger_value="200" rcs="PIdevice@sia12,sia32"

Context Example

{
    "Aria": {
        "AlertSrcPort": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia12>.<sds_component_PacketIntelligence>.<sds_uuid_07023d45-d4a0-4204-949d-86ce009fd172>",
                    "IPAddress": "192.168.0.100",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "instance_number": "0",
                    "trid": "dcd87781-f63f-cf2e-24ca-e6623467fbe4"
                },
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "instance_number": "0",
                    "trid": "6f085ea9-385d-78f9-2a43-50b80fd5e656"
                }
            ],
            "Rule": {
                "Definition": "389 - 400: ALERT syslog 2 4 re-trigger-timed-sec 200, END",
                "Name": "srcPortAlert",
                "RCS": "PIdevice@sia12,sia32"
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688721
            }
        }
    }
}

Human Readable Output

aria-alert-src-port

Rule Status Endpoints
Name: srcPortAlert
Definition: 389 - 400: ALERT syslog 2 4 re-trigger-timed-sec 200, END
RCS: PIdevice@sia12,sia32
command_state: Success
timestamp: 1601688721
{‘FQN’: ‘...', 'IPAddress': '192.168.0.100', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': 'dcd87781-f63f-cf2e-24ca-e6623467fbe4', 'instance_number': '0', 'completion': True},
{'FQN': '...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '6f085ea9-385d-78f9-2a43-50b80fd5e656', 'instance_number': '0', 'completion': True}

aria-mute-alert-src-port


Removes a named rule from the source port logic block, disabling the alerts.

Base Command

aria-mute-alert-src-port

Input

Argument Name Description Required
rule_name The name of the rule to delete. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.MuteAlertSrcPort.Rule string The name of the rule and the settings that define the rule.
Aria.MuteAlertSrcPort.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.MuteAlertSrcPort.Endpoints string Endpoint information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-mute-alert-src-port rule_name="srcPortAlert" rcs="PIdevice@sia12,sia32"

Context Example

{
    "Aria": {
        "MuteAlertSrcPort": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "trid": "57fab3e3-7d94-174a-ae7a-942b45ebba63"
                },
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia12>.<sds_component_PacketIntelligence>.<sds_uuid_07023d45-d4a0-4204-949d-86ce009fd172>",
                    "IPAddress": "192.168.0.100",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "trid": "9ce59360-c23a-a3f2-2c23-79c200bb4b4f"
                }
            ],
            "Rule": {
                "Definition": "Remove srcPortAlert",
                "Name": "srcPortAlert",
                "RCS": "PIdevice@sia12,sia32"
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688729
            }
        }
    }
}

Human Readable Output

aria-mute-alert-src-port

Rule Status Endpoints
Name: srcPortAlert
Definition: Remove srcPortAlert
RCS: PIdevice@sia12,sia32
command_state: Success
timestamp: 1601688729
{‘FQN’: ‘...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '57fab3e3-7d94-174a-ae7a-942b45ebba63', 'completion': True},
{'FQN': '...', 'IPAddress': '192.168.0.100', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '9ce59360-c23a-a3f2-2c23-79c200bb4b4f', 'completion': True}

aria-block-dest-subnet


Adds a rule that blocks packets destined for a specific IP address or range of IP addresses.

Base Command

aria-block-dest-subnet

Input

Argument Name Description Required
target_ip The IP address and mask of the destination IP address(es), in the format <IP_address>/<mask>. If the mask is omitted, a value of 32 is used. Required
rule_name The name of the rule to create. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.BlockDestSubnet.Rule string The name of the rule and the settings that define the rule.
Aria.BlockDestSubnet.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.BlockDestSubnet.Endpoints string Endpoint information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-block-dest-subnet target_ip="192.168.1.2/24" rule_name="destSubnetBlock" rcs="PIdevice@sia12,sia32"

Context Example

{
    "Aria": {
        "BlockDestSubnet": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia12>.<sds_component_PacketIntelligence>.<sds_uuid_07023d45-d4a0-4204-949d-86ce009fd172>",
                    "IPAddress": "192.168.0.100",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "instance_number": "0",
                    "trid": "0f7b6c11-bf19-bb23-eca4-8ea9ec47b35e"
                },
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "instance_number": "0",
                    "trid": "ffa29b82-9953-0dc3-102f-b16690f111bd"
                }
            ],
            "Rule": {
                "Definition": "192.168.1.2/24: DROP, END",
                "Name": "destSubnetBlock",
                "RCS": "PIdevice@sia12,sia32"
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688736
            }
        }
    }
}

Human Readable Output

aria-block-dest-subnet

Rule Status Endpoints
Name: destSubnetBlock
Definition: 192.168.1.2/24: DROP, END
RCS: PIdevice@sia12,sia32
command_state: Success
timestamp: 1601688736
{‘FQN’: ‘...', 'IPAddress': '192.168.0.100', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '0f7b6c11-bf19-bb23-eca4-8ea9ec47b35e', 'instance_number': '0', 'completion': True},
{'FQN': '...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': 'ffa29b82-9953-0dc3-102f-b16690f111bd', 'instance_number': '0', 'completion': True}

aria-unblock-dest-subnet


Removes a named rule from the destination subnet logic block. This allows the previously blocked traffic to resume.

Base Command

aria-unblock-dest-subnet

Input

Argument Name Description Required
rule_name The name of the rule to delete. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.UnblockDestSubnet.Rule string The name of the rule and the settings that define the rule.
Aria.UnblockDestSubnet.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.UnblockDestSubnet.Endpoints string Endpoint information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-unblock-dest-subnet rule_name="destSubnetBlock" rcs="PIdevice@sia12,sia32"

Context Example

{
    "Aria": {
        "UnblockDestSubnet": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "trid": "67a27b63-4141-6eba-841f-7f7af8f236bb"
                },
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia12>.<sds_component_PacketIntelligence>.<sds_uuid_07023d45-d4a0-4204-949d-86ce009fd172>",
                    "IPAddress": "192.168.0.100",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "trid": "993dbafd-f335-0a71-8501-8e5135686b6a"
                }
            ],
            "Rule": {
                "Definition": "Remove destSubnetBlock",
                "Name": "destSubnetBlock",
                "RCS": "PIdevice@sia12,sia32"
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688743
            }
        }
    }
}

Human Readable Output

aria-unblock-dest-subnet

Rule Status Endpoints
Name: destSubnetBlock
Definition: Remove destSubnetBlock
RCS: PIdevice@sia12,sia32
command_state: Success
timestamp: 1601688743
{‘FQN’: ‘...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '67a27b63-4141-6eba-841f-7f7af8f236bb', 'completion': True},
{'FQN': '...', 'IPAddress': '192.168.0.100', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '993dbafd-f335-0a71-8501-8e5135686b6a', 'completion': True}

aria-record-dest-subnet


Creates a rule that redirects traffic destined for a specific IP address or range of IP addresses to the Packet Recorder. Packets are tagged with the VID specified in the instance.

Base Command

aria-record-dest-subnet

Input

Argument Name Description Required
target_ip The IP address and mask of the destination IP address(es), in the format <IP_address>/<mask>. If the mask is omitted, a value of 32 is used. Required
vlan_id The VLAN ID that your network switch uses to forward packets to the Packet Recorder. Required
rule_name The name of the rule to create. Required
sia_interface The letter of the interface on the SIA used for forwarding packets. Can be A or B. If omitted, interface A is used. Optional
transport_type The type of notification to generate. Optional
tti_index The index of the entry in the transport type table. Optional
aio_index The index of the entry in the alert information object table. Optional
trigger_type The frequency of the alert. one-shot: The alert is triggered when the number of packets matching the criteria reaches the threshold specified in the trigger_value field. After the alert triggers, it is disabled until the flow expires or times out. re-trigger-count: The alert is triggered when the number of packets that match the criteria reaches the threshold specified in the trigger_value field. The counter then resets to 0, and the alert is triggered again the next time the threshold is met. re-trigger-timed-ms: The alert is triggered, and then the application waits the amount of time (in msecs) defined in the trigger_value field. Once this time passes, the alert is triggered again. re-trigger-timed-sec: The alert is triggered, and then the application waits the amount of time (in seconds) defined in the trigger_value field. After this time passes, the alert is triggered again. Optional
trigger_value The threshold that must be met before the alert is triggered. The value entered here depends on the trigger_type. If the trigger_type is one-shot or retrigger-count, this is the total number of packets that must be received before the alert is triggered. The valid range is 1-8191, If the trigger_type is re-trigger-ms or re-triggersec, this is the total number of msecs or secs, respectively, that must elapse before the alert is triggered again. The valid range is 1-8191. Optional
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.RecordDestSubnet.Rule string The name of the rule and the settings that define the rule.
Aria.RecordDestSubnet.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.RecordDestSubnet.Endpoints string Endpoint information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-record-dest-subnet target_ip="192.168.10.23/32" rule_name="destSubnetRecord" vlan_id="1234" transport_type="email" tti_index="2" aio_index="4" trigger_type="one-shot" trigger_value="1" rcs="PIdevice@US.HR.all"

Context Example

{
    "Aria": {
        "RecordDestSubnet": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "instance_number": "0",
                    "trid": "747751b0-449a-17c2-24b5-be629b5f0869"
                }
            ],
            "Rule": {
                "Definition": "192.168.10.23/32: REDIRECT-VLAN A 1234, ALERT email 2 4 one-shot 1, END",
                "Name": "destSubnetRecord",
                "RCS": "PIdevice@US.HR.all"
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688752
            }
        }
    }
}

Human Readable Output

aria-record-dest-subnet

Rule Status Endpoints
Name: destSubnetRecord
Definition: 192.168.10.23/32: REDIRECT-VLAN A 1234, ALERT email 2 4 one-shot 1, END
RCS: PIdevice@US.HR.all
command_state: Success
timestamp: 1601688752
{‘FQN’: ‘...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '747751b0-449a-17c2-24b5-be629b5f0869', 'instance_number': '0', 'completion': True}

aria-stop-recording-dest-subnet


Removes a named rule from the destination subnet logic block. This stops redirecting traffic to the Packet Recorder.

Base Command

aria-stop-recording-dest-subnet

Input

Argument Name Description Required
rule_name The name of the rule to delete. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.StopRecordingDestSubnet.Rule string The name of the rule and the settings that define the rule.
Aria.StopRecordingDestSubnet.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.StopRecordingDestSubnet.Endpoints string Endpoint information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-stop-recording-dest-subnet rule_name="destSubnetRecord" rcs="PIdevice@US.HR.all"

Context Example

{
    "Aria": {
        "StopRecordingDestSubnet": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "trid": "2deabe1b-c7a9-64c4-d43d-5ceba0c81b94"
                }
            ],
            "Rule": {
                "Definition": "Remove destSubnetRecord",
                "Name": "destSubnetRecord",
                "RCS": "PIdevice@US.HR.all"
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688759
            }
        }
    }
}

Human Readable Output

aria-stop-recording-dest-subnet

Rule Status Endpoints
Name: destSubnetRecord
Definition: Remove destSubnetRecord
RCS: PIdevice@US.HR.all
command_state: Success
timestamp: 1601688759
{‘FQN’: ‘...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '2deabe1b-c7a9-64c4-d43d-5ceba0c81b94', 'completion': True}

aria-alert-dest-subnet


Creates a rule that generates an alert when traffic destined for a specific IP address or range of IP addresses is detected.

Base Command

aria-alert-dest-subnet

Input

Argument Name Description Required
target_ip The IP address and mask of the destination IP address(es), in the format <IP_address>/<mask>. If the mask is omitted, a value of 32 is used. Required
rule_name The name of the rule to create. Required
transport_type The type of notification to generate. Can be email or syslog. Required
tti_index The index of the entry in the transport type table. Required
aio_index The index of the entry in the alert information object table. Required
trigger_type The frequency of the alert. one-shot: The alert is triggered when the number of packets matching the criteria reaches the threshold specified in the trigger_value field. After the alert triggers, it is disabled until the flow expires or times out. re-trigger-count: The alert is triggered when the number of packets that match the criteria reaches the threshold specified in the trigger_value field. The counter then resets to 0, and the alert is triggered again the next time the threshold is met. re-trigger-timed-ms: The alert is triggered, and then the application waits the amount of time (in msecs) defined in the trigger_value field. Once this time passes, the alert is triggered again. re-trigger-timed-sec: The alert is triggered, and then the application waits the amount of time (in seconds) defined in the trigger_value field. After this time passes, the alert is triggered again. Required
trigger_value The threshold that must be met before the alert is triggered. The value entered here depends on the trigger_type. If the trigger_type is one-shot or retrigger-count, this is the total number of packets that must be received before the alert is triggered. The valid range is 1-8191, If the trigger_type is re-trigger-ms or re-triggersec, this is the total number of msecs or secs, respectively, that must elapse before the alert is triggered again. The valid range is 1-8191. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.AlertDestSubnet.Rule string Specifies the name of the rule and the settings that define the rule.
Aria.AlertDestSubnet.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.AlertDestSubnet.Endpoints string Endpoint information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-alert-dest-subnet target_ip="192.168.1.2/24" rule_name="destSubnetAlert" transport_type="syslog" tti_index="2" aio_index="4" trigger_type="re-trigger-timed-sec" trigger_value="200" rcs="PIdevice@US.HR.all"

Context Example

{
    "Aria": {
        "AlertDestSubnet": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "instance_number": "0",
                    "trid": "56323db6-be93-a52a-04a7-23c28526d382"
                }
            ],
            "Rule": {
                "Definition": "192.168.1.2/24: ALERT syslog 2 4 re-trigger-timed-sec 200, END",
                "Name": "destSubnetAlert",
                "RCS": "PIdevice@US.HR.all"
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688766
            }
        }
    }
}

Human Readable Output

aria-alert-dest-subnet

Rule Status Endpoints
Name: destSubnetAlert
Definition: 192.168.1.2/24: ALERT syslog 2 4 re-trigger-timed-sec 200, END
RCS: PIdevice@US.HR.all
command_state: Success
timestamp: 1601688766
{‘FQN’: ‘...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '56323db6-be93-a52a-04a7-23c28526d382', 'instance_number': '0', 'completion': True}

aria-mute-alert-dest-subnet


Removes a named rule from the destination subnet logic block, disabling the alerts.

Base Command

aria-mute-alert-dest-subnet

Input

Argument Name Description Required
rule_name The name of the rule to delete. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.MuteAlertDestSubnet.Rule string The name of the rule and the settings that define the rule.
Aria.MuteAlertDestSubnet.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.MuteAlertDestSubnet.Endpoints string Endpoint information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-mute-alert-dest-subnet rule_name="destSubnetAlert" rcs="PIdevice@US.HR.all"

Context Example

{
    "Aria": {
        "MuteAlertDestSubnet": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "trid": "2ded90f8-772c-cc3c-66ab-5c72bd197dec"
                }
            ],
            "Rule": {
                "Definition": "Remove destSubnetAlert",
                "Name": "destSubnetAlert",
                "RCS": "PIdevice@US.HR.all"
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688775
            }
        }
    }
}

Human Readable Output

aria-mute-alert-dest-subnet

Rule Status Endpoints
Name: destSubnetAlert
Definition: Remove destSubnetAlert
RCS: PIdevice@US.HR.all
command_state: Success
timestamp: 1601688775
{‘FQN’: ‘...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '2ded90f8-772c-cc3c-66ab-5c72bd197dec', 'completion': True}

aria-block-src-subnet


Adds a rule that blocks packets originating from a specific IP address or range of IP addresses.

Base Command

aria-block-src-subnet

Input

Argument Name Description Required
src_ip The IP address and mask of the source IP address(es), in the format <IP_address>/<mask>. If the mask is omitted, a value of 32 is used. Required
rule_name The name of the rule to create. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.BlockSrcSubnet.Rule string The name of the rule and the settings that define the rule.
Aria.BlockSrcSubnet.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.BlockSrcSubnet.Endpoints string Endpoint information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-block-src-subnet src_ip="192.168.1.2/24" rule_name="srcSubnetBlock" rcs="securityDomain@aria$PIdevice@all.all.!(sia12)"

Context Example

{
    "Aria": {
        "BlockSrcSubnet": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "instance_number": "0",
                    "trid": "b341314d-6a94-9432-10f2-e82d426765b0"
                }
            ],
            "Rule": {
                "Definition": "192.168.1.2/24: DROP, END",
                "Name": "srcSubnetBlock",
                "RCS": "securityDomain@aria$PIdevice@all.all.!(sia12)"
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688782
            }
        }
    }
}

Human Readable Output

aria-block-src-subnet

Rule Status Endpoints
Name: srcSubnetBlock
Definition: 192.168.1.2/24: DROP, END
RCS: securityDomain@aria$PIdevice@all.all.!(sia12)
command_state: Success
timestamp: 1601688782
{‘FQN’: ‘...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': 'b341314d-6a94-9432-10f2-e82d426765b0', 'instance_number': '0', 'completion': True}

aria-unblock-src-subnet


Removes a named rule from the source subnet logic block. This allows the previously blocked traffic to resume.

Base Command

aria-unblock-src-subnet

Input

Argument Name Description Required
rule_name The name of the rule to delete. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.UnblockSrcSubnet.Rule string The name of the rule and the settings that define the rule.
Aria.UnblockSrcSubnet.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.UnblockSrcSubnet.Endpoints string Endpoint information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-unblock-src-subnet rule_name="srcSubnetBlock" rcs="securityDomain@aria$PIdevice@all.all.!(sia12)"

Context Example

{
    "Aria": {
        "UnblockSrcSubnet": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "trid": "8d2edba7-d4db-73a4-fcb3-c885db966ec1"
                }
            ],
            "Rule": {
                "Definition": "Remove srcSubnetBlock",
                "Name": "srcSubnetBlock",
                "RCS": "securityDomain@aria$PIdevice@all.all.!(sia12)"
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688789
            }
        }
    }
}

Human Readable Output

aria-unblock-src-subnet

Rule Status Endpoints
Name: srcSubnetBlock
Definition: Remove srcSubnetBlock
RCS: securityDomain@aria$PIdevice@all.all.!(sia12)
command_state: Success
timestamp: 1601688789
{‘FQN’: ‘...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '8d2edba7-d4db-73a4-fcb3-c885db966ec1', 'completion': True}

aria-record-src-subnet


Creates a rule that redirects traffic originating from one or more specific IP addresses to the Packet Recorder. Packets are tagged with the VID specified in the instance.

Base Command

aria-record-src-subnet

Input

Argument Name Description Required
src_ip The IP address and mask of the source IP address(es), in the format <IP_address>/<mask>. If the mask is omitted, a value of 32 is used. Required
vlan_id The VLAN ID your network switch uses to forward packets to the Packet Recorder. Required
rule_name The name of the rule to create. Required
sia_interface The letter of the interface on the SIA used for forwarding packets. Can be A or B. If omitted, interface A is used. Optional
transport_type The type of notification to generate. Can be email or syslog. Optional
tti_index The index of the entry in the transport type table. Optional
aio_index The index of the entry in the alert information object table. Optional
trigger_type The frequency of the alert. one-shot: The alert is triggered when the number of packets matching the criteria reaches the threshold specified in the trigger_value field. After the alert triggers, it is disabled until the flow expires or times out. re-trigger-count: The alert is triggered when the number of packets that match the criteria reaches the threshold specified in the trigger_value field. The counter then resets to 0, and the alert is triggered again the next time the threshold is met. re-trigger-timed-ms: The alert is triggered, and then the application waits the amount of time (in msecs) defined in the trigger_value field. Once this time passes, the alert is triggered again. re-trigger-timed-sec: The alert is triggered, and then the application waits the amount of time (in seconds) defined in the trigger_value field. After this time passes, the alert is triggered again. Optional
trigger_value The threshold that must be met before the alert is triggered. The value entered here depends on the trigger_type. If the trigger_type is one-shot or retrigger-count, this is the total number of packets that must be received before the alert is triggered. The valid range is 1-8191, If the trigger_type is re-trigger-ms or re-triggersec, this is the total number of msecs or secs, respectively, that must elapse before the alert is triggered again. The valid range is 1-8191. Optional
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.RecordSrcSubnet.Rule string Specifies the name of the rule and the settings that define the rule.
Aria.RecordSrcSubnet.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.RecordSrcSubnet.Endpoints string Returns endpoints information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-record-src-subnet src_ip="192.168.1.2/24" rule_name="srcSubnetRecord" vlan_id="1234" transport_type="email" tti_index="2" aio_index="4" trigger_type="one-shot" trigger_value="1" rcs="securityDomain@aria$PIdevice@all.all.!(sia12)"

Context Example

{
    "Aria": {
        "RecordSrcSubnet": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "instance_number": "0",
                    "trid": "52092233-a96c-39be-66ff-7ab52bb38dc1"
                }
            ],
            "Rule": {
                "Definition": "192.168.1.2/24: REDIRECT-VLAN A 1234, ALERT email 2 4 one-shot 1, END",
                "Name": "srcSubnetRecord",
                "RCS": "securityDomain@aria$PIdevice@all.all.!(sia12)"
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688798
            }
        }
    }
}

Human Readable Output

aria-record-src-subnet

Rule Status Endpoints
Name: srcSubnetRecord
Definition: 192.168.1.2/24: REDIRECT-VLAN A 1234, ALERT email 2 4 one-shot 1, END
RCS: securityDomain@aria$PIdevice@all.all.!(sia12)
command_state: Success
timestamp: 1601688798
{‘FQN’: ‘...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '52092233-a96c-39be-66ff-7ab52bb38dc1', 'instance_number': '0', 'completion': True}

aria-stop-recording-src-subnet


Removes a named rule from the source subnet logic block. This stops redirecting traffic to the Packet Recorder.

Base Command

aria-stop-recording-src-subnet

Input

Argument Name Description Required
rule_name The name of the rule to delete. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.StopRecordingSrcSubnet.Rule string The name of the rule and the settings that define the rule.
Aria.StopRecordingSrcSubnet.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.StopRecordingSrcSubnet.Endpoints string Endpoint information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-stop-recording-src-subnet rule_name="srcSubnetRecord" rcs="securityDomain@aria$PIdevice@all.all.!(sia12)"

Context Example

{
    "Aria": {
        "StopRecordingSrcSubnet": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "trid": "6ce98c59-d145-c0e8-dfd4-0a3b348e9d1b"
                }
            ],
            "Rule": {
                "Definition": "Remove srcSubnetRecord",
                "Name": "srcSubnetRecord",
                "RCS": "securityDomain@aria$PIdevice@all.all.!(sia12)"
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688806
            }
        }
    }
}

Human Readable Output

aria-stop-recording-src-subnet

Rule Status Endpoints
Name: srcSubnetRecord
Definition: Remove srcSubnetRecord
RCS: securityDomain@aria$PIdevice@all.all.!(sia12)
command_state: Success
timestamp: 1601688806
{‘FQN’: ‘...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '6ce98c59-d145-c0e8-dfd4-0a3b348e9d1b', 'completion': True}

aria-alert-src-subnet


Adds a rule that generates an alert when traffic originating from a specific IP address or range of IP addresses is detected.

Base Command

aria-alert-src-subnet

Input

Argument Name Description Required
src_ip The IP address and mask of the source IP address(es), in the format <IP_address>/<mask>. If the mask is omitted, a value of 32 is used. Required
rule_name The name of the rule to create. Required
transport_type The type of notification to generate. Required
tti_index The index of the entry in the transport type table. Required
aio_index The index of the entry in the alert information object table. Required
trigger_type The frequency of the alert. one-shot: The alert is triggered when the number of packets matching the criteria reaches the threshold specified in the trigger_value field. After the alert triggers, it is disabled until the flow expires or times out. re-trigger-count: The alert is triggered when the number of packets that match the criteria reaches the threshold specified in the trigger_value field. The counter then resets to 0, and the alert is triggered again the next time the threshold is met. re-trigger-timed-ms: The alert is triggered, and then the application waits the amount of time (in msecs) defined in the trigger_value field. Once this time passes, the alert is triggered again. re-trigger-timed-sec: The alert is triggered, and then the application waits the amount of time (in seconds) defined in the trigger_value field. After this time passes, the alert is triggered again. Required
trigger_value The threshold that must be met before the alert is triggered. The value entered here depends on the trigger_type. If the trigger_type is one-shot or retrigger-count, this is the total number of packets that must be received before the alert is triggered. The valid range is 1-8191, If the trigger_type is re-trigger-ms or re-triggersec, this is the total number of msecs or secs, respectively, that must elapse before the alert is triggered again. The valid range is 1-8191. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.AlertSrcSubnet.Rule string The name of the rule and the settings that define the rule.
Aria.AlertSrcSubnet.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.AlertSrcSubnet.Endpoints string Endpoint information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-alert-src-subnet src_ip="192.168.1.2/24" rule_name="srcSubnetAlert" transport_type="syslog" tti_index="2" aio_index="4" trigger_type="re-trigger-timed-sec" trigger_value="200"

Context Example

{
    "Aria": {
        "AlertSrcSubnet": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia12>.<sds_component_PacketIntelligence>.<sds_uuid_07023d45-d4a0-4204-949d-86ce009fd172>",
                    "IPAddress": "192.168.0.100",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "instance_number": "0",
                    "trid": "ad0fe8eb-5c43-e121-2618-8c09e942068d"
                },
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "instance_number": "0",
                    "trid": "6b6916d1-ff47-ab71-fac6-473626bd9b0b"
                }
            ],
            "Rule": {
                "Definition": "192.168.1.2/24: ALERT syslog 2 4 re-trigger-timed-sec 200, END",
                "Name": "srcSubnetAlert",
                "RCS": null
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688814
            }
        }
    }
}

Human Readable Output

aria-alert-src-subnet

Rule Status Endpoints
Name: srcSubnetAlert
Definition: 192.168.1.2/24: ALERT syslog 2 4 re-trigger-timed-sec 200, END
RCS: null
command_state: Success
timestamp: 1601688814
{‘FQN’: ‘...', 'IPAddress': '192.168.0.100', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': 'ad0fe8eb-5c43-e121-2618-8c09e942068d', 'instance_number': '0', 'completion': True},
{'FQN': '...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '6b6916d1-ff47-ab71-fac6-473626bd9b0b', 'instance_number': '0', 'completion': True}

aria-mute-alert-src-subnet


Removes a named rule from the source subnet logic block, disabling the alerts.

Base Command

aria-mute-alert-src-subnet

Input

Argument Name Description Required
rule_name The name of the rule to delete. Required
rcs The remediation configuration string. Please refer to the integration documentation for more information. Optional

Context Output

Path Type Description
Aria.MuteAlertSrcSubnet.Rule string The name of the rule and the settings that define the rule.
Aria.MuteAlertSrcSubnet.Status string The state of the command, and the timestamp indicating when the command completed. Possible states include “Success”, “Failure”, or “Endpoint matching RCS not found”.
Aria.MuteAlertSrcSubnet.Endpoints string Endpoint information, such as the IP address, about the SIAs that were modified based on the rule change.

Command Example

!aria-mute-alert-src-subnet rule_name="srcSubnetAlert"

Context Example

{
    "Aria": {
        "MuteAlertSrcSubnet": {
            "Endpoints": [
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia32>.<sds_component_PacketIntelligence>.<sds_uuid_590c49ce-1286-481b-ae07-f4192130e7af>",
                    "IPAddress": "192.168.0.101",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "trid": "a56e3ae8-f361-e648-e286-4e4f8e04d13b"
                },
                {
                    "FQN": "<sds_cluster_0>.<sds_node_sia12>.<sds_component_PacketIntelligence>.<sds_uuid_07023d45-d4a0-4204-949d-86ce009fd172>",
                    "IPAddress": "192.168.0.100",
                    "Model": "sia-lx2160",
                    "OS": "GNU/Linux",
                    "Processor": "sia-lx2160",
                    "completion": true,
                    "trid": "9ed18816-79d1-316e-68d8-7021a3b4f2e7"
                }
            ],
            "Rule": {
                "Definition": "Remove srcSubnetAlert",
                "Name": "srcSubnetAlert",
                "RCS": null
            },
            "Status": {
                "command_state": "Success",
                "timestamp": 1601688822
            }
        }
    }
}

Human Readable Output

aria-mute-alert-src-subnet

Rule Status Endpoints
Name: srcSubnetAlert
Definition: Remove srcSubnetAlert
RCS: null
command_state: Success
timestamp: 1601688822
{‘FQN’: ‘...', 'IPAddress': '192.168.0.101', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': 'a56e3ae8-f361-e648-e286-4e4f8e04d13b', 'completion': True},
{'FQN': '...', 'IPAddress': '192.168.0.100', 'Model': 'sia-lx2160', 'OS': 'GNU/Linux', 'Processor': 'sia-lx2160', 'trid': '9ed18816-79d1-316e-68d8-7021a3b4f2e7', 'completion': True}

Appendix

The remediation configuration string is a set of parameters that defines how and where the remediation rule
will be deployed. This string consists of two sets containing comma-separated lists, with the dollar sign ($)
separating the sets. These two sets are:

  • Security Domain List: Identifies the list of security domains, which consist of one or more regions,
    nodes, or clusters. Only devices bound to the security domains listed here are evaluated when finding
    a match.
  • Remediation Device List: Identifies the list of remediation devices, or SIAs running PI, that will
    execute the action. These devices must be part of a security domain specified in the security domain
    list.

See the following section for details about the syntax used for each of these sets.

Security Domain List

The security domain list follows the format securityDomain@<domain1>, <domain2>, …
<domainN>. If more than one domain is provided, remediation devices in all listed domains are
evaluated. For example, if SIA1 and SIA2 are part of <domain1>, and SIA 3 and SIA4 are part of
<domain2>, all SIAs (1-4) will be evaluated when attempting to find a match. If omitted, the action
is executed on the SIA(s) defined in the remediation device list.

Note
The list must contain at least one security domain if securityDomain@ is provided. If the list is empty, the string will fail. You can omit the entire string, but not just the list.

Remediation Device List

This remediation device list is required and follows the format:

  • PIdevice@<sia1>, <sia2>, … <siaN>

The SIAs can be identified based on the SIA name or SIA label.

The SIA name is simply the name given to the SIA, such as SIA1.

The SIA label follows a specific schema and uses the format:

  • <region>.<group>.<name>

For example, the label for SIA1 in the engineering group, which is part of the MA region would be
MA.engineering.SIA1.

It’s also possible to specify one or more security domains using the format:

  • ^<domain1>,<domain2>,…,<domainN>

If the security domain list (securityDomain) is provided, these domains must intersect with one or
more in the security domain list; otherwise, the remediation action will not be executed. For
example, if the security domain list includes ARIA-North, and ARIA-South is specified as the
PIdevice, only those SIAs that are members of both ARIA-North and ARIA-South will be included.
If no SIAs exist in either domain, the action will not be executed.
To provide granularity based on labels, the SIA field accepts wildcards, inclusions, exclusions, and
the keyword all.

An asterisk (*) denotes a wildcard, indicating any string for that particular label will return a
match. For example, MA.engineering.* returns all SIAs in the engineering group of the MA
region.

The inclusion option allows you to provide a list of strings for a specific label, such as group. This
comma-separated list is enclosed in parentheses ( ) and removes the need to spell out each name
individually. For example, MA.(engineering,sales).* replaces MA.engineering.*,
MA.sales.*.

To exclude one or more areas, add the exclamation point (!) to a list enclosed in parentheses ( ).
This returns every SIA except any specified in the exclusion list.
For example MA.!(engineering).* returns everything in the MA region except those SIAs that are part of the
engineering group.

Finally, you can use the keyword all to return all matches for that particular label, which is
equivalent to using the wildcard. For example, MA.all.all is equivalent to “MA.*.*”.

RCS Examples

RCS string Explanation
PIdevice@all This is the default RCS if not provided in the command. It will send rules to all the SIAs attached to the SDSo.
PIdevice@MA.ENG.* This RCS will select SIAs which have a region label “MA” and a group label “ENG”.
PIdevice@MA.HR.!(sia1, sia2) This RCS will select all SIAs with a region label “MA” and a group label “HR”, while excluding SIAs with name labels of “sia1” and “sia2”.
securityDomain@ARIA-NORTH@
PIdevice@MA.HR.sia1,sia2,^ARIA-SOUTH
This RCS will select the SIA with a region label of “MA”, group label of “HR”, and name label of “sia1”. It will also select the SIA named “sia2” as well as any SIAs that are members of both domains (i.e., ARIA-NORTH and ARIA-SOUTH).

Additional Information

For more information, please see the ARIA_SOAR_Integration_Guide_XSOAR.

Configuration parameters

  • sdso — SDSo Base URL (e.g. http://<IP address or FQDN of SDSo Node>:7443) (required)
  • proxy — Use system proxy settings
  • insecure — Trust any certificate (not secure)

Commands (30)

  • aria-alert-conversation

    Adds a rule that generates an alert when a conversation that matches the specified 5-tuple values is detected.

  • aria-alert-dest-port

    Creates a rule that generates an alert when traffic destined for one or more ports is detected.

  • aria-alert-dest-subnet

    Creates a rule that generates an alert when traffic destined for a specific IP address or range of IP addresses is detected.

  • aria-alert-src-port

    Creates a rule that generates an alert when traffic originating from one or more ports is detected.

  • aria-alert-src-subnet

    Adds a rule that generates an alert when traffic originating from a specific IP address or range of IP addresses is detected.

  • aria-block-conversation

    Creates a rule that drops all packets that match the specified 5-tuple values.

  • aria-block-dest-port

    Creates a rule that blocks packets destined for one or more specified ports.

  • aria-block-dest-subnet

    Adds a rule that blocks packets destined for a specific IP address or range of IP addresses.

  • aria-block-src-port

    Adds a rule that blocks packets originating from one or more specific ports.

  • aria-block-src-subnet

    Adds a rule that blocks packets originating from a specific IP address or range of IP addresses.

  • aria-mute-alert-conversation

    Removes a named rule from the 5-tuple logic block, disabling the alerts.

  • aria-mute-alert-dest-port

    Removes a named rule from the destination port logic block, disabling the alerts.

  • aria-mute-alert-dest-subnet

    Removes a named rule from the destination subnet logic block, disabling the alerts.

  • aria-mute-alert-src-port

    Removes a named rule from the source port logic block, disabling the alerts.

  • aria-mute-alert-src-subnet

    Removes a named rule from the source subnet logic block, disabling the alerts.

  • aria-record-conversation

    Creates a rule that redirects a conversation that matches 5-tuple values to the Packet Recorder. Packets are tagged with the VID specified in the instance.

  • aria-record-dest-port

    Adds a rule that redirects traffic that is destined for one or more ports to the Packet Recorder. Packets are tagged with the VID specified in the instance.

  • aria-record-dest-subnet

    Creates a rule that redirects traffic destined for a specific IP address or range of IP addresses to the Packet Recorder. Packets are tagged with the VID specified in the instance.

  • aria-record-src-port

    Adds a rule that redirects traffic originating from one or more ports to the Packet Recorder. Packets are tagged with the VID specified in the instance.

  • aria-record-src-subnet

    Creates a rule that redirects traffic originating from one or more specific IP addresses to the Packet Recorder. Packets are tagged with the VID specified in the instance.

  • aria-stop-recording-conversation

    Removes the named rule from the 5-tuple block. This stops redirecting traffic to the Packet Recorder.

  • aria-stop-recording-dest-port

    Removes a named rule from the destination port logic block. This stops redirecting traffic to the Packet Recorder.

  • aria-stop-recording-dest-subnet

    Removes a named rule from the destination subnet logic block. This stops redirecting traffic to the Packet Recorder.

  • aria-stop-recording-src-port

    Removes a named rule from the source port logic block. This stops redirecting traffic to the Packet Recorder.

  • aria-stop-recording-src-subnet

    Removes a named rule from the source subnet logic block. This stops redirecting traffic to the Packet Recorder.

  • aria-unblock-conversation

    Deletes a named rule from the 5-tuple logic block. This allows the previously blocked conversation to resume.

  • aria-unblock-dest-port

    Removes a named rule from the destination port logic block. This allows the previously blocked traffic to resume.

  • aria-unblock-dest-subnet

    Removes a named rule from the destination subnet logic block. This allows the previously blocked traffic to resume.

  • aria-unblock-src-port

    Removes a named rule from the source port logic block. This allows the previously blocked traffic to resume.

  • aria-unblock-src-subnet

    Removes a named rule from the source subnet logic block. This allows the previously blocked traffic to resume.

import json
import re
import time

import demistomock as demisto
import requests
import urllib3
from CommonServerPython import *


class ParameterError(Exception):
    """Raised when the function parameters do not meet requirements"""


"""
Remediation Configuration String (RCS) that use to select SIA.
"""


class RCS:
    """
    Define class members

    Define class methods
    """

    def __init__(self, rcs=None):
        self.rcs = rcs
        if self.rcs is None:
            self.rcs = "PIdevice@all"

        """
        Used to indicate which RET types currently supported
        """
        self.RET_functions = {"drop": self._parse_RET_drop}

    """
    destructor
    """

    def __del__(self):
        return 0

    """
    Parse a drop command and return its representation
    for being put into a NRDO action / rule.
    """

    def _parse_RET_drop(self, rcs):
        if rcs is None:
            return None, None
        elif rcs == "":
            return None, None

        rcsp = re.match("^[(][)](.+)$", rcs)
        if rcsp is None:
            return None, rcs
        elif rcsp.group(1) is None:
            return "", None
        elif rcsp.group(1) == "":
            return "", None

        RET_drop = ["drop"]

        return RET_drop, rcsp.group(1)

    """
    Parse a SIA simple name
    """

    def _parse_RDL_RD_name(self, rcs):
        if rcs is None:
            return None, None, "failed: RD name rcs none"
        elif rcs == "":
            return None, None, "failed: RD name rcs empty"

        rcsp = re.match(r"^(\w[\w-]*)(.*)$", rcs)
        if rcsp is None:
            return None, None, "failed: RD name match none"
        elif rcsp.group(1) is None:
            return None, None, "failed: RD name none"
        elif rcsp.group(1) == "":
            return None, None, "failed: RD name empty"

        RD_name = ("name", rcsp.group(1))

        rcs = rcsp.group(2)

        return RD_name, rcs, f"success: {rcsp.group(1)}"

    """
    Parse a FQN
    """

    def _parse_RDL_RD_FQN(self, rcs):
        if rcs is None:
            return None, None, "failed: RD fqn rcs none"
        elif rcs == "":
            return None, None, "failed: RD fqn rcs empty"

        rcsp = re.match(r"^([<][\w_-<>.]+[>])(.*)$", rcs)
        if rcsp is None:
            return None, None, "failed: RD fqn match none"
        elif rcsp.group(1) is None:
            return None, None, "failed: RD fqn none"
        elif rcsp.group(1) == "":
            return None, None, "failed: RD fqn empty"

        RD_fqn = ("FQN", rcsp.group(1))

        rcs = rcsp.group(2)

        return RD_fqn, rcs, f"success: {rcsp.group(1)}"

    """
    Parse a security domain name SDN
    """

    def _parse_RDL_RD_SDN(self, rcs):
        if rcs is None:
            return None, None, "failed: RD sd rcs none"
        elif rcs == "":
            return None, None, "failed: RD sd rcs empty"

        rcsp = re.match(r"^\^(\w[\w-]*)(.*)$", rcs)
        if rcsp is None:
            return None, None, "failed: RD sd match none"
        elif rcsp.group(1) is None:
            return None, None, "failed: RD sd none"
        elif rcsp.group(1) == "":
            return None, None, "failed: RD sd empty"

        RD_sdn = ("securityDomain", rcsp.group(1))

        rcs = rcsp.group(2)

        return RD_sdn, rcs, f"success: {rcsp.group(1)}"

    """
    Parse an RGN label as a name
    """

    def _parse_RDL_RD_RGN_name(self, rcs):
        if rcs is None:
            return None, None, "failed: RD rgn name rcs none"
        elif rcs == "":
            return None, None, "failed: RD rgn name rcs empty"

        rcsp = re.match(r"^(\w[\w-]*)(.*)$", rcs)
        if rcsp is None:
            return None, None, "failed: RD rgn name rcsp none"
        elif rcsp.group(1) is None:
            return None, None, "failed: RD rgn name rcsp.g1 none"
        elif rcsp.group(1) == "":
            return None, None, "failed: RD rgn name rcsp.g1 empty"

        return rcsp.group(1), rcsp.group(2), "success"

    """
    Parse an RGN label as a list of names
    """

    def _parse_RDL_RD_RGN_list(self, rcs):
        if rcs is None:
            return None, None, "failed: RD rgn list rcs none"
        elif rcs == "":
            return None, None, "failed: RD rgn list rcs empty"

        rcsp = re.match(r"^[(](.+)$", rcs)
        if rcsp is None:
            return None, None, "failed: RD rgn list rcsp none"
        elif rcsp.group(1) is None:
            return None, None, "failed: RD rgn list rcsp.g1 none"
        elif rcsp.group(1) == "":
            return None, None, "failed: RD rgn list rcsp.g1 empty"

        rcs = rcsp.group(1)

        names = ""

        while True:
            rcsp = re.match(r"(\w[\w-]*)(.+)$", rcs)
            if rcsp is None:
                return None, None, "failed: RD rgn list rcsp name none"
            elif rcsp.group(1) is None:
                return None, None, "failed: RD rgn list rcsp.g1 name none"
            elif rcsp.group(1) == "":
                return None, None, "failed: RD rgn list rcsp.g1 name empty"

            names = f"{names}{rcsp.group(1)}"

            rcs = rcsp.group(2)
            if rcs is None:
                return None, None, "failed: RD rgn list rcsp.g2 name none"
            elif rcs == "":
                return None, None, "failed: RD rgn list rcsp.g2 name empty"

            rcsp = re.match("^[)](.*)$", rcs)
            if rcsp is not None:
                rcs = rcsp.group(1)
                break

            rcsp = re.match("^,(.+)$", rcs)
            if rcsp is None:
                return None, None, "failed: RD rgn list rcsp comma none"
            elif rcsp.group(1) is None:
                return None, None, "failed: RD rgn list rcsp.g1 comma none"
            elif rcsp.group(1) == "":
                return None, None, "failed: RD rgn list rcsp.g1 comma empty"

            rcs = rcsp.group(1)

            names = f"{names},"

        if names == "":
            return None, None, "failed: RD rgn list names empty"

        names = f"({names})"

        return names, rcs, f"success: {names}"

    """
    Parse an RGN label as asterik
    """

    def _parse_RDL_RD_RGN_asterik(self, rcs):
        if rcs is None:
            return None, None, "failed: RD rgn asterik rcs none"
        elif rcs == "":
            return None, None, "failed: RD rgn asterik rcs empty"

        rcsp = re.match(r"^\*(.*)$", rcs)
        if rcsp is None:
            return None, None, "failed: RD rgn asterik rcsp none"

        return "*", rcsp.group(1), "success"

    """
    Parse an RGN
    """

    def _parse_RDL_RD_RGN_label(self, rcs):
        if rcs is None:
            return None, None, "failed: RD label rgn rcs none"
        elif rcs == "":
            return None, None, "failed: RD label rgn rcs empty"

        while True:
            rcsp = re.match(r"^[!]([(].*)$", rcs)
            if rcsp is not None:
                if rcsp.group(1) is None:
                    return None, None, "failed: RD rgn label exclusive g1 none"
                elif rcsp.group(1) == "":
                    return None, None, "failed: RD rgn label exclusive g1 empty"
                rcs = rcsp.group(1)
                label, rcs, msg = self._parse_RDL_RD_RGN_list(rcs)
                if label is None:
                    return None, None, f"failed: RD rgn label exclusive none {msg}"
                elif label == "":
                    return None, None, f"failed: RD rgn label exclusive empty {msg}"
                label = f"!{label}"
                break

            rcsp = re.match(r"^[(].*$", rcs)
            if rcsp is not None:
                label, rcs, msg = self._parse_RDL_RD_RGN_list(rcs)
                if label is None:
                    return None, None, f"failed: RD rgn label inclusive none {msg}"
                elif label == "":
                    return None, None, f"failed: RD rgn label inclusive empty {msg}"
                break

            rcsp = re.match(r"^\*.*$", rcs)
            if rcsp is not None:
                label, rcs, msg = self._parse_RDL_RD_RGN_asterik(rcs)
                if label is None:
                    return None, None, f"failed: RD rgn label asterik none {msg}"
                elif label == "":
                    return None, None, f"failed: RD rgn label asterik empty {msg}"
                break

            rcsp = re.match(r"^[\w].*$", rcs)
            if rcsp is not None:
                label, rcs, msg = self._parse_RDL_RD_RGN_name(rcs)
                if label is None:
                    return None, None, f"failed: RD rgn label name none {msg}"
                elif label == "":
                    return None, None, f"failed: RD rgn label name empty {msg}"
                break

            return None, None, "failed: RD rgn label invalid"

        return label, rcs, "success"

    """
    Parse an RGN
    """

    def _parse_RDL_RD_RGN(self, rcs):
        if rcs is None:
            return None, None, "failed: RD rgn rcs none"
        elif rcs == "":
            return None, None, "failed: RD rgn rcs empty"

        region, rcs, msg = self._parse_RDL_RD_RGN_label(rcs)
        if region is None:
            return None, None, f"failed: RD rgn region none {msg}"
        elif region == "":
            return None, None, f"failed: RD rgn region empty {msg}"
        elif rcs is None:
            return None, None, f"failed: RD rgn region rcs none {msg}"
        elif rcs == "":
            return None, None, f"failed: RD rgn region rcs empty {msg}"

        rcsp = re.match(r"^\.(.+)$", rcs)
        if rcsp is None:
            return None, None, "failed: RD rgn region rcsp none ."
        elif rcsp.group(1) is None:
            return None, None, "failed: RD rgn region rcsp.g1 none ."
        elif rcsp.group(1) == "":
            return None, None, "failed: RD rgn region rcsp.g1 empty ."
        rcs = rcsp.group(1)

        group, rcs, msg = self._parse_RDL_RD_RGN_label(rcs)
        if group is None:
            return None, None, f"failed: RD rgn group none {msg}"
        elif group == "":
            return None, None, f"failed: RD rgn group empty {msg}"
        elif rcs is None:
            return None, None, f"failed: RD rgn group rcs none {msg}"
        elif rcs == "":
            return None, None, f"failed: RD rgn group rcs empty {msg}"

        rcsp = re.match(r"^\.(.+)$", rcs)
        if rcsp is None:
            return None, None, "failed: RD rgn group rcsp none ."
        elif rcsp.group(1) is None:
            return None, None, "failed: RD rgn group rcsp.g1 none ."
        elif rcsp.group(1) == "":
            return None, None, "failed: RD rgn group rcsp.g1 empty ."
        rcs = rcsp.group(1)

        name, rcs, msg = self._parse_RDL_RD_RGN_label(rcs)
        if name is None:
            return None, None, f"failed: RD rgn name none {msg}"
        elif name == "":
            return None, None, f"failed: RD rgn name empty {msg}"

        RGN = ("RGN", f"{region}.{group}.{name}")

        return RGN, rcs, "success"

    """
     parse the RDL component of the RCS:
       RDL      :: PIdevice@[<RD><RD_LIST>*]
       RD       :: name | SDN | RGN | FQN
       RD_LIST  :: , <RD>
    """

    def _parse_RDL(self, rcs):
        if rcs is None:
            return None, None, "failed: rcs is none"
        elif rcs == "":
            return None, None, "failed: rcs is empty"

        rcsp = re.match("^PIdevice@(.*)$", rcs)
        if rcsp is None:
            return None, rcs, "failure: invalid keyword"

        RDL_all = ("RGN", "all.all.all")
        RDL = []

        if rcsp.group(1) is None:
            return RDL_all, None, "success: all (none)"
        elif rcsp.group(1) == "":
            return RDL_all, None, "success: all (empty)"

        rcs = rcsp.group(1)

        while True:
            if rcs is None:
                break
            if rcs == "":
                break

            while True:
                rcsp = re.match(r"^all\..+$", rcs)
                if rcsp is not None:
                    if rcsp.group(0) == "":
                        return None, None, "failure: RGN (all-none)"
                    RD, rcs, msg = self._parse_RDL_RD_RGN(rcs)
                    if RD is None:
                        return None, None, f"failure: RGN (all-obj) {msg}"
                    elif len(RD) != 2:
                        return None, None, f"failure: RGN (all len != 2) {msg}"
                    RDL.append(RD)
                    break

                rcsp = re.match(r"^all(.*)$", rcs)
                if rcsp is not None:
                    if rcsp.group(0) == "":
                        return None, None, "failure: all (empty)"
                    RDL.append(RDL_all)
                    rcs = rcsp.group(1)
                    break

                rcsp = re.match(r"^\^.*$", rcs)
                if rcsp is not None:
                    if rcsp.group(0) == "":
                        return None, None, "failure: SD (none)"
                    RD, rcs, msg = self._parse_RDL_RD_SDN(rcs)
                    if RD is None:
                        return None, None, f"failure: SD (empty) {msg}"
                    elif len(RD) != 2:
                        return None, None, f"failure: SD (len != 2) {msg}"
                    RDL.append(RD)
                    break

                rcsp = re.match(r"^[<].*$", rcs)
                if rcsp is not None:
                    if rcsp.group(0) == "":
                        return None, None, "failure: FQN (empty)"
                    RD, rcs, msg = self._parse_RDL_RD_FQN(rcs)
                    if RD is None:
                        return None, None, f"failure: FQN (obj) {msg}"
                    elif len(RD) != 2:
                        return None, None, f"failure: FQN (len != 2) {msg}"
                    RDL.append(RD)
                    break

                rcsp = re.match(r"^[!].*$", rcs)
                if rcsp is not None:
                    if rcsp.group(0) == "":
                        return None, None, "failure: RGN (exclusive-none)"
                    RD, rcs, msg = self._parse_RDL_RD_RGN(rcs)
                    if RD is None:
                        return None, None, f"failure: RGN (exclusive-obj) {msg}"
                    elif len(RD) != 2:
                        return None, None, f"failure: RGN (exclusive len != 2) {msg}"
                    RDL.append(RD)
                    break

                rcsp = re.match(r"^[(].*$", rcs)
                if rcsp is not None:
                    if rcsp.group(0) == "":
                        return None, None, "failure: RGN (inclusive-none)"
                    RD, rcs, msg = self._parse_RDL_RD_RGN(rcs)
                    if RD is None:
                        return None, None, f"failure: RGN (inclusive-none) {msg}"
                    elif len(RD) != 2:
                        return None, None, f"failure: RGN (inclusive len != 2) {msg}"
                    RDL.append(RD)
                    break

                rcsp = re.match(r"^\*\..*$", rcs)
                if rcsp is not None:
                    if rcsp.group(0) == "":
                        return None, None, "failure: RGN (asterik-none)"
                    RD, rcs, msg = self._parse_RDL_RD_RGN(rcs)
                    if RD is None:
                        return None, None, f"failure: RGN (asterik-none) {msg}"
                    elif len(RD) != 2:
                        return None, None, f"failure: RGN (asterik len != 2) {msg}"
                    RDL.append(RD)
                    break

                rcsp = re.match(r"^\*(.*)$", rcs)
                if rcsp is not None:
                    if rcsp.group(0) == "":
                        return None, None, "failure: asterik (empty)"
                    RDL.append(RDL_all)
                    rcs = rcsp.group(1)
                    break

                rcsp = re.match(r"^[\w].*$", rcs)
                if rcsp is None:
                    return None, None, "failure: name should be there"

                rcsp = re.match(r"^\w[\w-]*\..*$", rcs)
                if rcsp is not None:
                    if rcsp.group(0) == "":
                        return None, None, "failure: name RGN (none)"
                    RD, rcs, msg = self._parse_RDL_RD_RGN(rcs)
                    if RD is None:
                        return None, None, f"failure: RGN name (obj) {msg}"
                    elif len(RD) != 2:
                        return None, None, f"failure: RGN name (len != 2) {msg}"
                    RDL.append(RD)
                    break

                RD, rcs, msg = self._parse_RDL_RD_name(rcs)
                if RD is None:
                    return None, None, f"failure: NAME (obj) {msg}"
                elif len(RD) != 2:
                    return None, None, f"failure: NAME (len != 2) {msg}"
                RDL.append(RD)
                break

            if rcs is None:
                break
            if rcs == "":
                break

            rcsp = re.match("^,(.*)$", rcs)
            if rcsp is None:
                return None, None, "failure: RDL , obj (none)"
            elif rcsp.group(1) is None:
                return None, None, "failure: RDL , (none)"
            elif rcsp.group(1) == "":
                return None, None, "failure: RDL , (empty)"
            rcs = rcsp.group(1)

        if rcs is not None and rcs != "":
            return None, "", "failure: RCS ended-!empty"

        if len(RDL) <= 0:
            return None, None, "failure: RDL empty"

        return RDL, None, f"success: {len(RDL)}"

    """
     parse the RET component of the RCS:
       RET      :: Remediation@<ret><ret_list>
       ret      :: drop() | alert(...) | redirect(...) | serviceChain(...)
       SDN_LIST :: , <ret>
    """

    def _parse_RET(self, rcs):
        if rcs is None:
            return None, None, "failure: RET RCS none"
        elif rcs == "":
            return None, None, "failure: RET RCS empty"

        rcsp = re.match("^Remediation@(.+)$", rcs)
        if rcsp is None:
            rcs = f"Remediation@drop()${rcs}"
            rcsp = re.match("^Remediation@(.+)$", rcs)
            if rcsp is None:
                return None, rcs, "failure: RET failed insert drop()"

        if rcsp.group(1) is None:
            return None, None, "failuure: RET obj none"
        elif rcsp.group(1) == "":
            return None, None, "failure: RET obj empty"

        rcs = rcsp.group(1)
        RET = []

        rcsp = re.match(r"^\$(.+)$", rcs)
        if rcsp is not None:
            rcs = f"drop(){rcs}"

        while True:
            rcsp = re.match(r"(\w[\w]*)([(].+\$.+)$", rcs)
            if rcsp is None:
                return None, None, "failure: RET obj type none"
            elif rcsp.group(1) is None:
                return None, None, "failure: RET type none"
            elif rcsp.group(1) == "":
                return None, None, "failure: RET type empty"

            RET_parse_func = self.RET_functions.get(rcsp.group(1))
            if RET_parse_func is None:
                return None, None, "failure: RET type not found"

            rcs = rcsp.group(2)
            if rcs is None:
                return None, None, "failure: RET RCS none"
            elif rcs == "":
                return None, None, "failure: RET RCS empty"

            """
             call the RET type parser to create
             its PI object.
            """
            obj, rcs = RET_parse_func(rcs)
            if obj is None:
                return None, None, "failure: RET func obj none"
            elif len(obj) < 1:
                return None, None, "failure: RET func obj 1 or greater"
            elif rcs is None:
                return None, None, "failure: RET func RCS none"
            elif rcs == "":
                return None, None, "failure: RET func RCS empty"

            RET.append(obj)

            rcsp = re.match(r"^\$(.+)$", rcs)
            if rcsp is not None:
                break

            rcsp = re.match(r"^,(\w[\w]*[(].+\$.+)$", rcs)
            if rcsp is None:
                return None, None, "failure: RET next obj none"
            elif rcsp.group(1) is None:
                return None, None, "failure: RET next none"
            elif rcsp.group(1) == "":
                return None, None, "failure: RET next empty"

            rcs = rcsp.group(1)

        if rcs is None:
            return None, None, "failure: RET end RCS none"
        elif rcs == "":
            return None, None, "failure: RET end RCS empty"

        rcsp = re.match(r"^\$(.+)$", rcs)
        if rcsp is None:
            return None, None, "failure: RET # remove none"
        elif rcsp.group(1) is None:
            return None, None, "failure: RET # remove group none"
        elif rcsp.group(1) == "":
            return None, None, "failure: RET # remove group empty"

        rcs = rcsp.group(1)

        if len(RET) <= 0:
            return None, None, "failure: RET list empty"

        return RET, rcs, f"success: {len(RET)}"

    """
     parse the SDL component of the RCS:
       SDL      :: securityDomain@<SDN><SDN_LIST>*
       SDN      :: <a-zA-Z0-9_><a-zA-Z0-9_>*
       SDN_LIST :: , <SDN>
    """

    def _parse_SDL(self, rcs):
        if rcs is None:
            return None, None, "failure: RCS is none"
        elif rcs == "":
            return None, None, "failure: RCS is empty"

        rcsp = re.match("^securityDomain@(.+)$", rcs)
        if rcsp is None:
            SDL = ["all"]
            return SDL, rcs, "success: 1"

        if rcsp.group(1) is None:
            return None, None, "failure: none"
        elif rcsp.group(1) == "":
            return None, None, "failure: empty"

        rcs = rcsp.group(1)
        SDL = []

        while True:
            rcsp = re.match(r"(\w[\w-]*)(.*\$.+)$", rcs)
            if rcsp is None:
                return None, None, "failure: bad SDN"
            elif rcsp.group(1) is None:
                return None, None, "failure: SDN none"
            elif rcsp.group(1) == "":
                return None, None, "failure: SDN empty"

            SDL.append(rcsp.group(1))

            rcs = rcsp.group(2)
            if rcs is None:
                return None, None, "failure: SDN no more RCS none"
            elif rcs == "":
                return None, None, "failure: SDN no more RCS empty"

            rcsp = re.match(r"^\$(.+)$", rcs)
            if rcsp is not None:
                break

            rcsp = re.match(r"^,(\w[\w-]*.*\$.+)$", rcs)
            if rcsp is None:
                return None, None, "failure: SDN obj advance none"
            elif rcsp.group(1) is None:
                return None, None, "failure: SDN advance none"
            elif rcsp.group(1) == "":
                return None, None, "failure: SDN advance empty"

            rcs = rcsp.group(1)

        if rcs is None:
            return None, None, "failure: SDL RCS none"
        elif rcs == "":
            return None, None, "failure: SDL RCS empty"

        rcsp = re.match(r"^\$(.+)$", rcs)
        if rcsp is None:
            return None, None, "failure: SDL # remove none"
        elif rcsp.group(1) is None:
            return None, None, "failure: SDL # remove group none"
        elif rcsp.group(1) == "":
            return None, None, "failure: SDL # remove group empty"
        rcs = rcsp.group(1)

        if len(SDL) <= 0:
            return None, None, "failure: SDL list empty"

        return SDL, rcs, f"success: {len(SDL)}"

    """
    Parse out the components of the RCS: [SDL] | [RET] | RDL
    and return all three. If the optional component is
    not found then it returns None but if keyword is
    found nothing else then returns empty.

    The fourth result returned is if there is remaining characters
    in the original RCS then its returned.

    Returns info in fifth result
    """

    def _parse(self, rcs):
        if rcs is None:
            return None, None, None, None, "failed: RCS is none"
        elif rcs == "":
            return None, None, None, None, "failed: RCS is empty"

        rcsp = re.search(" ", rcs)
        if rcsp is not None:
            return None, None, None, None, "failed: space character found in RCS"

        SDL, rcs_next, msg = self._parse_SDL(rcs)
        if SDL is not None and len(SDL) <= 0:
            return None, None, None, None, f"failed: SDL returned but is empty (msg={msg})"
        if rcs_next is None:
            return SDL, None, None, None, f"failed: RCS invalid parse after SDL (none) (msg={msg})"
        elif rcs_next == "":
            return SDL, None, None, None, f"failed: RCS invalid parse after SDL (empty) (msg={msg})"

        RET, rcs_next, msg = self._parse_RET(rcs_next)
        if RET is None:
            return SDL, None, None, None, f"failed: RET is none (msg={msg})"
        elif len(RET) <= 0:
            return SDL, None, None, None, f"failed: RET is empty (msg={msg})"
        elif rcs_next is None:
            return SDL, RET, None, None, f"failed: RCS invalid parse after RET (none) (msg={msg})"
        elif rcs_next == "":
            return SDL, RET, None, None, f"failed: RCS invalid parse after RET (none) (msg={msg})"

        RDL, rcs_next, msg = self._parse_RDL(rcs_next)
        if RDL is None:
            return SDL, RET, None, None, f"failed: RDL is none (msg={msg})"
        elif len(RDL) <= 0:
            return SDL, RET, None, None, f"failed: RDL is empty (msg={msg})"
        elif rcs_next is not None and rcs_next != "":
            return SDL, RET, RDL, None, f"failed: RCS invalid parse after RDL (not empty) (msg={msg})"

        return SDL, RET, RDL, rcs_next, "success"

    """
     Returns true if the RCS provided at object instantiation
     time is a valid RCS value, otherwise it returns false.
    """

    def _valid(self, rcs):
        if rcs is None:
            return False

        # rcs_save = rcs

        SDL, RET, RDL, rcs, rmsg = self._parse(rcs)
        # print("ARIA: remediation configuraton string (RCS) is invalid -- this will prevent remediation
        # to ARIA PI devices from working (rcs={0}:: rmsg={1})".format(rcs_save, rmsg))

        # print("ARIA: remediation configuraton string (RCS) is valid (rcs={0})".format(rcs_save))
        return RDL is not None

    """
    Returns true if the RCS provided at object instantiation
    time is a valid RCS value, otherwise it returns false.
    """

    def valid(self):
        return self._valid(self.rcs)

    """
    Allows setting the RCS string to act on, this will only
    set it if the string is already empty.  Otherwise it
    should use modify.
    """

    def set(self, rcs):
        if self.rcs is None:
            if not self._valid(rcs):
                return False
            self.rcs = rcs
        else:
            return False

        return True

    """
    Allows changing the RCS string after its been previsouly
    set or not.
    """

    def modify(self, rcs):
        if not self._valid(rcs):
            return False

        self.rcs = rcs

        return True

    """
    Assuming the securtiy domain component of the RCS is valid
    then it returns the parsed out security domain component if
    it exists. It will return it as a list of security domain
    object name strings.

    If there is an error in parsing the security domain component
    null is returned.  If it was not provided then "all"
    list is returned.
    """

    def security_domain(self):
        SDL, RET, RDL, rcs, rmsg = self._parse(self.rcs)
        if RDL is None:
            return None, False

        return SDL, True

    """
    Assuming the RCS is valid
    then return the RDL

    If there is an error in parsing the RDL component is
    returned as a NULL.
    """

    def remediation_device_list(self):
        SDL, RET, RDL, rcs, rmsg = self._parse(self.rcs)
        if RDL is None:
            return None, False

        return RDL, True

    """
    Assuming the securtiy domain component of the RCS is valid

    Assuming the RCS is valid
    then return the remediation action instruction.

    If there is an error in parsing the RET component is
    returned as a NULL.
    """

    def remediation_instruction(self):
        SDL, RET, RDL, rcs, rmsg = self._parse(self.rcs)
        if RDL is None:
            return None, False

        return RET, True


class ARIA:
    def __init__(self, sdso_url: str, verify_cert: bool = True):
        self.sdso_url = sdso_url
        self.time_out = 20
        self.verify_cert = verify_cert

    """HELPER FUNCTION"""

    @staticmethod
    def _build_alert_instruction(
        transport_type: str, tti_index: int, aio_index: int, trigger_type: str, trigger_value: int
    ) -> str:
        """Create an alert instruction

        Args:
            transport_type: The type of notification to generate.
                Valid values are 'email', 'SMS', 'syslog' or 'webhook'.
            tti_index: The index of the entry in the transport type table.
            aio_index: The index of the entry in the alert information object table.
            trigger_type: The frequency of the alert. Valid values are 'one-shot', 're-trigger-count',
                're-trigger-timed-ms' or 're-trigger-timed-sec'.
            trigger_value: The threshold that must be met before the alert is triggered.

        Returns: Alert instruction string.

        Raises:
            ValueError: If parameters are out of range or not in the type list.

        """
        transport_type_list = ["email", "SMS", "syslog", "webhook"]

        if transport_type not in transport_type_list:
            raise ValueError(f"Wrong transport_type {transport_type}! Valid values are email, SMS, syslog or webhook")

        if tti_index > 7 or tti_index < 0:
            # This is an ARIA PI Reaper production requirement
            raise ValueError("Transport type info index(tti_index) out of range! Valid value must be in the range [0, 7].")

        if aio_index > 15 or aio_index < 0:
            # This is an ARIA PI Reaper production requirement
            raise ValueError("Alert info object index(aio_index) out of range! Valid value must be in range [0, 15]")

        trigger_type_list = ["one-shot", "re-trigger-count", "re-trigger-timed-ms", "re-trigger-timed-sec"]

        if trigger_type not in trigger_type_list:
            # This is an ARIA PI Reaper production requirement
            raise ValueError(
                f"Wrong trigger_type {trigger_type}! Valid values are one-shot, re-trigger-count, "
                "re-trigger-timed-ms, re-trigger-timed-sec"
            )

        if trigger_value < 1 or trigger_value > 8191:
            # This is an ARIA PI Reaper production requirement
            raise ValueError("Trigger value(trigger_value) out of range! It must be in range [1, 8191]")

        instruction = f"ALERT {transport_type} {tti_index} {aio_index} {trigger_type} {trigger_value}"

        return instruction

    @staticmethod
    def _process_port_range(port_range: str = None) -> str:
        """Validation function for range of ports

        Args:
            port_range: The source or destination port(s). This accepts a
                comma-separated list (e.g., “1, 3”), a range (e.g., “1-3”), or a combination (e.g., “1, 3-5”).

        Returns: The string of port_range.

        Raises:
            ValueError: If port_range is out of range 0-65535 or in wrong format.

        """
        if not port_range:
            port_range = "0-65535"  # default port_range value

        split_port_range = port_range.replace(" ", "").split(",")

        res = ""

        for port in split_port_range:
            if res:
                res = res + ", "

            if "-" in port:
                beg, end = port.replace(" ", "").split("-")

                for j in beg, end:
                    if int(j) < 0 or int(j) > 65535:
                        raise ValueError("Port must be in 0-65535!")

                if int(beg) > int(end):
                    raise ValueError("Wrong port range format!")

                res += beg + " - " + end
            else:
                if int(port) < 0 or int(port) > 65535:
                    raise ValueError("Port must be in 0-65535!")
                res += port

        return res

    @staticmethod
    def _process_ip_address(ip: str) -> str:
        """Validation function for IP address

        Args:
            ip: The IP address and mask of the IP address, in the format <IP_address>/<mask>. If the mask is omitted,
                a value of 32 is used.

        Returns: String of IP address.

        Raises:
            ValueError: If the netmask is out of range or IP address is not expressed in CIDR notation

        """
        netmask = "32"

        ip_str = ip.replace(" ", "")

        if "/" in ip_str:
            ip_addr, netmask = ip_str.split("/")
        else:
            ip_addr = ip_str

        if int(netmask) > 32 or int(netmask) < 1:
            raise ValueError("Subnet mask must be in range [1, 32].")

        ip_addr_split = ip_addr.split(".")
        for syllable in ip_addr_split:
            if int(syllable) < 0 or int(syllable) > 255:
                raise ValueError("Wrong IP format!")
        if len(ip_addr_split) != 4:
            raise ValueError("Wrong IP format!")
        res = ip_addr + "/" + netmask
        return res

    @staticmethod
    def _parse_rcs(rcs):
        """Parse Remediation Configuration String

        Args:
            rcs: Remediation Configuration String.

        Returns:
            sd_list: List of securityDomain Object
            sia_list: List of securityDomain SIA Object

        Raises:
            ParameterError: Raised when Input RCS is not valid.

        """
        rcs = RCS(rcs)
        if not rcs.valid():
            raise ParameterError("Your Input RCS is not valid!")
        sd_list_tuple, sd_list_valid = rcs.security_domain()
        sd_list = []
        if sd_list_valid:
            for element in sd_list_tuple:
                sd_list.append({"SDN": element})

        sia_list_tuple, sia_list_valid = rcs.remediation_device_list()
        sia_list = []
        sd_list = [{"SDN": "all"}]
        if sia_list_valid:
            for element in sia_list_tuple:
                sia_object = {"sia_specification_type": element[0], "sia_specification": element[1]}
                sia_list.append(sia_object)
        return sd_list, sia_list

    @staticmethod
    def _generate_rule_forward_spec(
        rule_name: str,
        logic_block: str,
        rule: str,
        named_rule_action: str,
        sd_list: list,
        sia_list: list,
        instance_id: str = None,
    ) -> dict:
        """Generate rule forward spec for ruleforward API

        Args:
            rule_name: The name of the rule to create.
            logic_block: Parameter used to form named rule data. Examples: '5-tuple', 'src-port', etc.
            rule: Parameter used to form named rule data.
            named_rule_action: Must be 'add' or 'remove'
            instance_id: The instance number of the ARIA PI instance.
            sd_list: List of security domain object.
            sia_list: List of security domain sia object.

        Returns: Dictionary data of named rule.

        """
        instance_id_type = "instance-number"

        if instance_id is None:
            instance_id_type = "all"
            instance_id = ""

        if named_rule_action == "remove":
            rule = ""

        named_rule = f'"name": "{rule_name}", "logic_block": "{logic_block}", "rule": "{rule}"'

        named_rule_distribution = {
            "kind": "NamedRuleDistribution",
            "instance_id": instance_id,
            "instance_id_type": instance_id_type,
            "named_rule": named_rule,
            "named_rule_action": named_rule_action,
            "sd_list": sd_list,
            "sia_list": sia_list,
        }

        rule_forward_spec = {"selector": named_rule_distribution}

        return rule_forward_spec

    def _wait_for_trid(self, trid: str) -> bool:
        """Valid whether the request completed by trid

        Args:
            trid: The request id when you want to adding a rule to ARIA PI Reaper.

        Returns: True if complete, False if not.

        """

        # url to valid the request
        trid_url = self.sdso_url + f"/packetClassification/completion/transaction?PC_TRID={trid}"

        # Use trid of transaction to get if a transaction success

        t0 = time.perf_counter()

        delta = time.perf_counter() - t0

        while delta < 20:
            res = requests.get(trid_url, timeout=self.time_out, verify=self.verify_cert)

            delta = time.perf_counter() - t0

            if res.ok:
                try:
                    tcl_list = res.json().get("tclList")
                except json.JSONDecodeError:
                    raise

                for tcl_entry in tcl_list:
                    if "SUCCESS" in tcl_entry["status"]:
                        return True
                    elif "FAILURE" in tcl_entry["status"]:
                        return False
            time.sleep(1)

        return False

    def _remove_rule(self, rule_name: str, logic_block: str, instance_id: str = None, rcs: str = None) -> dict:
        """Remove rule in the ARIA PI Reaper

        Args:
            rule_name: The name of the rule to create.
            logic_block: Parameter used to form named rule data. Examples: '5-tuple', 'src-port', etc.
            instance_id: The instance number of the ARIA PI instance.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """

        url = self.sdso_url + "/ruleForward"

        headers = {"Content-type": "application/json", "Accept": "text/plain"}

        sd_list, sia_list = self._parse_rcs(rcs)
        data = self._generate_rule_forward_spec(
            rule_name=rule_name,
            logic_block=logic_block,
            rule="no-rule",
            named_rule_action="remove",
            instance_id=instance_id,
            sd_list=sd_list,
            sia_list=sia_list,
        )
        try:
            response = requests.put(url, data=json.dumps(data), headers=headers, timeout=self.time_out, verify=self.verify_cert)
        except requests.exceptions.RequestException:
            raise

        command_state_str = "Failure"
        response_timestamp = None
        ep_res = None

        if response and response.ok:
            response_json = response.json()
            endpoints = response_json.get("endpoints")

            if not endpoints or len(endpoints) == 0:
                command_state_str = "Endpoint matching RCS not found!"
            else:
                command_state_str = "Success"
                for ep in endpoints:
                    trid = ep.get("trid")
                    status = self._wait_for_trid(str(trid))
                    ep["completion"] = status
                    if not status:
                        command_state_str = "Failure"
            response_timestamp = response_json.get("timestamp")
            ep_res = endpoints

        context = {
            "Rule": {"Name": rule_name, "Definition": f"Remove {rule_name}", "RCS": rcs},
            "Status": {"command_state": command_state_str, "timestamp": response_timestamp},
            "Endpoints": ep_res,
        }

        return context

    def _do_request(self, data: dict, rule_name: str, rule: str, rcs: str = None) -> dict:
        """Send a request to ARIA PI Reaper to create a rule

        Args:
            data: Rule Forward Spec data.
            rule_name: Name of the rule.
            rule: String representation of rule.

        Returns: Dictionary context data contains useful response information.

        """
        url = self.sdso_url + "/ruleForward"

        headers = {"Content-type": "application/json", "Accept": "text/plain"}

        data["selector"]["instance_id_type"] = "instance-number"
        data["selector"]["instance_id"] = "0"

        instance_number = 10  # 10 total instances in ARIA PI Reaper

        command_state_str = "Failure"
        response_timestamp = None
        endpoints = None

        try:
            response = requests.put(
                url=url, data=json.dumps(data), headers=headers, timeout=self.time_out, verify=self.verify_cert
            )
        except requests.exceptions.RequestException:
            raise

        failed_endpoints_index = []
        success_endpoints_index = []
        if response and response.ok:
            response_json = response.json()
            endpoints = response_json.get("endpoints")
            response_timestamp = response_json.get("timestamp")
            if endpoints and len(endpoints) > 0:
                for ep_index, ep in enumerate(endpoints):
                    trid = ep.get("trid")
                    status = self._wait_for_trid(str(trid))
                    # Add completion and instance_number in ep field
                    ep["instance_number"] = "0"
                    ep["completion"] = status
                    if status:
                        success_endpoints_index.append(ep_index)
                    else:
                        failed_endpoints_index.append(ep_index)

            # no endpoints matches
            if len(failed_endpoints_index) == 0 and len(success_endpoints_index) == 0:
                command_state_str = "Endpoint matching RCS not found!"
            # rules are created successfully on all endpoints
            elif len(success_endpoints_index) > 0 and len(failed_endpoints_index) == 0:
                command_state_str = "Success"
            # rules are not created successfully on part or all endpoints, should try to forward rules on
            # different instance for the failed endpoints
            else:
                # forward rule to each endpoints by AgentFQN
                command_state_str = "Success"
                for ep_index in failed_endpoints_index:
                    ep = endpoints[ep_index]
                    AgentFQN = ep.get("AgentFQN")
                    temp_forward_data = data.copy()
                    sia_object = {"sia_specification_type": "FQN", "sia_specification": AgentFQN}
                    temp_forward_data["selector"]["sia_list"] = [sia_object]
                    ep_state = False

                    for i in range(1, instance_number):
                        data["selector"]["instance_id"] = str(i)
                        try:
                            ep_response = requests.put(
                                url=url,
                                data=json.dumps(temp_forward_data),
                                headers=headers,
                                timeout=self.time_out,
                                verify=self.verify_cert,
                            )
                            ep_response_json = ep_response.json()
                            if ep_response_json.get("endpoints"):
                                cur_ep = ep_response_json.get("endpoints")[0]
                                cur_trid = cur_ep.get("trid")
                                cur_state = self._wait_for_trid(str(cur_trid))
                                if cur_state:
                                    ep_state = True
                                    break
                        except requests.exceptions.RequestException:
                            pass
                    if not ep_state:
                        command_state_str = "Failure"
                    ep["completion"] = ep_state
                    ep["instance_number"] = i if ep_state else None

        context = {
            "Rule": {"Name": rule_name, "Definition": rule, "RCS": rcs},
            "Status": {"command_state": command_state_str, "timestamp": response_timestamp},
            "Endpoints": endpoints,
        }

        return context

    """SOAR API"""

    def block_conversation(
        self,
        src_ip: str,
        target_ip: str,
        rule_name: str,
        src_port: str = None,
        target_port: str = None,
        protocol: str = None,
        rcs: str = None,
    ) -> dict:
        """Creates a rule that drops all packets matching the specified 5-tuple values.

        Args:
            src_ip: The source IP address.
            target_ip: The destination IP address.
            rule_name: The name of the rule to create.
            src_port: The source port(s). This accepts a comma-separated list (e.g., “1, 3”),
                a range (e.g., “1-3”), or a combination (e.g., “1, 3-5”).
            target_port: The destination port(s). This accepts a comma-separated list (e.g., “1, 3”),
                a range (e.g., “1-3”), or a combination (e.g., “1, 3-5”).
            protocol: The protocol (e.g., TCP) used for the packets.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """
        src_ip = self._process_ip_address(src_ip)

        src_port = self._process_port_range(src_port)

        target_ip = self._process_ip_address(target_ip)

        target_port = self._process_port_range(target_port)

        if not protocol:
            protocol = "HOPOPT-255"  # default protocol is no value provided

        protocol = protocol.upper()

        rule = f"{target_ip} @ {target_port} & {src_ip} @ {src_port} <> {protocol} : DROP, END"

        sd_list, sia_list = self._parse_rcs(rcs)
        data = self._generate_rule_forward_spec(
            rule_name=rule_name, logic_block="5-tuple", rule=rule, named_rule_action="add", sd_list=sd_list, sia_list=sia_list
        )

        return self._do_request(data, rule_name, rule, rcs)

    def unblock_conversation(self, rule_name: str, rcs: str = None) -> dict:
        """Deletes a named rule from the 5-tuple logic block.

            This allows the previously blocked conversation to resume.

        Args:
            rule_name: The name of the rule to delete.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """
        return self._remove_rule(rule_name=rule_name, logic_block="5-tuple", instance_id=None, rcs=rcs)

    def record_conversation(
        self,
        src_ip: str,
        target_ip: str,
        vlan_id: str,
        rule_name: str,
        src_port: str = None,
        target_port: str = None,
        protocol: str = None,
        sia_interface: str = None,
        transport_type: str = None,
        tti_index: str = None,
        aio_index: str = None,
        trigger_type: str = None,
        trigger_value: str = None,
        rcs: str = None,
    ) -> dict:
        """Creates a rule that redirects a conversation matching 5-tuple values
            to the Packet Recorder and generates an alert.

            Packets are tagged with the VID specified in the command.

        Args:
            src_ip: The source IP address.
            target_ip: The destination IP address.
            vlan_id: The VLAN ID your network switch uses to forward packets to the Packet Recorder.
            rule_name: The name of the rule to create.
            src_port: The source port(s). This accepts a comma-separated list (e.g., “1, 3”),
                a range (e.g., “1-3”), or a combination (e.g., “1, 3-5”).
            target_port: The destination port(s). This accepts a comma-separated list (e.g., “1, 3”),
                a range (e.g., “1-3”), or a combination (e.g., “1, 3-5”).
            protocol: The protocol (e.g., TCP) used for the packets.
            sia_interface: The letter of the interface on the SIA used for forwarding packets.
                If omitted, interface A is used.
            transport_type: The type of notification to generate. Valid values are: email, syslog.
            tti_index: The index of the entry in the transport type table.
            aio_index: The index of the entry in the alert information object table.
            trigger_type: The frequency of the alert. Valid values are 'one-shot', 're-trigger-count',
                're-trigger-timed-ms' or 're-trigger-timed-sec'.
            trigger_value: The threshold that must be met before the alert is triggered.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        Raises:
            ParameterError: Raised when transport_type is used but one or more parameters in tti_index,
                aio_index, trigger_type and trigger_value are missing.
        """
        if sia_interface is None or sia_interface != "B":
            sia_interface = "A"  # SIA use labels A and B to select its interface (data port), default to A.

        src_ip = self._process_ip_address(src_ip)

        src_port = self._process_port_range(src_port)

        target_ip = self._process_ip_address(target_ip)

        target_port = self._process_port_range(target_port)

        if not protocol:
            protocol = "HOPOPT-255"

        protocol = protocol.upper()

        rule = f"{target_ip} @ {target_port} & {src_ip} @ {src_port} <> {protocol} : REDIRECT-VLAN {sia_interface} {vlan_id}"
        if transport_type is not None:
            if tti_index is None or aio_index is None or trigger_type is None or trigger_value is None:
                raise ParameterError(
                    f"Please provide tti_index, aio_index, trigger_type and trigger_value to "
                    f"use {transport_type} to send an alert."
                )

            rule += ", "

            rule += self._build_alert_instruction(
                transport_type, int(tti_index), int(aio_index), trigger_type, int(trigger_value)
            )

        rule += ", END"

        sd_list, sia_list = self._parse_rcs(rcs)
        data = self._generate_rule_forward_spec(
            rule_name=rule_name, logic_block="5-tuple", rule=rule, named_rule_action="add", sd_list=sd_list, sia_list=sia_list
        )
        return self._do_request(data, rule_name, rule, rcs)

    def stop_recording_conversation(self, rule_name: str, rcs: str = None) -> dict:
        """Removes the named rule from the 5-tuple block.

            This stops redirecting traffic to the Packet Recorder.

        Args:
            rule_name: The name of the rule to delete.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """
        return self._remove_rule(rule_name=rule_name, logic_block="5-tuple", instance_id=None, rcs=rcs)

    def alert_conversation(
        self,
        src_ip: str,
        target_ip: str,
        rule_name: str,
        transport_type: str,
        tti_index: str,
        aio_index: str,
        trigger_type: str,
        trigger_value: str,
        src_port: str = None,
        target_port: str = None,
        protocol: str = None,
        rcs: str = None,
    ) -> dict:
        """Adds a rule that generates an alert when a conversation matching the specified 5-tuple values is detected.

        Args:
            src_ip: The source IP address.
            target_ip: The destination IP address.
            rule_name: The name of the rule to create.
            transport_type: The type of notification to generate. Valid values are: email, syslog.
            tti_index: The index of the entry in the transport type table.
            aio_index: The index of the entry in the alert information object table.
            trigger_type: The frequency of the alert. Valid values are 'one-shot', 're-trigger-count',
                're-trigger-timed-ms' or 're-trigger-timed-sec'.
            trigger_value: The threshold that must be met before the alert is triggered.
            src_port: The source port(s). This accepts a comma-separated list (e.g., “1, 3”), a range (e.g., “1-3”),
                or a combination (e.g., “1, 3-5”).
            target_port: The destination port(s). This accepts a comma-separated list (e.g., “1, 3”),
                a range (e.g., “1-3”), or a combination (e.g., “1, 3-5”).
            protocol: The protocol (e.g., TCP) used for the packets.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """
        src_ip = self._process_ip_address(src_ip)

        src_port = self._process_port_range(src_port)

        target_ip = self._process_ip_address(target_ip)

        target_port = self._process_port_range(target_port)

        if not protocol:
            protocol = "HOPOPT-255"  # default protocol

        protocol = protocol.upper()

        rule = f"{target_ip} @ {target_port} & {src_ip} @ {src_port} <> {protocol} : "

        rule += (
            self._build_alert_instruction(transport_type, int(tti_index), int(aio_index), trigger_type, int(trigger_value))
            + ", END"
        )
        sd_list, sia_list = self._parse_rcs(rcs)
        data = self._generate_rule_forward_spec(
            rule_name=rule_name, logic_block="5-tuple", rule=rule, named_rule_action="add", sd_list=sd_list, sia_list=sia_list
        )

        return self._do_request(data, rule_name, rule, rcs)

    def mute_alert_conversation(self, rule_name: str, rcs: str = None) -> dict:
        """Removes a named rule from the 5-tuple logic block, disabling the alerts.

        Args:
            rule_name: The name of the rule to delete.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """
        return self._remove_rule(rule_name=rule_name, logic_block="5-tuple", instance_id=None, rcs=rcs)

    def block_dest_port(self, port_range: str, rule_name: str, rcs: str) -> dict:
        """Creates a rule that blocks packets destined for one or more specific ports.

        Args:
            port_range: The destination port(s). This accepts a comma-separated list (e.g., “1, 3”),
                a range (e.g., “1-3”), or a combination (e.g., “1, 3-5”).
            rule_name: The name of the rule to create.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """
        rule = f"{self._process_port_range(port_range)}: DROP, END"
        sd_list, sia_list = self._parse_rcs(rcs)
        data = self._generate_rule_forward_spec(
            rule_name=rule_name, logic_block="dst-port", rule=rule, named_rule_action="add", sd_list=sd_list, sia_list=sia_list
        )
        return self._do_request(data, rule_name, rule, rcs)

    def unblock_dest_port(self, rule_name: str, rcs: str = None) -> dict:
        """Removes a named rule from the destination port logic block.

            This allows the previously blocked traffic to resume.

        Args:
            rule_name: The name of the rule to delete.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """
        return self._remove_rule(rule_name=rule_name, logic_block="dst-port", instance_id=None, rcs=rcs)

    def record_dest_port(
        self,
        port_range: str,
        vlan_id: str,
        rule_name: str,
        sia_interface: str = None,
        transport_type: str = None,
        tti_index: str = None,
        aio_index: str = None,
        trigger_type: str = None,
        trigger_value: str = None,
        rcs: str = None,
    ) -> dict:
        """Adds a rule that redirects traffic destined for one or more ports to the Packet Recorder
            and generates an alert.

            Packets are tagged with the VID specified in the command.

        Args:
            port_range: The destination port(s). This accepts a comma-separated list (e.g., “1, 3”),
                a range (e.g., “1-3”), or a combination (e.g., “1, 3-5”).
            vlan_id: The VLAN ID your network switch uses to forward packets to the Packet Recorder.
            rule_name: The name of the rule to create.
            sia_interface: The letter of the interface on the SIA used for forwarding packets.
                If omitted, interface A is used.
            transport_type: The type of notification to generate. Valid values are: email, syslog.
            tti_index: The index of the entry in the transport type table.
            aio_index: The index of the entry in the alert information object table.
            trigger_type: The frequency of the alert. Valid values are 'one-shot', 're-trigger-count',
                're-trigger-timed-ms' or 're-trigger-timed-sec'.
            trigger_value: The threshold that must be met before the alert is triggered.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        Raises:
            ParameterError: Raised when transport_type is used but one or more parameters in tti_index,
                aio_index, trigger_type and trigger_value are missing.
        """
        if sia_interface is None or sia_interface != "B":
            sia_interface = "A"  # SIA use labels A and B to select its interface (data port), default to A.

        rule = f"{self._process_port_range(port_range)}: REDIRECT-VLAN {sia_interface} {vlan_id}"

        if transport_type is not None:
            if tti_index is None or aio_index is None or trigger_type is None or trigger_value is None:
                raise ParameterError(
                    f"Please provide tti_index, aio_index, trigger_type and trigger_value "
                    f"to use {transport_type} to send an alert."
                )

            rule += ", "

            rule += self._build_alert_instruction(
                transport_type, int(tti_index), int(aio_index), trigger_type, int(trigger_value)
            )
        rule += ", END"

        sd_list, sia_list = self._parse_rcs(rcs)
        data = self._generate_rule_forward_spec(
            rule_name=rule_name, logic_block="dst-port", rule=rule, named_rule_action="add", sd_list=sd_list, sia_list=sia_list
        )
        return self._do_request(data, rule_name, rule, rcs)

    def stop_recording_dest_port(self, rule_name: str, rcs: str = None) -> dict:
        """Removes a named rule from the destination port logic block.

            This stops redirecting traffic to the Packet Recorder.

        Args:
            rule_name: The name of the rule to delete.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """

        return self._remove_rule(rule_name=rule_name, logic_block="dst-port", instance_id=None, rcs=rcs)

    def alert_dest_port(
        self,
        port_range: str,
        rule_name: str,
        transport_type: str,
        tti_index: str,
        aio_index: str,
        trigger_type: str,
        trigger_value: str,
        rcs: str = None,
    ) -> dict:
        """Creates a rule that generates an alert when traffic destined for one or more ports is detected.

        Args:
            port_range: The destination port(s). This accepts a comma-separated list (e.g., “1, 3”),
                a range (e.g., “1-3”), or a combination (e.g., “1, 3-5”).
            rule_name: The name of the rule to create.
            transport_type: The type of notification to generate. Valid values are: email, syslog.
            tti_index: The index of the entry in the transport type table.
            aio_index: The index of the entry in the alert information object table.
            trigger_type: The frequency of the alert. Valid values are 'one-shot', 're-trigger-count',
                're-trigger-timed-ms' or 're-trigger-timed-sec'.
            trigger_value: The threshold that must be met before the alert is triggered.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """
        rule = f"{self._process_port_range(port_range)}: "

        rule += (
            self._build_alert_instruction(transport_type, int(tti_index), int(aio_index), trigger_type, int(trigger_value))
            + ", END"
        )

        sd_list, sia_list = self._parse_rcs(rcs)
        data = self._generate_rule_forward_spec(
            rule_name=rule_name, logic_block="dst-port", rule=rule, named_rule_action="add", sd_list=sd_list, sia_list=sia_list
        )
        return self._do_request(data, rule_name, rule, rcs)

    def mute_alert_dest_port(self, rule_name: str, rcs: str = None) -> dict:
        """Removes a named rule from the destination port logic block, disabling the alerts.

        Args:
            rule_name: The name of the rule to delete.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """
        return self._remove_rule(rule_name=rule_name, logic_block="dst-port", instance_id=None, rcs=rcs)

    def block_src_port(self, port_range: str, rule_name: str, rcs: str = None) -> dict:
        """Adds a rule that blocks packets originating from one or more specific ports.

        Args:
            port_range: The source port(s). This accepts a comma-separated list (e.g., “1, 3”),
                a range (e.g., “1-3”), or a combination (e.g., “1, 3-5”).
            rule_name: The name of the rule to create.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """
        rule = f"{self._process_port_range(port_range)}: DROP, END"
        sd_list, sia_list = self._parse_rcs(rcs)
        data = self._generate_rule_forward_spec(
            rule_name=rule_name, logic_block="src-port", rule=rule, named_rule_action="add", sd_list=sd_list, sia_list=sia_list
        )
        return self._do_request(data, rule_name, rule, rcs)

    def unblock_src_port(self, rule_name: str, rcs: str = None) -> dict:
        """Removes a named rule from the source port logic block.

            This allows the previously blocked traffic to resume.

        Args:
            rule_name: The name of the rule to delete.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """
        return self._remove_rule(rule_name=rule_name, logic_block="src-port", instance_id=None, rcs=rcs)

    def record_src_port(
        self,
        port_range: str,
        vlan_id: str,
        rule_name: str,
        sia_interface: str = None,
        transport_type: str = None,
        tti_index: str = None,
        aio_index: str = None,
        trigger_type: str = None,
        trigger_value: str = None,
        rcs: str = None,
    ) -> dict:
        """Adds a rule that redirects traffic originating from one or more ports to
            the Packet Recorder and generates an alert.

            Packets are tagged with the VID specified in the command.

        Args:
            port_range: The source port(s). This accepts a comma-separated list (e.g., “1, 3”),
                a range (e.g., “1-3”), or a combination (e.g., “1, 3-5”).
            vlan_id: The VLAN ID your network switch uses to forward packets to the Packet Recorder.
            rule_name: The name of the rule to create.
            sia_interface: The letter of the interface on the SIA used for forwarding packets.
                If omitted, interface A is used.
            transport_type: The type of notification to generate. Valid values are: email, syslog.
            tti_index: The index of the entry in the transport type table.
            aio_index: The index of the entry in the alert information object table.
            trigger_type: The frequency of the alert. Valid values are 'one-shot', 're-trigger-count',
                're-trigger-timed-ms' or 're-trigger-timed-sec'.
            trigger_value: The threshold that must be met before the alert is triggered.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        Raises:
            ParameterError: Raised when transport_type is used but one or more parameters in tti_index,
                aio_index, trigger_type and trigger_value are missing.

        """
        if sia_interface is None or sia_interface != "B":
            sia_interface = "A"  # SIA use labels A and B to select its interface (data port), default to A.

        rule = f"{self._process_port_range(port_range)}: REDIRECT-VLAN {sia_interface} {vlan_id}"

        if transport_type is not None:
            if tti_index is None or aio_index is None or trigger_type is None or trigger_value is None:
                raise ParameterError(
                    f"Please provide tti_index, aio_index, trigger_type and trigger_value "
                    f"to use {transport_type} to send an alert."
                )

            rule += ", "

            rule += self._build_alert_instruction(
                transport_type, int(tti_index), int(aio_index), trigger_type, int(trigger_value)
            )

        rule += ", END"
        sd_list, sia_list = self._parse_rcs(rcs)
        data = self._generate_rule_forward_spec(
            rule_name=rule_name, logic_block="src-port", rule=rule, named_rule_action="add", sd_list=sd_list, sia_list=sia_list
        )
        return self._do_request(data, rule_name, rule, rcs)

    def stop_recording_src_port(self, rule_name: str, rcs: str = None):
        """Removes a named rule from the source port logic block.

            This stops redirecting traffic to the Packet Recorder.

        Args:
            rule_name: The name of the rule to delete.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """

        return self._remove_rule(rule_name=rule_name, logic_block="src-port", instance_id=None, rcs=rcs)

    def alert_src_port(
        self,
        port_range: str,
        rule_name: str,
        transport_type: str,
        tti_index: str,
        aio_index: str,
        trigger_type: str,
        trigger_value: str,
        rcs: str = None,
    ) -> dict:
        """Creates a rule that generates an alert when traffic originating from one or more ports is detected.

        Args:
            port_range: The source port(s). This accepts a comma-separated list (e.g., “1, 3”),
                a range (e.g., “1-3”), or a combination (e.g., “1, 3-5”).
            rule_name: The name of the rule to create.
            transport_type: The type of notification to generate. Valid values are: email, syslog.
            tti_index: The index of the entry in the transport type table.
            aio_index: The index of the entry in the alert information object table.
            trigger_type: The frequency of the alert. Valid values are 'one-shot', 're-trigger-count',
                're-trigger-timed-ms' or 're-trigger-timed-sec'.
            trigger_value: The threshold that must be met before the alert is triggered.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """
        rule = f"{self._process_port_range(port_range)}: "

        rule += (
            self._build_alert_instruction(transport_type, int(tti_index), int(aio_index), trigger_type, int(trigger_value))
            + ", END"
        )
        sd_list, sia_list = self._parse_rcs(rcs)
        data = self._generate_rule_forward_spec(
            rule_name=rule_name, logic_block="src-port", rule=rule, named_rule_action="add", sd_list=sd_list, sia_list=sia_list
        )
        return self._do_request(data, rule_name, rule, rcs)

    def mute_alert_src_port(self, rule_name: str, rcs: str = None) -> dict:
        """Removes a named rule from the source port logic block, disabling the alerts.

        Args:
            rule_name: The name of the rule to delete.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """
        return self._remove_rule(rule_name=rule_name, logic_block="src-port", instance_id=None, rcs=rcs)

    def block_dest_subnet(self, target_ip: str, rule_name: str, rcs: str = None) -> dict:
        """Adds a rule that blocks packets destined for a specific IP address or range of IP addresses.

        Args:
            target_ip: The IP address and mask of the destination IP address(es), in the format <IP_address>/<mask>.
                If the mask is omitted, a value of 32 is used.
            rule_name: The name of the rule to create.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """
        rule = f"{self._process_ip_address(target_ip)}: DROP, END"
        sd_list, sia_list = self._parse_rcs(rcs)
        data = self._generate_rule_forward_spec(
            rule_name=rule_name, logic_block="dst-subnet", rule=rule, named_rule_action="add", sd_list=sd_list, sia_list=sia_list
        )
        return self._do_request(data, rule_name, rule, rcs)

    def unblock_dest_subnet(self, rule_name: str, rcs: str = None) -> dict:
        """Removes a named rule from the destination subnet logic block.

            This allows the previously blocked traffic to resume.

        Args:
            rule_name: The name of the rule to delete.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """
        return self._remove_rule(rule_name=rule_name, logic_block="dst-subnet", instance_id=None, rcs=rcs)

    def record_dest_subnet(
        self,
        target_ip: str,
        vlan_id: str,
        rule_name: str,
        sia_interface: str = None,
        transport_type: str = None,
        tti_index: str = None,
        aio_index: str = None,
        trigger_type: str = None,
        trigger_value: str = None,
        rcs: str = None,
    ) -> dict:
        """Creates a rule that redirects traffic destined for a specific IP address or
            range of IP addresses to the Packet Recorder and generates an alert.

            Packets are tagged with the VID specified in the command.

        Args:
            target_ip: The IP address and mask of the destination IP address(es), in the format <IP_address>/<mask>.
                If the mask is omitted, a value of 32 is used.
            vlan_id: The VLAN ID your network switch uses to forward packets to the Packet Recorder.
            rule_name: The name of the rule to create.
            sia_interface: The letter of the interface on the SIA used for forwarding packets.
                If omitted, interface A is used.
            transport_type: The type of notification to generate. Valid values are: email, syslog.
            tti_index: The index of the entry in the transport type table.
            aio_index: The index of the entry in the alert information object table.
            trigger_type: The frequency of the alert. Valid values are 'one-shot', 're-trigger-count',
                're-trigger-timed-ms' or 're-trigger-timed-sec'.
            trigger_value: The threshold that must be met before the alert is triggered.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        Raises:
            ParameterError: Raised when transport_type is used but one or more parameters in tti_index,
                aio_index, trigger_type and trigger_value are missing.

        """

        if sia_interface is None or sia_interface != "B":
            sia_interface = "A"  # SIA use labels A and B to select its interface (data port), default to A.

        rule = f"{self._process_ip_address(target_ip)}: REDIRECT-VLAN {sia_interface} {vlan_id}"

        if transport_type is not None:
            if tti_index is None or aio_index is None or trigger_type is None or trigger_value is None:
                raise ParameterError(
                    f"Please provide tti_index, aio_index, trigger_type and trigger_value "
                    f"to use {transport_type} to send an alert."
                )

            rule += ", "

            rule += self._build_alert_instruction(
                transport_type, int(tti_index), int(aio_index), trigger_type, int(trigger_value)
            )
        rule += ", END"
        sd_list, sia_list = self._parse_rcs(rcs)
        data = self._generate_rule_forward_spec(
            rule_name=rule_name, logic_block="dst-subnet", rule=rule, named_rule_action="add", sd_list=sd_list, sia_list=sia_list
        )
        return self._do_request(data, rule_name, rule, rcs)

    def stop_recording_dest_subnet(self, rule_name: str, rcs: str = None) -> dict:
        """Removes a named rule from the destination subnet logic block.

            This stops redirecting traffic to the Packet Recorder.

        Args:
            rule_name: The name of the rule to delete.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """

        return self._remove_rule(rule_name=rule_name, logic_block="dst-subnet", instance_id=None, rcs=rcs)

    def alert_dest_subnet(
        self,
        target_ip: str,
        rule_name: str,
        transport_type: str,
        tti_index: str,
        aio_index: str,
        trigger_type: str,
        trigger_value: str,
        rcs: str = None,
    ) -> dict:
        """Creates a rule that generates an alert when traffic destined for
            a specific IP address or range of IP addresses is detected.

        Args:
            target_ip: The IP address and mask of the destination IP address(es), in the format <IP_address>/<mask>.
                If the mask is omitted, a value of 32 is used.
            rule_name: The name of the rule to create.
            transport_type: The type of notification to generate. Valid values are: email, syslog.
            tti_index: The index of the entry in the transport type table.
            aio_index: The index of the entry in the alert information object table.
            trigger_type: The frequency of the alert. Valid values are 'one-shot', 're-trigger-count',
                're-trigger-timed-ms' or 're-trigger-timed-sec'.
            trigger_value: The threshold that must be met before the alert is triggered.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """
        rule = f"{self._process_ip_address(target_ip)}: "

        rule += (
            self._build_alert_instruction(transport_type, int(tti_index), int(aio_index), trigger_type, int(trigger_value))
            + ", END"
        )
        sd_list, sia_list = self._parse_rcs(rcs)
        data = self._generate_rule_forward_spec(
            rule_name=rule_name, logic_block="dst-subnet", rule=rule, named_rule_action="add", sd_list=sd_list, sia_list=sia_list
        )
        return self._do_request(data, rule_name, rule, rcs)

    def mute_alert_dest_subnet(self, rule_name: str, rcs: str = None) -> dict:
        """Removes a named rule from the destination subnet logic block, disabling the alerts.

        Args:
            rule_name: The name of the rule to delete.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """
        return self._remove_rule(rule_name=rule_name, logic_block="dst-subnet", instance_id=None, rcs=rcs)

    def block_src_subnet(self, src_ip: str, rule_name: str, rcs: str = None) -> dict:
        """Adds a rule that blocks packets originating from a specific IP address or range of IP addresses.

        Args:
            src_ip: The IP address and mask of the source IP address(es), in the format <IP_address>/<mask>.
                If the mask is omitted, a value of 32 is used.
            rule_name: The name of the rule to create.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """
        rule = f"{self._process_ip_address(src_ip)}: DROP, END"
        sd_list, sia_list = self._parse_rcs(rcs)
        data = self._generate_rule_forward_spec(
            rule_name=rule_name, logic_block="src-subnet", rule=rule, named_rule_action="add", sd_list=sd_list, sia_list=sia_list
        )
        return self._do_request(data, rule_name, rule, rcs)

    def unblock_src_subnet(self, rule_name: str, rcs: str = None) -> dict:
        """Removes a named rule from the source subnet logic block.

            This allows the previously blocked traffic to resume.

        Args:
            rule_name: The name of the rule to delete.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """
        return self._remove_rule(rule_name=rule_name, logic_block="src-subnet", instance_id=None, rcs=rcs)

    def record_src_subnet(
        self,
        src_ip: str,
        vlan_id: str,
        rule_name: str,
        sia_interface: str = None,
        transport_type: str = None,
        tti_index: str = None,
        aio_index: str = None,
        trigger_type: str = None,
        trigger_value: str = None,
        rcs: str = None,
    ) -> dict:
        """Creates a rule that redirects traffic originating from one or more specific IP addresses
            to the Packet Recorder and generates an alert.

            Packets are tagged with the VID specified in the command.

        Args:
            src_ip: The IP address and mask of the source IP address(es), in the format <IP_address>/<mask>.
                If the mask is omitted, a value of 32 is used.
            vlan_id: The VLAN ID your network switch uses to forward packets to the Packet Recorder.
            rule_name: The name of the rule to create.
            sia_interface: The letter of the interface on the SIA used for forwarding packets.
                If omitted, interface A is used.
            transport_type: The type of notification to generate. Valid values are: email, syslog.
            tti_index: The index of the entry in the transport type table.
            aio_index: The index of the entry in the alert information object table.
            trigger_type: The frequency of the alert. Valid values are 'one-shot', 're-trigger-count',
                're-trigger-timed-ms' or 're-trigger-timed-sec'.
            trigger_value: The threshold that must be met before the alert is triggered.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        Raises:
            ParameterError: Raised when transport_type is used but one or more parameters in tti_index,
                aio_index, trigger_type and trigger_value are missing.

        """

        if sia_interface is None or sia_interface != "B":
            sia_interface = "A"  # SIA use labels A and B to select its interface (data port), default to A.

        rule = f"{self._process_ip_address(src_ip)}: REDIRECT-VLAN {sia_interface} {vlan_id}"

        if transport_type is not None:
            if tti_index is None or aio_index is None or trigger_type is None or trigger_value is None:
                raise ParameterError(
                    f"Please provide tti_index, aio_index, trigger_type and trigger_value "
                    f"to use {transport_type} to send an alert."
                )
            rule += ", "

            rule += self._build_alert_instruction(
                transport_type, int(tti_index), int(aio_index), trigger_type, int(trigger_value)
            )

        rule += ", END"
        sd_list, sia_list = self._parse_rcs(rcs)
        data = self._generate_rule_forward_spec(
            rule_name=rule_name, logic_block="src-subnet", rule=rule, named_rule_action="add", sd_list=sd_list, sia_list=sia_list
        )

        return self._do_request(data, rule_name, rule, rcs)

    def stop_recording_src_subnet(self, rule_name: str, rcs: str = None) -> dict:
        """Removes a named rule from the source subnet logic block.

            This stops redirecting traffic to the Packet Recorder.

        Args:
            rule_name: The name of the rule to delete.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """
        return self._remove_rule(rule_name=rule_name, logic_block="src-subnet", instance_id=None, rcs=rcs)

    def alert_src_subnet(
        self,
        src_ip: str,
        rule_name: str,
        transport_type: str,
        tti_index: str,
        aio_index: str,
        trigger_type: str,
        trigger_value: str,
        rcs: str = None,
    ) -> dict:
        """Adds a rule that generates an alert when traffic originating from a specific IP address
            or range of IP addresses is detected.

        Args:
            src_ip: The IP address and mask of the source IP address(es), in the format <IP_address>/<mask>.
                If the mask is omitted, a value of 32 is used.
            rule_name: The name of the rule to create.
            transport_type: The type of notification to generate. Valid values are: email, syslog.
            tti_index: The index of the entry in the transport type table.
            aio_index: The index of the entry in the alert information object table.
            trigger_type: The frequency of the alert. Valid values are 'one-shot', 're-trigger-count',
                're-trigger-timed-ms' or 're-trigger-timed-sec'.
            trigger_value: The threshold that must be met before the alert is triggered.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """
        rule = f"{self._process_ip_address(src_ip)}: "

        rule += (
            self._build_alert_instruction(transport_type, int(tti_index), int(aio_index), trigger_type, int(trigger_value))
            + ", END"
        )
        sd_list, sia_list = self._parse_rcs(rcs)
        data = self._generate_rule_forward_spec(
            rule_name=rule_name, logic_block="src-subnet", rule=rule, named_rule_action="add", sd_list=sd_list, sia_list=sia_list
        )
        return self._do_request(data, rule_name, rule, rcs)

    def mute_alert_src_subnet(self, rule_name: str, rcs: str = None) -> dict:
        """Removes a named rule from the source subnet logic block, disabling the alerts.

        Args:
            rule_name: The name of the rule to delete.
            rcs: Remediation Configuration String.

        Returns: Dictionary context data contains useful response information.

        """
        return self._remove_rule(rule_name=rule_name, logic_block="src-subnet", instance_id=None, rcs=rcs)


""" HELPER FUNCTIONS """


def func_call(instance: ARIA, func_name: str, command_name: str, demisto_arguments: list, args: dict):
    """Helper function used to call different demisto command

    Args:
        instance: An ARIA instance.
        func_name: Name of the functions in the ARIA class.
        command_name: Related demisto command name.
        demisto_arguments: List of arguments name in the right order.
        args: Input of demisto arguments dict.

    """
    arguments_value = []
    for arg in demisto_arguments:
        value = args.get(arg)  # get values from demisto command
        arguments_value.append(value)

    context_entry = getattr(instance, func_name)(*tuple(arguments_value))  # get returned tuple

    table_header = ["Rule", "Status", "Endpoints"]

    context_name = func_name.title().replace("_", "")

    ec = {f"Aria.{context_name}(val.name && val.name == obj.name)": context_entry}

    readable_output = tableToMarkdown(command_name, context_entry, table_header)

    return readable_output, ec


""" COMMAND FUNCTION """


def block_conversation_command(instance, args):
    demisto_arguments = ["src_ip", "target_ip", "rule_name", "src_port", "target_port", "protocol", "rcs"]
    return func_call(instance, "block_conversation", "aria-block-conversation", demisto_arguments, args)


def unblock_conversation_command(instance, args):
    demisto_arguments = ["rule_name", "rcs"]
    return func_call(instance, "unblock_conversation", "aria-unblock-conversation", demisto_arguments, args)


def record_conversation_command(instance, args):
    demisto_arguments = [
        "src_ip",
        "target_ip",
        "vlan_id",
        "rule_name",
        "src_port",
        "target_port",
        "protocol",
        "sia_interface",
        "transport_type",
        "tti_index",
        "aio_index",
        "trigger_type",
        "trigger_value",
        "rcs",
    ]
    return func_call(instance, "record_conversation", "aria-record-conversation", demisto_arguments, args)


def stop_recording_conversation_command(instance, args):
    demisto_arguments = ["rule_name", "rcs"]
    return func_call(instance, "stop_recording_conversation", "aria-stop-recording-conversation", demisto_arguments, args)


def alert_conversation_command(instance, args):
    demisto_arguments = [
        "src_ip",
        "target_ip",
        "rule_name",
        "transport_type",
        "tti_index",
        "aio_index",
        "trigger_type",
        "trigger_value",
        "src_port",
        "target_port",
        "protocol",
        "rcs",
    ]
    return func_call(instance, "alert_conversation", "aria-alert-conversation", demisto_arguments, args)


def mute_alert_conversation_command(instance, args):
    demisto_arguments = ["rule_name", "rcs"]
    return func_call(instance, "mute_alert_conversation", "aria-mute-alert-conversation", demisto_arguments, args)


def block_dest_port_command(instance, args):
    demisto_arguments = ["port_range", "rule_name", "rcs"]
    return func_call(instance, "block_dest_port", "aria-block-dest-port", demisto_arguments, args)


def unblock_dest_port_command(instance, args):
    demisto_arguments = ["rule_name", "rcs"]
    return func_call(instance, "unblock_dest_port", "aria-unblock-dest-port", demisto_arguments, args)


def record_dest_port_command(instance, args):
    demisto_arguments = [
        "port_range",
        "vlan_id",
        "rule_name",
        "sia_interface",
        "transport_type",
        "tti_index",
        "aio_index",
        "trigger_type",
        "trigger_value",
        "rcs",
    ]
    return func_call(instance, "record_dest_port", "aria-record-dest-port", demisto_arguments, args)


def stop_recording_dest_port_command(instance, args):
    demisto_arguments = ["rule_name", "rcs"]
    return func_call(instance, "stop_recording_dest_port", "aria-stop-recording-dest-port", demisto_arguments, args)


def alert_dest_port_command(instance, args):
    demisto_arguments = [
        "port_range",
        "rule_name",
        "transport_type",
        "tti_index",
        "aio_index",
        "trigger_type",
        "trigger_value",
        "rcs",
    ]
    return func_call(instance, "alert_dest_port", "aria-alert-dest-port", demisto_arguments, args)


def mute_alert_dest_port_command(instance, args):
    demisto_arguments = ["rule_name", "rcs"]
    return func_call(instance, "mute_alert_dest_port", "aria-mute-alert-dest-port", demisto_arguments, args)


def block_src_port_command(instance, args):
    demisto_arguments = ["port_range", "rule_name", "rcs"]
    return func_call(instance, "block_src_port", "aria-block-src-port", demisto_arguments, args)


def unblock_src_port_command(instance, args):
    demisto_arguments = ["rule_name", "rcs"]
    return func_call(instance, "unblock_src_port", "aria-unblock-src-port", demisto_arguments, args)


def record_src_port_command(instance, args):
    demisto_arguments = [
        "port_range",
        "vlan_id",
        "rule_name",
        "sia_interface",
        "transport_type",
        "tti_index",
        "aio_index",
        "trigger_type",
        "trigger_value",
        "rcs",
    ]
    return func_call(instance, "record_src_port", "aria-record-src-port", demisto_arguments, args)


def stop_recording_src_port_command(instance, args):
    demisto_arguments = ["rule_name", "rcs"]
    return func_call(instance, "stop_recording_src_port", "aria-stop-recording-src-port", demisto_arguments, args)


def alert_src_port_command(instance, args):
    demisto_arguments = [
        "port_range",
        "rule_name",
        "transport_type",
        "tti_index",
        "aio_index",
        "trigger_type",
        "trigger_value",
        "rcs",
    ]
    return func_call(instance, "alert_src_port", "aria-alert-src-port", demisto_arguments, args)


def mute_alert_src_port_command(instance, args):
    demisto_arguments = ["rule_name", "rcs"]
    return func_call(instance, "mute_alert_src_port", "aria-mute-alert-src-port", demisto_arguments, args)


def block_dest_subnet_command(instance, args):
    demisto_arguments = ["target_ip", "rule_name", "rcs"]
    return func_call(instance, "block_dest_subnet", "aria-block-dest-subnet", demisto_arguments, args)


def unblock_dest_subnet_command(instance, args):
    demisto_arguments = ["rule_name", "rcs"]
    return func_call(instance, "unblock_dest_subnet", "aria-unblock-dest-subnet", demisto_arguments, args)


def record_dest_subnet_command(instance, args):
    demisto_arguments = [
        "target_ip",
        "vlan_id",
        "rule_name",
        "sia_interface",
        "transport_type",
        "tti_index",
        "aio_index",
        "trigger_type",
        "trigger_value",
        "rcs",
    ]
    return func_call(instance, "record_dest_subnet", "aria-record-dest-subnet", demisto_arguments, args)


def stop_recording_dest_subnet_command(instance, args):
    demisto_arguments = ["rule_name", "rcs"]
    return func_call(instance, "stop_recording_dest_subnet", "aria-stop-recording-dest-subnet", demisto_arguments, args)


def alert_dest_subnet_command(instance, args):
    demisto_arguments = [
        "target_ip",
        "rule_name",
        "transport_type",
        "tti_index",
        "aio_index",
        "trigger_type",
        "trigger_value",
        "rcs",
    ]
    return func_call(instance, "alert_dest_subnet", "aria-alert-dest-subnet", demisto_arguments, args)


def mute_alert_dest_subnet_command(instance, args):
    demisto_arguments = ["rule_name", "rcs"]
    return func_call(instance, "mute_alert_dest_subnet", "aria-mute-alert-dest-subnet", demisto_arguments, args)


def block_src_subnet_command(instance, args):
    demisto_arguments = ["src_ip", "rule_name", "rcs"]
    return func_call(instance, "block_src_subnet", "aria-block-src-subnet", demisto_arguments, args)


def unblock_src_subnet_command(instance, args):
    demisto_arguments = ["rule_name", "rcs"]
    return func_call(instance, "unblock_src_subnet", "aria-unblock-src-subnet", demisto_arguments, args)


def record_src_subnet_command(instance, args):
    demisto_arguments = [
        "src_ip",
        "vlan_id",
        "rule_name",
        "sia_interface",
        "transport_type",
        "tti_index",
        "aio_index",
        "trigger_type",
        "trigger_value",
        "rcs",
    ]
    return func_call(instance, "record_src_subnet", "aria-record-src-subnet", demisto_arguments, args)


def stop_recording_src_subnet_command(instance, args):
    demisto_arguments = ["rule_name", "rcs"]
    return func_call(instance, "stop_recording_src_subnet", "aria-stop-recording-src-subnet", demisto_arguments, args)


def alert_src_subnet_command(instance, args):
    demisto_arguments = [
        "src_ip",
        "rule_name",
        "transport_type",
        "tti_index",
        "aio_index",
        "trigger_type",
        "trigger_value",
        "rcs",
    ]
    return func_call(instance, "alert_src_subnet", "aria-alert-src-subnet", demisto_arguments, args)


def mute_alert_src_subnet_command(instance, args):
    demisto_arguments = ["rule_name", "rcs"]
    return func_call(instance, "mute_alert_src_subnet", "aria-mute-alert-src-subnet", demisto_arguments, args)


def main():
    # disable insecure warnings
    urllib3.disable_warnings()

    # IP address or FQDN of your SDSo node
    SDSO = demisto.params().get("sdso")

    handle_proxy()

    INSECURE = demisto.params().get("insecure", False)

    verify_cert = not INSECURE

    sdso_url = f"{SDSO}/Aria/SS/1.0.0/PacketIntelligence/server"

    aria = ARIA(sdso_url, verify_cert)

    commnds_dict = {
        "aria-block-conversation": block_conversation_command,
        "aria-unblock-conversation": unblock_conversation_command,
        "aria-record-conversation": record_conversation_command,
        "aria-stop-recording-conversation": stop_recording_conversation_command,
        "aria-alert-conversation": alert_conversation_command,
        "aria-mute-alert-conversation": mute_alert_conversation_command,
        "aria-block-dest-port": block_dest_port_command,
        "aria-unblock-dest-port": unblock_dest_port_command,
        "aria-record-dest-port": record_dest_port_command,
        "aria-stop-recording-dest-port": stop_recording_dest_port_command,
        "aria-alert-dest-port": alert_dest_port_command,
        "aria-mute-alert-dest-port": mute_alert_dest_port_command,
        "aria-block-src-port": block_src_port_command,
        "aria-unblock-src-port": unblock_src_port_command,
        "aria-record-src-port": record_src_port_command,
        "aria-stop-recording-src-port": stop_recording_src_port_command,
        "aria-alert-src-port": alert_src_port_command,
        "aria-mute-alert-src-port": mute_alert_src_port_command,
        "aria-block-dest-subnet": block_dest_subnet_command,
        "aria-unblock-dest-subnet": unblock_dest_subnet_command,
        "aria-record-dest-subnet": record_dest_subnet_command,
        "aria-stop-recording-dest-subnet": stop_recording_dest_subnet_command,
        "aria-alert-dest-subnet": alert_dest_subnet_command,
        "aria-mute-alert-dest-subnet": mute_alert_dest_subnet_command,
        "aria-block-src-subnet": block_src_subnet_command,
        "aria-unblock-src-subnet": unblock_src_subnet_command,
        "aria-record-src-subnet": record_src_subnet_command,
        "aria-stop-recording-src-subnet": stop_recording_src_subnet_command,
        "aria-alert-src-subnet": alert_src_subnet_command,
        "aria-mute-alert-src-subnet": mute_alert_src_subnet_command,
    }

    command = demisto.command()
    LOG(f"ARIA: command is {command}")

    if demisto.command() == "test-module":
        # Test if the ARIA PI Reaper is ready
        url = sdso_url + "/endPoint"
        try:
            res = requests.get(url, timeout=20, verify=verify_cert)
            size = len(json.loads(res.text))
            if res.ok and size != 0:
                demisto.results("ok")
            else:
                return_error("Fail to Connect to SDSo or no PacketIntelligence Service!")
        except (json.JSONDecodeError, requests.exceptions.RequestException):
            return_error("Fail to Connect to SDSo or no PacketIntelligence Service!")

    else:
        cmd_func = commnds_dict.get(command)

        if cmd_func is None:
            raise NotImplementedError(f'Command "{command}" is not implemented.')
        else:
            readable_output, ec = cmd_func(aria, demisto.args())
            context_entry = list(ec.values())[0]

            LOG(json.dumps(ec))

            if context_entry["Status"]["command_state"] == "Success":
                return_outputs(readable_output, ec)
            elif context_entry["Status"]["command_state"] == "Failure":
                LOG.print_log()
                return_error(f"One or more endpoint(s) fail to create/remove rules. Please see {context_entry}")
            else:
                return_error(f"Endpoint matching RCS not found! Please see {context_entry}")


# python2 uses __builtin__ python3 uses builtins
if __name__ == "__builtin__" or __name__ == "builtins":
    main()