EdOverflow / can-i-take-over-xyz

"Can I take over XYZ?" — a list of services and how to claim (sub)domains with dangling DNS records.
Creative Commons Attribution 4.0 International
4.78k stars 712 forks source link

Can aws elasticbeanstalk service be takeover with env? #194

Open Phoenix1112 opened 3 years ago

Phoenix1112 commented 3 years ago

hello. I know it is possible for the aws elasticbeanstalk service to have a takeover if the conditions are met. For this, the region named elasticbeanstalk should be used. but if there is "env" in the same name, I don't know if it will be takeover.

example:

example.elasticbeanstalk.com > it is not vulnerable

example.us-west-2.elasticbeanstalk.com > it is vulnerable

example-env.6zycefn8gp.us-west-2.elasticbeanstalk.com > I don't know if this is vulnerable or not.

There is a 10-digit name in the subdomain after env. "6zycefn8gp" .. I think the aws service adds this automatically and I want to know if there is a method to get it.

ethrx commented 3 years ago

This 10-digit name is there for the exact reason you want to claim it. I remember reading a report once about someone who created tens of thousands of AWS services to try and get this same random code, but failed.

indianajson commented 3 years ago

I have performed takeovers in the past with this exact scenario. Unless AWS has updated that system you can attempt to claim an ElasticBeanstalk instance under the name of 6zycefn8gp in the us-west-2 zone and then you will be able to control "example-env.6zycefn8gp.us-west-2.elasticbeanstalk.com".

pahennig commented 3 years ago

At this moment, Elastic beanstalk does not allow you to add special characters like . - And notice that this will happen if we create an environment without setting a name on it:

That is, at this moment, it's only possible to perform a takeover on this service if it was created with a custom name filled by the user, witch is quite normal.

indianajson commented 3 years ago

Taking over 6zycefn8gp.us-east-1.elasticbeanstalk.com, will give you access to any.6zycefn8gp.us-east-1.elasticbeanstalk.com (assuming the first is available here because you can configure the subdomain in your Apache/PHP configuration. You don't perform the takeover by adding the full name with the period.

Phoenix1112 commented 3 years ago

yes it makes sense but how to set "any.6zycefn8gp.us-east-1.elasticbeanstalk.com" after getting "6zycefn8gp.us-east-1.elasticbeanstalk.com"... aws then "." will it allow us to get a new elastic name using? Or do we need a wildcard cname-style setting without a new name?

Phoenix1112 commented 3 years ago

I don't speak English very well and if I'm not reading wrong, the answer to the question we're looking for is hidden here.

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.CNAMESwap.html

Alt Text

indianajson commented 3 years ago

The CNAME record AWS adds to their system is wildcarded if I remember correctly. So you just need to setup the configuration within the ElasticBeanstalk instance I believe. I'm away from my desktop so I can't go check the steps at the moment.

0xpr4bin commented 1 year ago

yes it makes sense but how to set "any.6zycefn8gp.us-east-1.elasticbeanstalk.com" after getting "6zycefn8gp.us-east-1.elasticbeanstalk.com"... aws then "." will it allow us to get a new elastic name using? Or do we need a wildcard cname-style setting without a new name?

did you find a way to takeover ? I have same problem here. Is it still possible to takeover for any.ygxtg5zgwz.eu-west-1.elasticbeanstalk.com

d55pak commented 1 year ago

yes this is still vulnerable

daxin09pp commented 9 months ago

Can I apply for a domain name in the format eba-xxxxxxxx.us-east-1.elasticbeanstalk.com? When I sign up, I get this error. eba. - The beginning is reserved? How the others applied. image

Abhinavkuamr commented 8 months ago

is this vulnearble ? something_but_its_not_random-env.ap-northeast-1.elasticbeanstalk.com