2021-09-14 12:20:57 +00:00
id : elasticbeantalk-takeover
2021-09-14 06:39:07 +00:00
info :
2022-03-17 17:01:45 +00:00
name : ElasticBeanTalk Subdomain Takeover Detection
2021-09-14 12:20:57 +00:00
author : philippedelteil,rotemreiss
2021-09-14 06:39:07 +00:00
severity : high
2022-03-17 17:01:45 +00:00
description : ElasticBeanTalk subdomain takeover detected. A subdomain takeover occurs when an attacker gains control over a subdomain of a target domain. Typically, this happens when the subdomain has a canonical name (CNAME) in the Domain Name System (DNS), but no host is providing content for it.
2021-09-14 06:39:07 +00:00
reference :
2021-09-14 11:26:36 +00:00
- https://github.com/EdOverflow/can-i-take-over-xyz/issues/147 # kudos to @m7mdharoun for sharing process details.
2021-09-14 06:39:07 +00:00
- https://twitter.com/payloadartist/status/1362035009863880711
- https://www.youtube.com/watch?v=srKIqhj_ki8
2022-03-17 17:01:45 +00:00
classification :
cvss-score : 7.2
cvss-metrics : CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
cwe-id : CWE-404
2021-09-14 09:16:23 +00:00
tags : dns,takeover,aws
2021-09-16 15:54:33 +00:00
metadata :
2021-09-14 12:20:57 +00:00
comments : |
Only CNAMEs with region specification are hijackable.
You need to claim the CNAME in AWS portal (https://aws.amazon.com/) or via AWS CLI to confirm the takeover.
Do not report this without claiming the CNAME.
CLI command to verify the availability of the environment :
aws elasticbeanstalk check-dns-availability --region {AWS_REGION} --cname-prefix {CNAME_PREFIX}
For example :
CNAME - 2rs3c.eu-west-1.elasticbeanstalk.com
Command - aws elasticbeanstalk check-dns-availability --region eu-west-1 --cname-prefix 2rs3c
2021-09-14 11:26:36 +00:00
2021-09-14 06:39:07 +00:00
dns :
- name : "{{FQDN}}"
type : A
2021-09-14 11:29:42 +00:00
2021-09-14 06:39:07 +00:00
matchers-condition : and
matchers :
2021-09-14 11:29:42 +00:00
2021-09-14 11:26:36 +00:00
- type : regex
regex :
- \.(us|af|ap|ca|eu|me|sa)\-(east|west|south|northeast|southeast|central)\-[1-9]+\.elasticbeanstalk\.com
2021-09-14 11:29:42 +00:00
2021-09-14 06:39:07 +00:00
- type : word
words :
- "NXDOMAIN"
2021-09-14 11:29:42 +00:00
2021-09-14 11:26:36 +00:00
extractors :
- type : regex
group : 1
regex :
- "IN\tCNAME\t(.+)"
2022-03-17 17:01:45 +00:00
# Enhanced by mp on 2022/03/14