Ingest network Route 53 logs from Amazon S3
Collect network Route 53 logs from Amazon S3 in Cortex XDR.
You can forward network AWS Route 53 DNS logs to Cortex XDR from Amazon Simple Storage Service (Amazon S3).
To receive network Route 53 DNS logs from Amazon S3, you must first configure data collection from Amazon S3. You can then configure the Collection Integrations settings in Cortex XDR for Amazon S3. After you set up collection integration, Cortex XDR begins receiving new logs and data from the source.
You can configure Amazon S3 with SQS notification using the AWS CloudFormation Script that we have created for you to make the process easier. The instructions below explain how to configure Cortex XDR to receive network Route 53 DNS logs from Amazon S3 using SQS.
When Cortex XDR begins receiving logs, the app automatically creates an Amazon Route 53 Cortex Query Language (XQL) dataset (amazon_route53_raw). This enables you to search the logs with XQL Search using the dataset. For example, queries refer to the in-app XQL Library. For enhanced cloud protection, you can also configure Cortex XDR to ingest network Route 53 DNS logs as Cortex XDR network connection stories, which you can query with XQL Search using the xdr_data dataset with the preset called network_story. Cortex XDR can also generate Cortex XDR issues (Analytics, Correlation Rules, IOC, and BIOC) when relevant from Amazon Route 53 DNS logs. While Correlation Rules issues are generated on non-normalized and normalized logs, Analytics, IOC, and BIOC issues are only generated on normalized logs.
Enhanced cloud protection provides:
Normalization of cloud logs
Cloud logs stitching
Enrichment with cloud data
Detection based on cloud analytics
Cloud-tailored investigations
Be sure you do the following tasks before you begin configuring data collection from Amazon S3 using the AWS CloudFormation Script.
Ensure that you have the proper permissions to run AWS CloudFormation with the script provided in Cortex XDR. You need at a minimum the following permissions in AWS for an Amazon S3 bucket and Amazon Simple Queue Service (SQS):
Amazon S3 bucket:
GetObjectSQS:
ChangeMessageVisibility,ReceiveMessage,GetQueueAttributes, andDeleteMessage.
Ensure that you can access your Amazon Virtual Private Cloud (VPC) and have the necessary permissions to create Route 53 Resolver Query logs.
Determine how you want to provide access to Cortex XDR to your logs and perform API operations. You have the following options.
Use Workload Federated Identity to allow the Cortex XDR log collector service account to assume an IAM role in your AWS account with a short-lived, Google-signed OIDC token instead of stored AWS access keys. This is the Workload Federated Identity option in the Amazon S3 collection configuration, which is selected by default when available. For setup instructions, see Create a Workload Federated Identity role.
Designate an AWS IAM user, where you will need to know the Account ID for the user and have the relevant permissions to create an access key/id for the relevant IAM user. This is the Access Key option in the Amazon S3 collection configuration.
Create an assumed role in AWS to delegate permissions to a Cortex XDR AWS service. This role grants Cortex XDR access to your logs. For more information, see Creating a role to delegate permissions to an AWS service. This is the STS AssumeRole option in the Amazon S3 collection configuration. For more information on creating an assumed role for Cortex XDR, see Create an assumed role. To collect Amazon S3 logs that use server-side encryption (SSE), the user role must have an IAM policy that states that Cortex XDR has kms:Decrypt permissions. With this permission, Amazon S3 automatically detects if a bucket is encrypted and decrypts it. If you want to collect encrypted logs from different accounts, you must have the decrypt permissions for the user role also in the key policy for the master account Key Management Service (KMS). For more information, see Allowing users in other accounts to use a KMS key.
If you use Workload Federated Identity, ensure that you have IAM permissions to create identity providers, policies, and roles in your AWS account. Google (
accounts.google.com) must be registered as an OIDC identity provider in your AWS account withsts.amazonaws.comas an audience. If it isn't registered yet, you register it when you create the role. You also need the Cortex XDR service account identifier, which you copy from the Amazon S3 collection configuration in Cortex XDR before you save the configuration. To collect logs that use server-side encryption with AWS KMS, add a statement that allowskms:Decrypton the key ARN to the permissions policy of the IAM role.
Configure Cortex XDR to receive network Route 53 DNS logs from Amazon S3 using the CloudFormation Script.
Download the CloudFormation Script in Cortex XDR.
Navigate to Settings → Data Sources & Integrations.
On the Data Sources & Integrations page, click + Add New, search for Amazon S3, then hover over it and click Add.
Select the authentication method to use for Cortex XDR to access your logs and perform API operations:
To use Workload Federated Identity, select Workload Federated Identity, which is selected by default when available. Ensure that you create a Workload Federated Identity role before continuing.
To use a designated AWS IAM user with static credentials, select Access Key.
To use an IAM assumed role, select STS AssumeRole, and ensure that you create an assumed role for Cortex XDR before continuing with these instructions.
For the Log Type, select Route 53 to configure your log collection to receive network Route 53 DNS logs from Amazon S3, and the following text is displayed under the field Download CloudFormation Script. See instructions here.
Click the Download CloudFormation Script. link to download the script to your computer.
Create a new Stack in the CloudFormation Console with the script you downloaded from Cortex XDR.
Log in to the CloudFormation Console.
From the CloudFormation → Stacks page, ensure that you have selected the correct region for your configuration.
Select Create Slack → With new resources (standard).
Specify the template that you want AWS CloudFormation to use to create your stack. This template is the script that you downloaded from Cortex XDR, which will create an Amazon S3 bucket, Amazon Simple Queue Service (SQS) queue, and Queue Policy. Configure the following settings in the Specify template page.
Prerequisite - Prepare template → Prepare template: Select Template is ready.
Specify Template
Template source: Select Upload a template file.
Upload a template file: Choose file, and select the
CloudFormation-Script.jsonfile that you downloaded.
Click Next.
In the Specify stack details page, configure the following stack details.
Stack name: Specify a descriptive name for your stack.
Parameters → Cortex XDR Flow Logs Integration
Bucket Name: Specify the name of the S3 bucket to create, where you can leave the default populated name as xdr-route53-logs or create a new one. The name must be unique.
Publisher Account ID: Specify the AWS IAM user account ID with whom you are sharing access.
Queue Name: Specify the name for your Amazon SQS queue to create, where you can leave the default populated name as xdr-route53 or create a new one. The name must be unique.
Click Next.
In the Configure stack options page, there is nothing to configure, so click Next.
In the Review page, look over the stack configurations settings that you have configured and if they are correct, click Create stack. If you need to make a change, click Edit beside the particular step that you want to update.
The stack is created and is opened with the Events tab displayed. It can take a few minutes for the new Amazon S3 bucket, SQS queue, and Queue Policy to be created. Click Refresh to get updates. Once everything is created, leave the stack opened in the current browser as you will need to access information in the stack for other steps detailed below.
Configure Route 53 Query Logging in AWS.
Log in to the AWS Management Console.
From the menu bar, ensure that you have selected the correct region for your configuration.
Search for Route 53 and select Resolver → Query Logging.
Configure query logging.
Set the following parameters in the different sections on the Configure query logging page.
Query logging configuration name
Name: Specify a name for your Resolver query logging configuration.
Query logs destination
Destination for query logs: Select S3 bucket as the place where you want Resolver to publish query logs.
Amazon S3 bucket: Browse S3 to select the Amazon S3 bucket created after running the CloudFormation script, which is by default called xdr-route53-logs or select the one that you created.
VPCs to log queries for
Add VPC: Clicking the Add VPC button opens the Add VPC page, where you can choose the VPCs that you want to log queries for. When you are done, click Add.
Click Configure query logging.
Configure access keys for the AWS IAM user that Cortex XDR uses for API operations.
Open the AWS IAM Console, and in the navigation pane, select Access management → Users.
Select the User name of the AWS IAM user.
Select the Security credentials tab, scroll down to the Access keys section, and click Create access key.
Click the copy icon next to the Access key ID and Secret access key keys, where you must click Show secret access key to see the secret key and record them somewhere safe before closing the window. You will need to provide these keys when you edit the Access policy of the SQS queue and when setting the AWS Client ID and AWS Client Secret in Cortex XDR. If you forget to record the keys and close the window, you will need to generate new keys and repeat this process.
When you create an Assumed Role, ensure that you edit the policy that defines the permissions for the role with the S3 Bucket ARN and SQS ARN, which is taken from the stack you created.
Configure the Amazon S3 collection in Cortex XDR.
Navigate to Settings → Data Sources & Integrations.
On the Data Sources & Integrations page, click + Add New, search for Amazon S3, then hover over it and click Add.
Select the authentication method you configured and enter the following values:
Uses a short-lived OIDC token to assume an IAM role in your AWS account, without stored AWS access keys. Before you enter these values, set up the IAM role and its trust policy as described in Create a Workload Federated Identity role.
SQS URL
Specify the SQS URL, which is the URL of the Amazon SQS that you configured in the AWS Management Console.
Name
Specify a descriptive name for your log collection configuration.
Role ARN
Specify the ARN of the IAM role that you created for Workload Federated Identity, in the format arn:aws:iam::<ACCOUNT_ID>:role/<ROLE_NAME>. You can copy it from the role Summary page.
Audience
Enter sts.amazonaws.com. This value must match the accounts.google.com:aud condition in the IAM role trust policy.
Log Type
Select Route 53 to configure your log collection to receive network Route 53 DNS logs from Amazon S3.
Use DNS logs in analytics
If selected, Cortex XDR ingests the network Route 53 DNS logs as XDR network connection stories, which you can query using XQL Search from the xdr_data dataset using the preset called network_story.
In the Copy service account identifier section, click Identifier to copy the Cortex XDR service account identifier. Use this value in the accounts.google.com:sub condition of the IAM role trust policy. The identifier is available as soon as you select Workload Federated Identity, so you can copy it before you create the IAM role.
Uses a designated AWS IAM user's static access key and secret to authenticate.
SQS URL
Specify the SQS URL, which is the URL of the Amazon SQS that you configured in the AWS Management Console.
Name
Specify a descriptive name for your log collection configuration.
AWS Client ID
Specify the Access key ID, which you received when you configured access keys for the AWS IAM user in AWS.
AWS Client Secret
Specify the Secret access key you received when you configured access keys for the AWS IAM user in AWS.
Log Type
Select Route 53 to configure your log collection to receive network Route 53 DNS logs from Amazon S3.
Use DNS logs in analytics
If selected, Cortex XDR ingests the network Route 53 DNS logs as XDR network connection stories, which you can query using XQL Search from the xdr_data dataset using the preset called network_story.
Delegates permissions to a Cortex XDR AWS service using an IAM assumed role. For more information, see Creating a role to delegate permissions to an AWS service.
SQS URL
Specify the SQS URL, which is the URL of the Amazon SQS that you configured in the AWS Management Console.
Name
Specify a descriptive name for your log collection configuration.
Role ARN
Specify the Role ARN for the Assumed Role you created in AWS.
External ID
Specify the External ID for the Assumed Role you created in AWS.
Log Type
Select Route 53 to configure your log collection to receive network Route 53 DNS logs from Amazon S3.
Use DNS logs in analytics
If selected, Cortex XDR ingests the network Route 53 DNS logs as XDR network connection stories, which you can query using XQL Search from the xdr_data dataset using the preset called network_story.
Click Test to validate access, and then click Enable. For Workload Federated Identity, the Test button isn't available, so click Enable.
Once events start to come in, a green check mark appears underneath the Amazon S3 configuration with the number of logs received.
Last updated
Was this helpful?
