AWS EC2 NACL Entry Created or Replaced Allowing All Traffic by New Identity
editAWS EC2 NACL Entry Created or Replaced Allowing All Traffic by New Identity
editDetects a principal account creating or replacing - or attempts to create or replace - an AWS Network Access Control List (NACL) entry using protocol -1 (all traffic). Both successful and failed outcomes are included. A NACL entry with protocol -1 passes all traffic regardless of port, which would disable network-layer controls for the affected subnets. Monitoring for new identities performing this change helps surface freshly compromised credentials or unauthorized principals removing a defense-in-depth layer to facilitate lateral movement or data exfiltration. This signal only flags if this behavior was not observed historically in a specific time window.
Rule type: new_terms
Rule indices:
- logs-aws.cloudtrail-*
Severity: medium
Risk score: 47
Runs every: 5m
Searches indices from: now-6m (Date Math format, see also Additional look-back time)
Maximum alerts per execution: 100
References:
Tags:
- Domain: Cloud
- Data Source: AWS
- Data Source: Amazon Web Services
- Data Source: AWS EC2
- Use Case: Threat Detection
- Tactic: Defense Evasion
- Resources: Investigation Guide
Version: 1
Rule authors:
- Elastic
Rule license: Elastic License v2
Investigation guide
editTriage and analysis
Investigating AWS EC2 NACL Entry Created or Replaced Allowing All Traffic by New Identity
This rule fires when a NACL entry specifying all ports (0–65535) and all protocols is created or replaced. While NACLs are stateless and secondary to security groups, a permissive NACL entry can neutralize a defense-in-depth layer and may indicate an adversary attempting to ensure unrestricted connectivity for their tools or exfiltration channels.
Possible investigation steps
-
Identify the creating principal (
aws.cloudtrail.user_identity.arn) and determine whether they are authorized to modify network ACLs. -
Review
aws.cloudtrail.request_parametersto identify the NACL ID, rule number, egress/ingress direction, and CIDR block (0.0.0.0/0for any-source rules are highest severity). - Determine which subnets are associated with the modified NACL and assess the sensitivity of workloads in those subnets.
- Check for accompanying security group modifications that also expand access.
- Review VPC flow logs for unusual traffic to or from the affected subnets following the NACL change.
-
Review
event.outcome—successmeans the permissive entry was applied and the subnet’s network-layer controls are weakened now;failuremeans the change was blocked, which from a new identity often indicates credential probing or permission reconnaissance.
False positive analysis
- Architectures that use NACLs as a stateless passthrough while relying on security groups for granular control may legitimately create permissive NACL entries.
- Development environments sometimes use open NACLs for convenience.
Response and remediation
- If unauthorized, immediately delete the permissive NACL entry and replace it with an appropriately restrictive rule.
- Review VPC flow logs for evidence of network activity that exploited the open rule.
Setup
editThe AWS CloudTrail integration must be enabled and configured to collect EC2 management events.
Rule query
editdata_stream.dataset: "aws.cloudtrail"
and event.provider: "ec2.amazonaws.com"
and event.action: ("CreateNetworkAclEntry" or "ReplaceNetworkAclEntry")
and not aws.cloudtrail.user_identity.type: "AWSService"
and event.outcome: ("success" or "failure")
and aws.cloudtrail.flattened.request_parameters.aclProtocol: "-1"
and aws.cloudtrail.flattened.request_parameters.ruleAction: "allow"
and not user_agent.original: (*Terraform* or *terraform* or "cloudformation.amazonaws.com" or *pulumi* or *Pulumi*)
Framework: MITRE ATT&CKTM
-
Tactic:
- Name: Defense Evasion
- ID: TA0005
- Reference URL: https://attack.mitre.org/tactics/TA0005/
-
Technique:
- Name: Impair Defenses
- ID: T1562
- Reference URL: https://attack.mitre.org/techniques/T1562/
-
Sub-technique:
- Name: Disable or Modify Cloud Firewall
- ID: T1562.007
- Reference URL: https://attack.mitre.org/techniques/T1562/007/