id: ec2-detection

info:
  name: AWS EC2 Detection
  author: melbadry9
  severity: info
  description: Amazon Elastic Compute Cloud (EC2) detected.
  reference:
    - https://aws.amazon.com/ec2/
    - https://infosecwriteups.com/dangling-dns-aws-ec2-e2d801701e8
  classification:
    cwe-id: CWE-200
  metadata:
    max-request: 1
  tags: dns,ec2,aws

dns:
  - name: "{{FQDN}}"
    type: CNAME

    extractors:
      - type: regex
        regex:
          - "ec2-[-\\d]+\\.compute[-\\d]*\\.amazonaws\\.com"
          - "ec2-[-\\d]+\\.[\\w\\d\\-]+\\.compute[-\\d]*\\.amazonaws\\.com"
# digest: 490a0046304402200db5f928a66a67c8574159c33c8864f0db076d31b7c6ab658cd792accad1d65702201ccf0864bea4e34bab0d1aff2c6a1ee6ce984c5b87d009e3c0ad918d415ef0d9:922c64590222798bb761d5b6d8e72950