Skip to main content
Skip table of contents

Sophos XG Firewall (Deprecated)

LAST UPDATED: OCT 23, 2024

Overview

Sophos XG Firewall is a next-generation firewall appliance that delivers visibility, protection, and performance for small branch offices to distributed enterprises. It offers features such as anti-malware, web security and URL filtering, application control, IPS, traffic shaping, VPN, reporting and monitoring.

D3 SOAR is providing REST operations to function with Sophos XG Firewall.

Sophos XG Firewall is available for use in:

D3 SOAR

V12.7.83.0+

Category

Network Security

Deployment Options

Option I, Option III

Connection

To connect to Sophos XG Firewall from D3 SOAR, please follow this part to collect the required information below:

Parameter

Description

Example

Server URL (domain level)

The server URL of the Sophos XG Firewall integration.

https://192.1.1.1

UserName

The user name to establish the API connection.

admin

Password

The password to establish the API connection.

Password

Configuring Sophos XG Firewall to Work with D3 SOAR

To create an administrator profile with desired permissions, refer to Allow API access to administrators. You will be able to limit the administrator’s rights based on the profile.

Configuring D3 SOAR to Work with Sophos XG Firewall

  1. Log in to D3 SOAR.

  2. Find the Sophos XG Firewall integration.

    1. Navigate to Configuration on the top header menu.

    2. Click on the Integration icon on the left sidebar.

    3. Type Sophos XG Firewall in the search box to find the integration, then click it to select it.

    4. Click + New Connection, on the right side of the Connections section. A new connection window will appear.

  3. Configure the following fields to create a connection to Sophos XG Firewall.

    1. Connection Name: The desired name for the connection.

    2. Site: Specifies the site to use the integration connection. Use the drop-down menu to select the site. The Share to Internal Sites option enables all sites defined as internal sites to use the connection. Selecting a specific site will only enable that site to use the connection.

    3. Recipient site for events from connections Shared to Internal Sites: This field appears if you selected Share to Internal Sites for Site to let you select the internal site to deploy the integration connection.

    4. Agent Name (Optional): Specifies the proxy agent required to build the connection. Use the dropdown menu to select the proxy agent from a list of previously configured proxy agents.

    5. Description (Optional): Add your desired description for the connection.

    6. Configure Permissions: Defines which users have access to the connection.

    7. Active: Check the tick box to ensure the connection is available for use.

    8. System: This section contains the parameters defined specifically for the integration. These parameters must be configured to create the integration connection.
      1. Input the domain level Server URL of your Sophos XG Firewall instance.
      2. Input your Sophos XG Firewall UserName.
      3. Input your Sophos XG Firewall Password.

    9. Enable Password Vault: An optional feature that allows users to take the stored credentials from their own password vault. Please refer to the password vault connection guide if needed.

  4. Test the connection.

    1. Click Test Connection to verify the account credentials and network connection. If the Test Connection Passed alert window appears, the test connection is successful. You will see Passed with a green checkmark appear beside the Test Connection button. If the test connection fails, please check your connection parameters and try again.

    2. Click OK to close the alert window.

    3. Click + Add to create and add the configured connection.

Commands

Sophos XG Firewall includes the following executable commands for users to set up schedules or create playbook workflows. With the Test Command, you can execute these commands independently for playbook troubleshooting.

Block IP Addresses

Blocks the specified IP Addresses in the firewall.

Input

Input Parameter

Required/Optional

Description

Example

IPs

Required

The IP addresses to block.

["1.1.1.1","1.2.3.4"]

IP Group Name

Required

The name of the IP group to add the IP addresses into.

suspicious_IP_group

Output

Raw Data

The primary response data from the API request.

SAMPLE DATA

JSON
[
    "\n\n  \n    Authentication Successful\n  \n  \n    Operation failed. Entity having same name already exists.\n  \n",
    "\n\n  \n    Authentication Successful\n  \n  \n    Operation failed. Entity having same name already exists.\n  \n"
]
Context Data

The data extracted from Raw Data converted into JSON format. Context Data may be identical to Raw Data in some cases.

It is recommended to refer to the Raw Data instead of Context Data, since it contains the complete API response data. D3 will deprecate Context Data in the future, and playbook tasks using Context Data will be replaced with Raw Data.

SAMPLE DATA

CODE
[
    {
        "IP": "1.1.1.1",
        "Login": "Authentication Successful",
        "Status": "Configuration applied successfully."
    },
    {
        "IP": "1.2.3.4",
        "Login": "Authentication Successful",
        "Status": "Configuration applied successfully."
    }
]
Key Fields

Common cyber security indicators such as unique IDs, file hash values, CVE numbers, IP addresses, etc., will be extracted from Raw Data as Key Fields.
The system stores these key fields in the path $.[playbookTask].outputData. You can use these key-value pairs as data points for playbook task inputs.

SAMPLE DATA

CODE
{
    "IP List": [
        "1.1.1.1",
        "1.2.3.4"
    ]
}
Return Data

