-
-
Notifications
You must be signed in to change notification settings - Fork 716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Amazon S3 proofs #36
Comments
Official documentation link: https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html |
I've come across a sub-domain which confirms the error message: When use the dig command, the CNAME points to a random.cloudfront.net URL. On trying to follow the above steps, getting below message while creating the S3 bucket with same name: I'm entering the full sub-domain name in the bucket name. Am I missing something to check? Update: I've been able to find the S3 bucket URL: subdomain.s3.amazonaws.com |
@soynek You're going to need to dig into the documentation for this one, we've had to draw the line at this repository being treated like a support desk. This is here to outline the work people have contributed back, and to outline vulnerable areas, but if you have a specific subdomain takeover question then the documentation for that service is where you should be looking. |
@codingo |
Hi |
@yoursquad13 Because *.cloudfront.net is not a subdomain for S3 |
@webliqui |
Have you guys ran the AWS CLI like |
@webliqui You found something? |
same issue as @webliqui. @codingo? |
I believe, as I mentioned above, this issue is related to the region. This bucket may not be created on the region that you are testing on. But if you use the AWS CLI ( |
Hi @soareswallace :), Regards, |
I believe when we get this message @Mik317 , the take over is not possible. This message show that the bucket does exist and has an owner. Stay safe, Wallace |
Hi @soareswallace :). Until that, stay safe and hack the world ;) Regards, |
Hi @soareswallace |
Hi @FaizanNehal, I tried once, but never found out how to do it. I also would like to know how we can takeover. Let us know if you discover anything. Wallace |
Anyone knows about amazon route 53???? Is it vulnerable? |
I found a subdomain.domain.com that is vulnerable, and confirmed with dig that CNAME was for s3 bucket in Verginia my question is since it is not mentioned in the steps above how to make those regexes point to subdomain.domain.com? |
is this service still vulnerable? |
Not really, usually before the elb there's a random number. |
Hi, |
did u find any info about it? |
So far, from what I could search about it, is not possibly to take over amazon's load balance. |
And as @pdelteil replied above:
|
okey , thanks |
Hi guys, is this still vulnerable? |
Hi guys I found the following scenario:
Also tried the to create the bucket as static website hosting. Does anyone found this scenario or know what's happening here? |
Is this edge case now? |
No |
Service name
Amazon (AWS) S3
Proof
Amazon S3 service is indeed vulnerable. Amazon S3 follows pretty much the same concept of virtual hosting as other cloud providers. S3 buckets might be configured as website hosting to serve static content as web servers. If the canonical domain name has website in it, the S3 bucket is specified as Website hosting. I suspect that non-website and website configured buckets are handled by separate load balancers, and therefore they don't work with each other. The only difference will be in the bucket creation where correct website flag needs to be set if necessary. Step-by-step process:
To verify the domain, I run:
Note that there are two possible error pages depending on the bucket settings (set as website hosting or not).
Some reports on H1, claiming S3 buckets:
Documentation
There are several formats of domains that Amazon uses for S3 (RegExp):
^[a-z0-9\.\-]{0,63}\.?s3.amazonaws\.com$
^[a-z0-9\.\-]{0,63}\.?s3-website[\.-](eu|ap|us|ca|sa|cn)-\w{2,14}-\d{1,2}\.amazonaws.com(\.cn)?$
^[a-z0-9\.\-]{0,63}\.?s3[\.-](eu|ap|us|ca|sa)-\w{2,14}-\d{1,2}\.amazonaws.com$
^[a-z0-9\.\-]{0,63}\.?s3.dualstack\.(eu|ap|us|ca|sa)-\w{2,14}-\d{1,2}\.amazonaws.com$
Note that there are cases where only raw domain (e.g. s3.amazon.com) is included in CNAME and takeover is still possible.
(Documentation taken from https://0xpatrik.com/takeover-proofs/)
The text was updated successfully, but these errors were encountered: