The Trellix NDR Console (NDRC) provides a unified capability to configure and ingest DNS events from Amazon Route 53, enabling the solution to parse and correlate metadata for the detection of malicious activities.
This integration supports the seamless operation of existing detection engines within NDRC that includes DGA (Domain Generation Algorithm) Detection, DNS tunneling, Fast Flux, and rogue DNS, to generate high-fidelity alerts based on identified attack patterns. Designed for operational efficiency, this integration ensures that high-volume DNS events are transformed into actionable security intelligence.
How the integration works
Log generation and S3 delivery
Amazon Route 53 Resolver logging captures internal DNS queries and answers generated within the Virtual Public Cloud (VPC).
These logs are delivered as compressed files to dedicated Amazon S3 buckets.
Automated event triggering
When a new Route 53 DNS log file arrives in S3, an S3 event notification is sent to a central Amazon SQS queue.
The SQS message invokes the Worker Lambda, which identifies the source as Route 53 based on the S3 object key prefix (for example,
/dnsquery/).
Parsing and normalization
The ingestion Lambda parses each Route 53 record and categorizes it as either a DNS query event (
dns.type: query) or a DNS answer event (dns.type: answer) based on the data received.The DNS metadata is then transformed into a standardized JSON format.
For accurate load balancing across multiple events, events are hashed by Source IP to ensure consistent load balancing to the NDRC appliance.
NDRC ingestion and detection
The Lambda sends gzipped batches of normalized Route 53 events to the NDR Console using a KMS-encrypted authentication token.
The NDR Console authenticates the client and forwards the events to the detection engines, which analyze the DNS traffic in real time to identify critical attack patterns.
Alerting and triage
When any malicious pattern is detected by the detection engines, the NDR Console generates events and alerts in the UI. Analysts can investigate these events with contextual details, such as risk scores, victim information, and MITRE ATT&CK mappings.
Prerequisites
Ensure that you have access to the AWS Management Console with administrative privileges.
Identify the target VPCs for DNS query logging.
Ensure your IAM user/role has permissions to:
Access to Route 53 Resolver and create/manage query logging configurations.
Create and manage S3 buckets and apply bucket policies.
Associate query logging configurations with VPCs.
You have deployed an NDR Console instance in the AWS environment and have access to
client_group_tokenfor authentication. Refer to AWS (Amazon Web Services) deployment section in the NDR 4.x Deployment Guide for more information.Make sure you have a valid NDR Core or NDR Enterprise license. See License Management section in the Trellix NDR 4.x Product Guide for NDR license activation and verification.
Prepare Amazon S3 for log storage
Logs must be delivered to a regional S3 bucket before the NDRC can ingest them. You can create a new bucket or reuse an existing one by defining a unique prefix.
Create an S3 bucket
On the AWS Management Console, search for S3 and go to the S3 dashboard.
Click Create bucket.
Enter a unique Bucket name, such as
ndrc-route53-logs-target.Select the same AWS region where your VPCs are located to minimize data transfer costs.
Enable ACLs and set Object ownership to Bucket owner preferred.
Select Block Public Access (recommended for security) and enable Server-side encryption (SSE-S3) to protect data at rest.
Keep other settings as default or configure as per your organization's policy.
Once configured, click Create Bucket.
Add a bucket policy for Route 53 resolver access
To allow Amazon Route 53 to deliver logs to your bucket, you must authorize their service via a custom bucket policy.
In your newly created S3 bucket, select the Permissions tab.
Under Bucket policy, click Edit.
Paste the following policy. Remember to replace
BUCKET_NAMEwith your actual S3 bucket name andACCOUNT_IDwith your AWS account ID.Click Save changes.
{ "Version": "2012-10-17", "Statement": [ { "Sid": "Route53ResolverQueryLoggingPutObject", "Effect": "Allow", "Principal": { "Service": "route53resolver.amazonaws.com" }, "Action": "s3:PutObject", "Resource": "arn:aws:s3:::BUCKET_NAME/AWSLogs/ACCOUNT_ID/*" }, { "Sid": "Route53ResolverQueryLoggingGetBucketAcl", "Effect": "Allow", "Principal": { "Service": "route53resolver.amazonaws.com" }, "Action": "s3:GetBucketAcl", "Resource": "arn:aws:s3:::BUCKET_NAME" } ] }
Note
Reusing a bucket for multiple sources is supported as long as they use unique directory prefixes to avoid log overlap.
Configure Route 53 resolver query logging
Ensure you are in the correct region (the same region as your VPCs and S3 bucket).
Under the Resolver menu, select Query logging.
Click Configure query logging.
Enter a descriptive Name (for example,
my-vpc-dns-logs).For Query log destination, select S3 bucket and browse to the bucket created.
Click Add VPC and select the VPCs you wish to monitor for DNS logging. You can add multiple VPCs as per your requirement.
Click Configure query logging.
Logs will now begin flowing to S3 in
.gzformat.
Important
The Lambda identifies logs using the
/dnsquery/prefix by default. Ensure your configuration matches the S3 object key prefix. To set the prefix:
Under the Resolver menu, click Query logging and click Configure query logging.
Select the required S3 bucket. If you wish to use a sub-folder, specify the prefix (for example,
route53/ordnsquery/) here.
Set up the event-driven SQS pipeline
The Trellix NDRC uses an SQS queue to buffer incoming events and trigger the ingestion Lambda.
Create Dead-Letter Queue (DLQ)
Search SQS in the AWS console and select Amazon SQS.
In the left navigation pane, choose Queues.
Click Create queue.
Enter a descriptive Name, such as
ndr-dns-query-logs-dlq.Leave default settings for other options.
Click Create queue.
Record the Queue ARN from the details page.
Create main SQS queue
Back in the Amazon SQS console, click Create queue.
Enter a descriptive Name, such as
ndrc-dns-ingestion-queueConfigure the Redrive Policy to use the DLQ and set Maximum receives to
3or5.Click Create queue.
Record its Queue URL and Queue ARN from the details page.
Configure S3 event notifications
In the S3 console, navigate to the bucket where your DNS query logs are stored.
Go to the Properties tab and locate the Event notifications section.
Click Create event notification.
Enter a descriptive Event name, such as
SendDNSLogsToSQSEnter the Prefix of your specific Route 53 path for your DNS logs.
Use the
.gzextension as Suffix.Select All object create events as Event types.
Select SQS Queue and select the ARN of the
ndr-dns-query-logsqueue.Save the changes.
Integrate Lambda function for SQS and NDR Console
Create IAM policy for custom metrics
Login as admin with permissions for IAM management.
Go to the IAM Dashboard. In the left navigation pane, click Policies.
Click Create policy and select the JSON tab.
Paste the following JSON policy. This grants the specific
cloudwatch:PutMetricDatapermission.{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "cloudwatch:PutMetricData" ], "Resource": "*" } ] }Click Next: Tags (optional), then Next: Review.
Enter a descriptive Policy name, such as
ndrc-cloudwatch-put-metrics-policyClick Create policy.
Create IAM role for Lambda execution
In the IAM Dashboard, click Roles in the left navigation pane.
Click Create role.
Select AWS service as Trusted entity type
Select Lambda and click Next.
On the Permissions page, search and attach the following five policies:
AWSLambdaBasicExecutionRoleAmazonSQSFullAccessAmazonS3ReadOnlyAccessAWSLambdaVPCAccessExecutionRolendrc-cloudwatch-put-metrics-policy
Click Next.
Enter a descriptive IAM role name, such as ndrc-lambda-execution-role
Review the role details and attached policy details, and then click Create role.
Record the Role ARN.
Create Security group for Lambda
Go to EC2 Dashboard. In the left navigation pane, click Security Groups.
Click Create security group.
Enter a descriptive Security group name, such as
ndrc-lambda-sg.Select the required VPC.
Inbound rules: Select No inbound rule.
Outbound rules: No additional configuration needed.
Click Add rule again.
Select Type as All traffic.
Select Destination as
0.0.0.0/0This rule is still needed to allow Lambda to reach AWS services like S3, CloudWatch, and SQS endpoints outside your VPC via the NAT Gateway, and for any other internet access.
Click Create security group.
Record the Lambda Security Group ID.
Create Lambda function
After the function is created, you are redirected to its overview page.
On Code tab:
Under the Code source section, click Upload from .zip file.
Click Upload and select your ndrc_lambda.zip file (the deployment package).
Once uploaded, scroll down to Runtime settings. Click Edit.
Ensure this is
lambda_function.lambda_handler(assuming your main Python file islambda_function.pyand your handler function islambda_handler).Click Save.
On Configuration tab:
General configuration
Click Edit
Set Memory to 512 MB (You can tune the memory based on file size)
Set Timeout to
5 minutes(300 seconds).Click Save.
Ephemeral storage (in /tmp)
Click Edit.
Set Ephemeral storage to 512 MB (default)
Click Save.
Configure environment variables
Go to the Configuration tab and select Environment variables from the left menu.
Click Edit.
Click Add environment variable.
Select Key as
NDRC_CONFIG_JSONFor Value, Paste the entire JSON configuration from the sample below. Remember to replace placeholders like
YOUR_NDRC_IP_ADDRESS,YOUR_NDRC_CLIENT_GROUP_TOKENwith correct details.Click Save.
{ "log_level":"DEBUG", "appliances":[ { "ip":"YOUR_NDRC_IP_ADDRESS", "client_group_token":"YOUR_NDRC_CLIENT_GROUP_TOKEN" } ], "route53_log_config":{ "log_prefix_key":"dnsquery", "enable_dns_logging":false, "hosts_to_trace":[ "10.x.x.x" ] }VPC
Click Edit.
Select the required VPC and subnets
Select the required security group.
Click Save.
Concurrency
Go to Concurrency and recursion detection → Concurrency, and click Edit.
Select Reserved concurrency and set it to
1Click Save.
Important
The
NDRC_CONFIG_JSONfile can be used for troubleshooting purposes.If you are working with multiple NDR appliances, you need to add the
ipandclient_group_tokenfor each appliance in theNDRC_CONFIG_JSONfile.VPC changes can take a few moments to apply. Do not proceed until the status message confirms it's updated.
It is recommended to start with a Reserved Concurrency of
1. Once you have validated that it is working properly, you can increase this value to4or higher to process more events in parallel.
Add SQS trigger to Lambda
On your Lambda function's overview page, in the Function overview section, click Add trigger.
Choose SQS as a Source
Select SQS queue as ndrc-dns-ingestion-queue.
Enter 1 for Batch size (or your desired batch size).
Check the Report batch item failures box. This is crucial for efficient error handling.
Click Add.
This completes the Amazon Route 53 integration configuration workflow. Events will not populate in the Trellix NDR Web UI search page immediately after configuration. To optimize storage usage, aws-flows is disabled by default and must be manually toggled.
To enable it:
Log in to the Trellix NDR CLI.
Type
enable.Type
configure system.Navigate to
aws-flowsand set it toenable.
Note
Disabling aws-flows only blocks event visibility on the search page. Any alerts associated with these events are still be detected and displayed in the Trellix NDR Web UI.
Identify and analyze Route 53 DNS events in NDR Console
Log in to the NDR Console UI.
Go to the
(Main Menu), and select Search under Investigation.Isolate your DNS traffic coming via Route 53 DNS resolver using specific search filters and specifying time period of the events.
Look for
doc_values_typeasdnsanddevice-typeasAWS_route53.Locate the DNS events in the results. Identify the event details for further investigation, such as Source IP, destination IP, ports, etc.
Switch to the Investigation → Alerts page and filter using the IP addresses you identified. This enables you to find alerts that got triggered due to these specific DNS events.
If there are alerts present, you can investigate further using the Alert Details and Asset details pages.
For more information, see Viewing the details of the alert and Investigate assets section in NDR 4.x Product Guide.