Indicates one of the possible command execution states: Successful, Partially Successful, or Failed.

The Partially Successful state only occurs when a command’s input accepts an array of items (e.g. an array of IP addresses) and one or more items within the array return an error from the API request.

The Failed state can be triggered by any of the following errors:

  • A connection issue with the integration

  • The API returned an error message

  • No response from the API

You can view more details about an error in the Error tab.

Return Data can be passed down directly to a subsequent command or used to create conditional tasks in playbooks.

SAMPLE DATA

CODE
Successful
Result

Provides a brief summary of outputs in an HTML formatted table.

SAMPLE DATA

IP

LOGIN

STATUS

1.1.1.1

Authentication Successful

Configuration applied successfully.

1.2.3.4

Authentication Successful

Configuration applied successfully.

Error Handling

If the Return Data is Partially Successful or Failed, an Error tab will appear in the Test Result window.

The error tab contains the details responded from D3 SOAR or third-party API calls, including Failure Indicator, Status Code, and Message. This can help you locate the root cause of a command failure.

Parts in Error

Description

Example

Failure Indicator

Indicates the command failure that happened at a specific input and/or API call.

Block IP Addresses failed.

Status Code

The response code issued by the third-party API server or the D3 SOAR system that can be used to locate the corresponding error category. For example, if the returned status code is 401, the selected connection is unauthorized to run the command. The user or system support would need to check the permission setting in the Sophos XG Firewall portal. Refer to the HTTP Status Code Registry for details.

Status Code: 404.

Message

The raw data or captured key error message from the integration API server about the API request failure.

Message: IP Group Name Not Found.

Error Sample Data

Block IP Addresses failed.

Status Code: 404.

Message: IP Group Name Not Found.

Block URLs

Blocks the specified URLs in the firewall.

Input

Input Parameter

Required/Optional

Description

Example

URLs

Required

The array of URLs to block.

["*.test3.com","*.test4.com"]

URL Group Name

Required

The name of the URL group to add the specified URLs into.

suspicious_fqdn_group

Output

Raw Data

The primary response data from the API request.

SAMPLE DATA

JSON
[
    "\n\n \n Authentication Successful\n \n \n Configuration applied successfully.\n \n",
    "\n\n \n Authentication Successful\n \n \n Configuration applied successfully.\n \n"
]
Context Data

The data extracted from Raw Data converted into JSON format. Context Data may be identical to Raw Data in some cases.

It is recommended to refer to the Raw Data instead of Context Data, since it contains the complete API response data. D3 will deprecate Context Data in the future, and playbook tasks using Context Data will be replaced with Raw Data.

SAMPLE DATA

CODE
[
    {
        "URL": "*.test3.com",
        "Login": "Authentication Successful",
        "Status": "Configuration applied successfully."
    },
    {
        "URL": "*.test4.com",
        "Login": "Authentication Successful",
        "Status": "Configuration applied successfully."
    }
]
Key Fields

Common cyber security indicators such as unique IDs, file hash values, CVE numbers, IP addresses, etc., will be extracted from Raw Data as Key Fields.
The system stores these key fields in the path $.[playbookTask].outputData. You can use these key-value pairs as data points for playbook task inputs.

SAMPLE DATA

CODE
{
    "URL List": [
        "*.test3.com",
        "*.test4.com"
    ]
}
Return Data

Indicates one of the possible command execution states: Successful, Partially Successful, or Failed.

The Partially Successful state only occurs when a command’s input accepts an array of items (e.g. an array of IP addresses) and one or more items within the array return an error from the API request.

The Failed state can be triggered by any of the following errors:

  • A connection issue with the integration

  • The API returned an error message

  • No response from the API

You can view more details about an error in the Error tab.

Return Data can be passed down directly to a subsequent command or used to create conditional tasks in playbooks.

SAMPLE DATA

CODE
Successful
Result

Provides a brief summary of outputs in an HTML formatted table.

SAMPLE DATA

URL

LOGIN

STATUS

*.test3.com

Authentication Successful

Configuration applied successfully.

*.test4.com

Authentication Successful

Configuration applied successfully.

Error Handling

If the Return Data is Partially Successful or Failed, an Error tab will appear in the Test Result window.

The error tab contains the details responded from D3 SOAR or third-party API calls, including Failure Indicator, Status Code, and Message. This can help you locate the root cause of a command failure.

Parts in Error

Description

Example

Failure Indicator

Indicates the command failure that happened at a specific input and/or API call.

Block URLs failed.

Status Code

The response code issued by the third-party API server or the D3 SOAR system that can be used to locate the corresponding error category. For example, if the returned status code is 401, the selected connection is unauthorized to run the command. The user or system support would need to check the permission setting in the Sophos XG Firewall portal. Refer to the HTTP Status Code Registry for details.

Status Code: 404.

Message

The raw data or captured key error message from the integration API server about the API request failure.

Message: URL Group Name Not Found.

Error Sample Data

Block URLs failed.

Status Code: 404.

Message: URL Group Name Not Found.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.