Open Inbound NACL Traffic
ID: nacl-open-inbound
Severity: medium
Author: princechaddha
Tags: cloud,devops,aws,amazon,vpc,aws-cloud-config
Description
Section titled “Description”Checks for Amazon VPC Network ACLs with inbound rules allowing traffic from all IPs across all ports, increasing the risk of unauthorized access.
YAML Source
Section titled “YAML Source”id: nacl-open-inboundinfo: name: Open Inbound NACL Traffic author: princechaddha severity: medium description: | Checks for Amazon VPC Network ACLs with inbound rules allowing traffic from all IPs across all ports, increasing the risk of unauthorized access. impact: | Allows unrestricted access to resources within the subnet, potentially exposing sensitive data or services to unauthorized users. remediation: | Restrict Network ACL inbound rules to only allow necessary IP ranges and ports as per the Principle of Least Privilege. reference: - https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html metadata: max-request: 2 tags: cloud,devops,aws,amazon,vpc,aws-cloud-configvariables: region: "us-east-1"
flow: | code(1) for(let NACLIDs of iterate(template.nacls)){ set("naclid", NACLIDs) code(2) }
self-contained: truecode: - engine: - sh - bash source: | aws ec2 describe-network-acls --region $region --query 'NetworkAcls[*].NetworkAclId' --output json
extractors: - type: json name: nacls internal: true json: - '.[]'
- engine: - sh - bash source: | aws ec2 describe-network-acls --region $region --network-acl-ids $naclid --query 'NetworkAcls[*].Entries[?(RuleAction==`allow`) && (Egress==`false`)] | []'
matchers-condition: and matchers: - type: word words: - "allow" condition: and
- type: word words: - "PortRange" negative: true
extractors: - type: dsl dsl: - '"Access to the VPC subnets associated with your NACL " + naclid + " is not restricted."'# digest: 4a0a00473045022038258a9ed742e00db36fcc2c517562a509834fddfd0ff2f229c0de8ce3d93038022100f1b4b3278f9e9987c7aa831106f107e16c7053eff871cc90f2cd512eda8671d1:922c64590222798bb761d5b6d8e72950Guide to check the vulnerabilities
Section titled “Guide to check the vulnerabilities”This template is used to detect vulnerabilities in web applications. It can be used with the Nuclei tool to scan for specific patterns or behaviors.
$ nuclei -u "URL" -t "cloud/aws/vpc/nacl-open-inbound.yaml"