Recorded Future-SecurityTrails
LAST UPDATED: OCT 31, 2024
Overview
SecurityTrails is a total inventory that curates comprehensive domain and IP address data for users and applications that demand clarity. By combining current and historic data of all Internet assets, SecurityTrails is the proven solution for 3rd-party risk assessment, attack surface reduction and threat hunting. This integration enables organizations to query risk issues and correlate domain and IP address data for risk assessment and threat hunting.
D3 SOAR is providing REST operations to function with Recorded Future-SecurityTrails.
Recorded Future-SecurityTrails is available for use in:
Known Limitations
It is important to monitor your account quota, as exceeding your credit limit will prevent commands from running. You can edit your subscription to purchase additional credits if you anticipate needing a higher quota.
Connection
To connect to Recorded Future-SecurityTrails from D3 SOAR, please follow this part to collect the required information below:
Parameter | Description | Example |
Server URL | The server URL of the SecurityTrails API. | https://api.securitytrails.com |
API Key | The API key to authenticate the connection. | ur***9Z7S***nk |
API Version | The version of the API to use for the connection. | v1 |
Permission Requirements
No permissions are required to create API keys in SecurityTrails.
Configuring Recorded Future-SecurityTrails to Work with D3 SOAR
Log in to your SecurityTrails account using your username and password.
Locate the API section on the left navigation menu and click on API Keys.
Next, select Create new API Key and enter a name for the key. Click Create new API Key to proceed.
Your new API key will now be visible in the list of API keys. Store this key securely to configure an integration connection with D3 SOAR.
Configuring D3 SOAR to Work with Recorded Future-SecurityTrails
Log in to D3 SOAR.
Find the Recorded Future-SecurityTrails integration.
Navigate to Configuration on the top header menu.
Click on the Integration icon on the left sidebar.
Type Recorded Future-SecurityTrails in the search box to find the integration, then click it to select it.
Click + New Connection, on the right side of the Connections section. A new connection window will appear.
Configure the following fields to create a connection to Recorded Future-SecurityTrails.
Connection Name: The desired name for the connection.
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.
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.
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.
Description (Optional): Add your desired description for the connection.
Configure User Permissions: Defines which users have access to the connection.
Active: Check the tick box to ensure the connection is available for use.
System: This section contains the parameters defined specifically for the integration. These parameters must be configured to create the integration connection.
1. Input your domain level Server URL. The default value is https://api.securitytrails.com.
2. Input your API Key. See Step 4 of Configuring Recorded Future-SecurityTrails to Work with D3 SOAR for instructions on obtaining the API Key.
3. Input your API Version. The default value is v1.Connection Health Check: Updates the connection status you have created. A connection health check is done by scheduling the Test Connection command of this integration. This can only be done when the connection is active.
To set up a connection health check, check the Connection Health Check tickbox. You can customize the interval (minutes) for scheduling the health check. An email notification can be set up after a specified number of failed connection attempts.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.
Test the connection.
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.
Click OK to close the alert window.
Click + Add to create and add the configured connection.
Commands
Recorded Future-SecurityTrails 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.
Integration API Note
For more information about the Recorded Future-SecurityTrails API, please refer to the following SecurityTrails API references:
DSL Query
Runs a Domain Specific Language (DSL) query on the SecurityTrails Exploration End Point platform. This command lets you query SecurityTrails Exploration End Point with flexible SQL-like queries. The syntax used for SecurityTrails' DSL closely resembles that of SQL WHERE predicates.
Input
Input Parameter | Required/Optional | Description | Example |
Query | Required | The Doman Specific Language (DSL) statement to run the query. The syntax used for SecurityTrails' DSL closely resembles that of SQL WHERE predicates. For more information, such as the available input fields and sample queries, see How to use the DSL. | ns = 'ns1.yahoo.com' AND ipv4 = '1.1.1.1' |
Output
Error Handling
If the Return Data is 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. | DSL Query 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 Recorded Future-SecurityTrails portal. Refer to the HTTP Status Code Registry for details. | Status Code: 403. |
Message | The raw data or captured key error message from the integration API server about the API request failure. | Message: Invalid Query. |
Error Sample Data DSL Query failed. Status Code: 403. Message: Invalid Query. |
Fetch Incident
Returns a list of hosts with issue updates.
Input
Input Parameter | Required /Optional | Description | Example |
Project ID | Required | The ID of the project to retrieve risk issues. Project IDs can be obtained from the SurfaceBrowser Web user interface by navigating to the project section and selecting the desired project. The Project ID can be found in the URL of the project page. | c797165c-****-****-****-3a240a7ddc4f |
Start Time | Optional | This parameter must always be left EMPTY to retrieve the latest snapshot. | 2024-07-01 00:00 |
Initiator | Optional | This parameter must always be left EMPTY to determine the initiate job within the schedule. | No Sample Data |
Output
Incident Field Mapping
For this integration, the default incident fields in D3 SOAR are fixed with no built-in source fields. Users can specify the source fields as needed.
Event and Incident Intake Field Mapping
Please note that incident and event intake commands require both Event Field and Incident Field Mapping. These field mappings are the default event/incident field mappings for D3 system integrations. You can edit the provided mappings or create custom mappings as needed. Please refer to Event and Incident Intake Field Mapping for more details.
Incident Main JSON Path: $.Results
Field Name | Source Field |
Title | User-defined |
Description | User-defined |
Severity | User-defined |
Incident Type * | User-defined |
Incident Creator | User-defined |
Incident Owner | User-defined |
Incident Playbook | User-defined |
Due In Date | User-defined |
Origin ID | User-defined |
Unique Key | User-defined |
Tactics | User-defined |
Techniques | User-defined |
Event Field Mapping
Fetch Event commands require event field mapping. Field mapping plays a key role in the data normalization process part of the event pipeline. Field mapping converts the original data fields from the different providers to the D3 fields which are standardized by the D3 Model. Please refer to Event and Incident Intake Field Mapping for more details.
To custom field mapping, click + Add Field and add the custom field of your choice. You can also remove built-in field mappings by clicking x. Please note that two underscore characters will automatically prefix the defined Field Name as the System Name for a custom field mapping. Additionally, if an input Field Name contains any spaces, they will automatically be replaced with underscores for the corresponding System Name.
As a system integration, the Recorded Future-SecurityTrails integration has some pre-configured field mappings for default field mapping.
Default Event Source
The Default Event Source is the default set of field mappings that are applied when this fetch event command is executed. For out-of-the-box integrations, you will find a set of field mapping provided by the system. Default event source provides field mappings for common fields from fetched Issues. The default event source has a “Main Event JSON Path” (i.e., $.Issues) that is used to extract a batch of events from the response raw data. Click Edit Main JSON Path to view the “Main Event JSON Path”.Main Event JSON Path: $.Issues
The Main Event JSON Path determines the root path where the system starts parsing raw response data into D3 event data. The JSON path begins with $, representing the root element. The path is formed by appending a sequence of child elements to $, each separated by a dot (.). Square brackets with nested quotation marks ([‘...’]) should be used to separate child elements in JSON arrays.
For example, the root node of a JSON Path is Issues. The child node denoting the Event code field would be id. Putting it together, the JSON Path expression to extract the Event code is $.Issues.id.
The pre-configured field mappings are detailed below:
Field Name | Source Field |
Default Event Source (Main Event JSON Path: $.Issues) | |
Host Additional | .example_entities.*[0].additional |
Host Sort Value | .example_entities.*[0].sort_value |
Issue Domain Count | .rule_metadata.entity_counts.domains |
Issue IP Count | .rule_metadata.entity_counts.ips |
Snapshot Risk Score | .risk_score |
Event code | .id |
Event name | .name |
Hostname | .example_entities.*[0].example |
Start Time | .snapshot |
Description | .description |
Severity | .classification |
Status | .Status |
Error Handling
If the Return Data is 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. | Fetch Incident 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 Recorded Future-SecurityTrails 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: Unknown Project. |
Error Sample Data Fetch Incident failed. Status Code: 404. Message: Unknown Project. |
Get Current Issues
Retrieves current risk issues of the specified project.
READER NOTE
Project ID is a required parameter to run this command.
In SurfaceBrowser, click on the Project tab located in the top right-hand corner of the screen. From here, you can either create a new project or select an existing one. For instance, you may choose to select the "D3 Security" project.
Click on the project to view its details. To obtain the project ID, you can look at the URL of the project page and find the alphanumeric code following the "project/" segment of the URL.
Input
Input Parameter | Required/Optional | Description | Example |
Project ID | Required | The ID of the project to retrieve risk issues. Project IDs can be obtained from the SurfaceBrowser Web user interface by navigating to the project section and selecting the desired project. The Project ID can be found in the URL of the project page. | eb*****b6 |
Output
Error Handling
If the Return Data is 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. | Get Current Issues 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 Recorded Future-SecurityTrails 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: Project ID Not Found. |
Error Sample Data Get Current Issues failed. Status Code: 404. Message: Project ID Not Found. |
Get Issue History
Retrieves a risk issue's history based on the specified criteria.
READER NOTE
Project ID is a required parameter to run this command.
In SurfaceBrowser, click on the Project tab located in the top right-hand corner of the screen. From here, you can either create a new project or select an existing one. For instance, you may choose to select the "D3 Security" project.
Click on the project to view its details. To obtain the project ID, you can look at the URL of the project page and find the alphanumeric code following the "project/" segment of the URL.
Query is an optional parameter to run this command.
You can use this parameter to perform partial searches on either the description (accessible in the raw data returned by this command at the path $.data[*].add_rules[*].description) or the name (accessible in the raw data returned by this command at the path $.data[*].add_rules[*].name).
Input
Input Parameter | Required/Optional | Description | Example |
Project ID | Required | The ID of the project to retrieve risk issues. Project IDs can be obtained from the SurfaceBrowser Web user interface by navigating to the project section and selecting the desired project. The Project ID can be found in the URL of the project page. | Ebb*****b6 |
Start Time | Optional | The timestamp to get rule changes afterwards. | 2023-03-01 00:00 |
End Time | Optional | The timestamp to get risk issue history up to. | 2023-03-02 00:00 |
Rule Action | Optional | The rule action (i.e., added or removed) to filter rule changes. If this parameter is not defined, both added rules and removed rules will be returned. | Added Rules |
Classification | Optional | The classification level to filter rule changes. If this parameter is not defined, issues of any classification level will be returned. | Informational |
Query | Optional | The freetext search string to filter rule changes by name and description fields. | Hosts with Self-Signed SSL/TLS |
Output
Error Handling
If the Return Data is 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. | Get Issue History 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 Recorded Future-SecurityTrails 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: Project ID Not Found. |
Error Sample Data Get Issue History failed. Status Code: 404. Message: Project ID Not Found. |
SQL Query
Runs a Structured Query Language (SQL) query on SecurityTrails data. For more information, such as properties and operators, see SQL Reference.
Input
Input Parameter | Required/Optional | Description | Example |
Query | Required | The SQL query statement to run the query. The structure of the query statement is the following: SELECT attribute FROM table WHERE condition = "value". The query can be used to retrieve information from two tables: the hosts table and the IPs table. The hosts table contains information related to domains, hostnames, and other related hostname details, while the IPs table contains information related to IP addresses, ASNs, and other IP-related details. To avoid API plan overages, it is recommended to narrow down your query condition by defining more specific conditions and values. For more information, such as properties and operators, see SQL Reference. | SELECT domain.hostname, dns.a.value.ip,ip.geo.owner.country FROM hosts WHERE domain.apex = 'google.com' AND dns.a.value.ip neq Null AND ip.geo.owner.country_iso_code = 'CN' |
Output
Error Handling
If the Return Data is 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. | SQL Query 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 Recorded Future-SecurityTrails portal. Refer to the HTTP Status Code Registry for details. | Status Code: 403. |
Message | The raw data or captured key error message from the integration API server about the API request failure. | Message: Invalid Query. |
Error Sample Data SQL Query failed. Status Code: 403. Message: Invalid Query. |
Test Connection
Allows you to perform a health check on an integration connection. You can schedule a periodic health check by selecting Connection Health Check when editing an integration connection.
Input
N/A
Output
Error Handling
If the Return Data is Failed, an Error tab will appear in the Test Result window.
The error tab contains the responses from the 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. | Test Connection failed. Failed to check the connector. |
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 Recorded Future-SecurityTrails portal. Refer to the HTTP Status Code Registry for details. | Status Code: 403. |
Message | The raw data or captured key error message from the integration API server about the API request failure. | Message: Invalid authentication credentials. |
Error Sample Data Test Connection failed. Failed to check the connector. Status Code: 403. Message: Invalid authentication credentials. |