nuclei-templates/cloud/aws/vpc/vpc-flowlogs-not-enabled.yaml

59 lines
1.7 KiB
YAML

id: vpc-flowlogs-not-enabled
info:
name: VPC Flow Logs Not Enabled
author: princechaddha
severity: low
description: |
Ensures Amazon VPC Flow Logs are enabled for tracking network traffic to and from VPCs, aiding in security and troubleshooting.
impact: |
Without VPC Flow Logs, detecting abnormal traffic patterns or breaches becomes difficult, increasing risk of undetected threats.
remediation: |
Enable VPC Flow Logs in the AWS Management Console under the VPC dashboard to collect data on IP traffic going to and from network interfaces in your VPC.
reference:
- https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html
metadata:
max-request: 2
tags: cloud,devops,aws,amazon,vpc,aws-cloud-config
variables:
region: "us-east-1"
flow: |
code(1)
for(let VpcIds of iterate(template.VpcId)){
set("vpc", VpcIds)
code(2)
}
self-contained: true
code:
- engine:
- sh
- bash
source: |
aws ec2 describe-vpcs --region $region --query 'Vpcs[*].VpcId' --output json
extractors:
- type: json
name: VpcId
internal: true
json:
- '.[]'
- engine:
- sh
- bash
source: |
aws ec2 describe-flow-logs --region $region --filter "Name=resource-id,Values=$vpc"
matchers:
- type: word
words:
- "[]"
condition: and
extractors:
- type: dsl
dsl:
- '"Flow Logs feature is not enabled for the VPC " + vpc'
# digest: 490a0046304402204d7a7d1871ae4512c2ddb09b3645f3c6198d9b1a2e3a23f9f6c4b64dd72f50270220375ec12b44621a7a765b301bf627747d6610602e3275091e81cabf53f0a65684:922c64590222798bb761d5b6d8e72950