Code Monkey home page Code Monkey logo

can-i-take-over-xyz's Introduction

image

Disclaimer ⚠️

The authors of this document take no responsibility for correctness. This project is merely here to help guide security researchers towards determining whether something is vulnerable or not, but does not guarantee accuracy. This project heavily relies on contributions from the public; therefore, proving that something is vulnerable is the security researcher and bug bounty program's sole discretion.

Furthermore, it is important to clarify that this project does not aim to identify or disclose bypasses to security measures implemented by various services. Instead, it is expected that such bypasses be reported directly to the affected service for appropriate action.

Finally, it is worth noting that some bug bounty programs may accept dangling DNS record reports without requiring proof of compromise.

What is a subdomain takeover?

Subdomain takeover vulnerabilities occur when a subdomain (subdomain.example.com) is pointing to a service (e.g. GitHub pages, Heroku, etc.) that has been removed or deleted. This allows an attacker to set up a page on the service that was being used and point their page to that subdomain. For example, if subdomain.example.com was pointing to a GitHub page and the user decided to delete their GitHub page, an attacker can now create a GitHub page, add a CNAME file containing subdomain.example.com, and claim subdomain.example.com.

You can read up more about subdomain takeovers here:

Safely demonstrating a subdomain takeover

Based on personal experience, claiming the subdomain discreetly and serving a harmless file on a hidden page is usually enough to demonstrate the security vulnerability. Do not serve content on the index page. A good proof of concept could consist of an HTML comment served via a random path:

$ cat aelfjj1or81uegj9ea8z31zro.html
<!-- PoC by username -->

Please be advised that this depends on what bug bounty program you are targeting. When in doubt, please refer to the bug bounty program's security policy and/or request clarifications from the team behind the program.

How to use this project

I recommend searching for the name of the service you are targeting in the issues tab. That way you can see the on-going discussion and more detailed steps on how to claim the subdomain you are after.

How to contribute

You can submit new services here: https://github.com/EdOverflow/can-i-take-over-xyz/issues/new?template=new-entry.md.

A list of services that can be checked (although check for duplicates against this list first) can be found here: #26.

All entries

Note: fingerprints.json is automatically updated based on the content of this table.

Column header definitions:

  • Engine: Name of service
  • Status: Whether the service is vulnerable
  • Verified by CI/CD: Whether automated fingerprint check is currently passing
  • Domains: Comma-separate domains (used for fingerprint auto-verification)
  • Fingerprint: Regex indicating vulnerable page (or NXDOMAIN, indicating non-existent DNS record)
  • Discussion: Link to issue on this repo for discussion
  • Documentation: Link to official documentation
Engine Status Verified by CI/CD Domains Fingerprint Discussion Documentation
AWS/Elastic Beanstalk Vulnerable 🟩 elasticbeanstalk.com NXDOMAIN Issue #194
AWS/Load Balancer (ELB) Not vulnerable 🟥 elb.amazonaws.com NXDOMAIN Issue #137
AWS/S3 Vulnerable 🟩 s3.amazonaws.com The specified bucket does not exist Issue #36
Acquia Not vulnerable 🟥 Web Site Not Found Issue #103
Agile CRM Vulnerable 🟥 agilecrm.com Sorry, this page is no longer available. Issue #145
Airee.ru Vulnerable 🟩 airee.ru Ошибка 402. Сервис Айри.рф не оплачен Issue #104
Akamai Not vulnerable 🟥 Issue #13
Anima Vulnerable 🟩 animaapp.io The page you were looking for does not exist. Issue #126 Anima Documentation
Bitbucket Vulnerable 🟩 bitbucket.io Repository not found Issue #97
Campaign Monitor Vulnerable 🟥 Trying to access your account? Issue #275 Support Page
Canny Vulnerable 🟥 Company Not Found There is no such company. Did you enter the right URL? Issue #114
Cargo Collective Vulnerable 🟥 404 Not Found Issue #152 Cargo Support Page
Cloudfront Not vulnerable 🟥 ViewerCertificateException Issue #29 Domain Security on Amazon CloudFront
Desk Not vulnerable 🟥 Please try again or try Desk.com free for 14 days. Issue #9
Digital Ocean Vulnerable 🟥 Domain uses DO name servers with no records in DO.
Discourse Vulnerable 🟩 trydiscourse.com NXDOMAIN Issue #49 Hackerone
Dreamhost Not vulnerable 🟥 Site Not Found Well, this is awkward. The site you're looking for is not here. Issue #153 Issue #5
Fastly Not vulnerable 🟥 Fastly error: unknown domain: Issue #22
Feedpress Not vulnerable 🟥 The feed has not been found. Issue #80
Firebase Not vulnerable 🟥 Issue #128
Fly.io Not vulnerable 🟥 404 Not Found Issue #101
Freshdesk Not vulnerable 🟥 We couldn't find servicedesk.victim.tld Maybe this is still fresh! You can claim it now at http://www.freshservice.com/signup Issue #214 Freshdesk Support Page
Frontify Edge case 🟥 404 - Page Not Found Oops… looks like you got lost Issue #170
Gemfury Vulnerable 🟩 furyns.com 404: This page could not be found. Issue #154 Article
Getresponse Vulnerable 🟥 With GetResponse Landing Pages, lead generation has never been easier Issue #235
Ghost Vulnerable 🟥 ghost.io Site unavailable\.&#124;Failed to resolve DNS path for this host Issue #89
Github Edge case 🟥 There isn't a GitHub Pages site here. Issue #37 Issue #68
Gitlab Not vulnerable 🟥 HackerOne #312118
Google Cloud Storage Not vulnerable 🟥 <?xml version='1.0' encoding='UTF-8'?><Error><Code>NoSuchBucket</Code><Message>The specified bucket does not exist.</Message></Error>
Google Sites Not vulnerable 🟥 The requested URL was not found on this server. That’s all we know. Issue #277 Google Support
HatenaBlog Vulnerable 🟩 hatenablog.com 404 Blog is not found
Help Juice Vulnerable 🟩 helpjuice.com We could not find what you're looking for. Help Juice Support Page
Help Scout Vulnerable 🟩 helpscoutdocs.com No settings were found for this company: HelpScout Docs
Helprace Vulnerable 🟩 helprace.com HTTP_STATUS=301 Issue #115
Heroku Edge case 🟥 No such app Issue #38
HubSpot Not vulnerable 🟥 This page isn't available Issue #59
Instapage Not vulnerable 🟥 Issue #73
Intercom Edge case 🟥 Uh oh. That page doesn't exist. Issue #69 Help center
JetBrains Vulnerable 🟥 youtrack.cloud is not a registered InCloud YouTrack PR #107 YouTrack InCloud Help Page
Key CDN Not vulnerable 🟥 Issue #112
Kinsta Not vulnerable 🟥 No Site For Domain Issue #48 kinsta-add-domain
Landingi Edge case 🟥 It looks like you’re lost... Issue #117
LaunchRock Vulnerable 🟥 launchrock.com HTTP_STATUS=500 Issue #74
Mailchimp Not vulnerable 🟥 We can't find that page It looks like you're trying to reach a page that was built by Mailchimp but is no longer active. Discussion #250
Mashery Edge case 🟥 Unrecognized domain Issue #14 HackerOne
Microsoft Azure Vulnerable 🟩 cloudapp.net, cloudapp.azure.com, azurewebsites.net, blob.core.windows.net, cloudapp.azure.com, azure-api.net, azurehdinsight.net, azureedge.net, azurecontainer.io, database.windows.net, azuredatalakestore.net, search.windows.net, azurecr.io, redis.cache.windows.net, azurehdinsight.net, servicebus.windows.net, visualstudio.com NXDOMAIN Issue #35
Netlify Edge case 🟥 Not Found - Request ID: Issue #40
Ngrok Vulnerable 🟩 ngrok.io Tunnel .*.ngrok.io not found Issue #92 Ngrok Documentation
Pantheon Vulnerable 🟥 404 error unknown site! Issue #24 Documentation Pantheon-Sub-takeover
Pingdom Vulnerable 🟥 Sorry, couldn't find the status page Issue #144 Support Page
Readme.io Vulnerable 🟥 readme.io The creators of this project are still working on making everything perfect! Issue #41
Readthedocs Vulnerable 🟥 The link you have followed or the URL that you entered does not exist. Issue #160
Sendgrid Not vulnerable 🟥
Shopify Edge case 🟥 Sorry, this shop is currently unavailable. Issue #32 Issue #46 Medium Article
Short.io Vulnerable 🟥 Link does not exist Issue #260
SmartJobBoard Vulnerable 🟩 52.16.160.97 This job board website is either expired or its domain name is invalid. Issue #139 Support Page
Smartling Edge case 🟥 Domain is not configured Issue #67
Smugsmug Vulnerable 🟥 Issue #60
Squarespace Not vulnerable 🟥
Statuspage Not vulnerable 🟥 Status page pushed a DNS verification in order to prevent malicious takeovers what they mentioned in This Doc PR #105 PR #171 Statuspage documentation
Strikingly Vulnerable 🟩 s.strikinglydns.com PAGE NOT FOUND. Issue #58 Strikingly-Sub-takeover
Surge.sh Vulnerable 🟩 na-west1.surge.sh project not found Issue #198 Surge Documentation
SurveySparrow Vulnerable 🟩 surveysparrow.com Account not found. Issue #281 Custom domain
Tilda Edge case 🟥 Please renew your subscription Issue #155 PR #20
Tumblr Edge case 🟥 Whatever you were looking for doesn't currently exist at this address Issue #240 Tumblr Custom Domains
Uberflip Vulnerable 🟩 read.uberflip.com The URL you've accessed does not provide a hub. Issue #150 Uberflip Documentation
Unbounce Not vulnerable 🟥 The requested URL was not found on this server. Issue #11
Uptimerobot Vulnerable 🟥 stats.uptimerobot.com page not found Issue #45 Uptimerobot-Sub-takeover
UserVoice Not vulnerable 🟥 This UserVoice subdomain is currently available! Issue #163
Vercel Edge case 🟥 https://nonexistent-example.vercel.com/ DEPLOYMENT_NOT_FOUND. Issue #183 Adding & Configuring a Custom Domain
WP Engine Not vulnerable 🟥
Webflow Edge case 🟥 The page you are looking for doesn't exist or has been moved. Issue #44 forum webflow
Wix Edge case 🟥 Looks Like This Domain Isn't Connected To A Website Yet! Issue #231
Wordpress Vulnerable 🟩 wordpress.com Do you want to register .*.wordpress.com? PR #176
Worksites Vulnerable 🟩 worksites.net, 69.164.223.206 Hello! Sorry, but the website you&rsquo;re looking for doesn&rsquo;t exist. Issue #142
Zendesk Not vulnerable 🟥 Help Center Closed Issue #23 Zendesk Support

can-i-take-over-xyz's People

Contributors

0xd3vil avatar adiffpirate avatar arshadkazmi42 avatar avileox avatar baibhavanand avatar bayotop avatar chan9390 avatar codingo avatar diophant0x avatar dsopas avatar edoverflow avatar eraymitrani avatar github-actions[bot] avatar haccer avatar hloverflow avatar indianajson avatar janmasarik avatar joren485 avatar kushagra avatar linuxsploit avatar lucky098 avatar lukehealy avatar martinbydefault avatar mdeous avatar pdelteil avatar qurbat avatar random-robbie avatar random-robbie-research avatar sawravchy avatar thetechromancer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

can-i-take-over-xyz's Issues

Ask about response

can a response like the one below take over?

; <<>> DiG 9.10.3-P4-Ubuntu <<>> -t A 0day.xxxxx.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 12015
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;0day.xxxxx.com. IN A

;; AUTHORITY SECTION:
0day.xxxxx.com. 900 IN SOA ns-xxx.awsdns-61.co.uk. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400

;; Query time: 62 msec
;; SERVER: 192.168.xx.xx#53(192.168.xx.xx)
;; WHEN: Fri Nov 23 18:53:17 DST 2018
;; MSG SIZE rcvd: 130

subdomain takeover at FeedPress not working

Service name: FeedPress

Documentation

Based on the information shared in the hackerone report for FeedPress based subdomain, not able to takeover the ownership. The error message on the URL stated:

FeedPress
The feed has not been found.
You have a blog or a website? Let us handle your RSS feeds.

After creating the account on feedpress, and trying to takeover the subdomain by selecting My Hostname and entering the programs sub-domain, it results in the error message - "The hostname xyz.domain.com is already registered on FeedPress."

Is the sub-domain takeover in such scenario possible?

Thanks

Microsoft Azure proofs

Service name

Microsoft Azure

Proof

There is no general approach for PoC. Microsoft Azure offers multiple services (CloudApp, Azure Websites, etc.) that use different domain names.

General approach in verifying subdomain takeover is to check, whether the Azure domain responds with NXDOMAIN DNS status. This is (to my knowledge) the necessary condition of the domain, however it is not sufficient. In other words, not all Azure domains which are used in some CNAME and respond with NXDOMAIN are vulnerable to subdomain takeover. I personally got a case where Azure portal refused to create a domain even though it responded with NXDOMAIN.

Some H1 reports to prove this point:

As mentioned before, the PoC creation depends on the service in question, however, they generally tend to have similar workflows.

Documentation

These are the domains that are identified as vulnerable. Each of these is used for particular Azure service:

  • *.cloudapp.net
  • *.cloudapp.azure.com
  • *.azurewebsites.net
  • *.blob.core.windows.net
  • *.cloudapp.azure.com
  • *.azure-api.net
  • *.azurehdinsight.net
  • *.azureedge.net
  • *.azurecontainer.io
  • *.database.windows.net
  • *.azuredatalakestore.net
  • *.search.windows.net
  • *.azurecr.io
  • *.redis.cache.windows.net
  • *.azurehdinsight.net
  • *.servicebus.windows.net
  • *.visualstudio.com

Subdomain Takeover through readme.io

Subdomain Takeover through readme.io

readme.io is another service which's subdomains can be taken over if it says "Project doesnt exist... yet!". There's a sign-up button and if someone does, then just simply entering the domain name on custom domain option can take over it.

Proof

I took over developer.bksah.com earlier. but didn't keep any PoC though. But it looks same like that as readme.io hosted sites are a subdomain of readme.io

https://xyz124.readme.io/inactive

Documentation

https://readme.readme.io/docs/introduction

List of specific sub-domains seen as CNAMEs

Hi, I wanted to share a list of CNAMEs (or rather just substrings), seen for sub-domains from public BBPs/VDPs on various platforms that might indicate a takeover-able sub-domain. I created the list a few months ago (it might be dated) and never found time to utilize it further so I'm sharing it publicly as it might be helpful to extend what this repository covers:

  • .herokudns.com, .herokuapp.com, herokussl.com
  • .azurewebsites.net, .cloudapp.net, .azure-api.net, .trafficmanager.net, .azureedge.net, .cloudapp.azure.com
  • .cloudfront.net, .s3.amazonaws.com, .awsptr.com, .elasticbeanstalk.com,
  • .uservoice.com
  • unbouncepages.com
  • ghs.google.com, ghs.googlehosted.com, .ghs-ssl.googlehosted.com
  • .github.io, www.gitbooks.io
  • sendgrid.net
  • .feedpress.me
  • .fastly.net
  • .webflow.io, proxy.webflow.com
  • .helpscoutdocs.com
  • .readmessl.com
  • .desk.com
  • .zendesk.com
  • .mktoweb.com
  • .wordpress.com, .wpengine.com
  • .cloudflare.net
  • .netlify.com
  • .bydiscourse.com
  • .netdna-cdn.com
  • .pageserve.co
  • .pantheonsite.io
  • .arlo.co
  • .apigee.net
  • .pmail5.com
  • .cm-hosting.com
  • ext-cust.squarespace.com, ext.squarespace.com, www.squarespace6.com
  • .locationinsight.com
  • .helpsite.io
  • saas.moonami.com
  • custom.bnc.lt
  • .qualtrics.com
  • .dotcmscloud.net, .dotcmscloud.com
  • .knowledgeowl.com
  • .atlashost.eu
  • headwayapp.co
  • domain.pixieset.com
  • cname.bitly.com
  • .awmdm.com
  • .meteor.com
  • .postaffiliatepro.com, na.iso.postaffiliatepro.com
  • .copiny.com
  • .kxcdn.com
  • phs.getpostman.com
  • .appdirect.com
  • .streamshark.io

The ones below need an approved registration, a demo or similar stuff so it's hard to tell if they are takeover-able or not:

  • .ethosce.com
  • .custhelp.com
  • .onelink-translations.com
  • .mashery.com
  • .edgesuite.net
  • .akadns.net
  • .edgekey.net
  • akamaiedge.net
  • .edgekey-staging.net
  • .lldns.net
  • .edgecastcdn.net
  • centercode.com
  • .jivesoftware.com
  • .cvent.com
  • .covisint.com
  • .digitalrivercontent.net
  • .akahost.net
  • .connectedcommunity.org
  • .lithium.com
  • .sl.smartling.com
  • pfsweb.com
  • .bsd.net
  • .vovici.net
  • .extole.com
  • .ent-sessionm.com
  • .eloqua.com
  • .inscname.net
  • insnw.net
  • .2o7.net
  • .wnmh.net
  • .footprint.net
  • .llnwd.net
  • .cust.socrata.net
  • .scrool.se
  • .phenompeople.com
  • .investis.com
  • .skilljar.com
  • .imomentous.com
  • .cleverbridge.com
  • .insnw.net
  • sailthru.com
  • static.captora.com
  • .q4web.com
  • .omtrdc.net
  • .devzing.com
  • .pphosted.com
  • .securepromotion.com
  • .getbynder.com
  • .certain.com
  • .certainaws.com
  • .eds.com
  • .bluetie.com
  • .relayware.com
  • .yodlee.com
  • .mrooms.net
  • ssl.cdntwrk.com
  • secure.gooddata.com
  • .deltacdn.net
  • .happyfox.com
  • .proformaprostores.com
  • .yext-cdn.com
  • .edgecastdns.net
  • .ecdns.net

Have fun.

Shopify Real Check with REST API

Service name

Shopify

Proof

  1. Page must contain: Sorry, this shop is currently unavailable.
  2. CNAME must contain: myshopify.com or shops.myshopify.com
  3. REST API Query must answer with: "status":"available"

Please read the docs for more details.

Documentation

I wrote a long article and release a small script that performs three types of test (page error message, CNAME and REST API query).
https://medium.com/@thebuckhacker/how-to-do-55-000-subdomain-takeover-in-a-blink-of-an-eye-a94954c3fc75
https://github.com/buckhacker/SubDomainTakeoverTools/blob/master/ShopifySubdomainTakeoverCheck.py

Distil Networks Portal Proof

Service name

Distil Networks Portal

Fingerprint

Requested Domain Unavailable

Documentation

  1. Log your cPanel administrative portal
  2. Select the DNS Zone Editor icon in the Domains section.
  3. Select the domain you are modifying from the drop-down box.
  4. Scroll down to the heading named Add DNS Record.
  5. In the Host Record field, enter the your www.
  6. Set the TTL to 1 Minute.
  7. Select CNAME for your application from the the drop-down labeled Type.
  8. In the Points To field, enter www.yourwebsite.com.distil.us
  9. Click Add Record.

Reference:

https://help.distilnetworks.com/hc/en-us/articles/216808648-Adding-Domains-and-Subdomains

Readme.io proofs

Service name

Readme.io (https://readme.io/)

Proof

The subdomains reside on *.readme.io. It is a classic virtual hosting scenario like in other similar services.

To verify whether subdomain takeover may be possible, run:

http -b GET http://{DOMAIN NAME} | grep -F -q "Project doesnt exist... yet!" && echo "Subdomain takeover may be possible" || echo "Subdomain takeover is not possible"

(Assuming you have Readme.io account created.)

  1. Go to dashboard.
  2. Set Project Name and its subdomain. Subdomain does not need to match the domain you are trying to takeover.
  3. In left sidebar, go to General Settings -> Custom Domain.
  4. Set Custom domain to the domain you want to takeover.
  5. Click Save.

Documentation

https://readme.readme.io/docs/setting-up-custom-domain

Mashery

Since the H1 report it's no longer possible to take over the domain.
Capture.png

subdomain takeover cloudfront

Service name

Hi, I check many sites daily of this security vulnerability and extracted many subdomains and while trying to register it is a problem as in the image of the solution
1 p2l3697uaa7mxkb6vng8yw

Proof

Documentation

A simple opinion.

Hi.

I think it is good to mark "time" in the template.

Example) "Kinsta" service was added. But when?

So, I think it would be nice to add "time" to the "All entries" table.

By doing so, the newly added service can be confirmed intuitively.

Thanks.

No clarification of handling false positives

For some of the mentioned vendors, which I've had experience dealing with, there is no clarification to hackers using this list of where a false positive could occur.

In the instance of Unbounce for example, an empty Unbounce would in some cases yield the same response as a claimed one.

By suggesting to hackers that it is vulnerable to takeover but it requires a paid account, this could cause confusion and lead to some hackers reading this to just file a report whenever they see an Unbounce with nothing on the homepage.

While I mentioned the Unbounce issue specifically, it might be good to mention the "gotchas" with other vendors when claiming domains more clearly (like is done presently with Fastly, although I think it could be clearer than just a "yes"). This isn't clear to lesser experienced hackers and likely also won't be clear to security teams handling these bugs, and would likely prevent it being fuel for long debates between hackers and teams about whether x takeover is actually vulnerable if it was more honest with the shortcomings of exploiting with certain vendors.

Heroku proofs

Service name

Heroku

Proof

Heroku has same virtual hosting concept as other cloud providers. Various *.herokudns.com subdomain respond with the same set of A records. HTTP Host matters for correct domain resolution (as in other providers). There is also an possibility to upload own certificate in order to work on custom domain as well (e.g. GitHub Pages doesn't support this and thus you cannot have HTTPS enabled with custom domain set).

Step-by-step:

  1. Open new Heroku app.
  2. Choose name and region (no effect on takeover).
  3. Push PoC application using git to Heroku. The process is described in Deploy tab.
  4. Switch to Settings tab.
  5. Scroll to Domains and certificates.
  6. Click Add domain.
  7. Provide the domain name you want to takeover, click Save changes.
  8. It might take some time for settings to propagate.

To verify:

http -b GET http://{DOMAIN NAME} | grep -F -q "//www.herokucdn.com/error-pages/no-such-app.html" && echo "Subdomain takeover may be possible" || echo "Subdomain takeover is not possible"

(there is an iFrame with aforementioned URL present)

Documentation

There are three domains that Heroku uses:

  • *.herokudns.com
  • *.herokuapp.com
  • *.herokussl.com

At the moment, I can confirm only proper working on herokudns.com. IIRC, herokuapp.com is a domain that was used prior and is now deprecated, however old DNS records still work. I would like to hear more in comments from somebody who has experience with the remaining two.

Error of Cloudflare is vulnerable or Not

Can anyone guide me that it is vulnerable or not?
The CNAME is pointed to the cloudflare
Web Page Blocked
Access to the web page you were trying to visit has been blocked in accordance with company policy. Please contact your system administrator if you believe this is in error.

Amazon S3 proofs

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:

  1. Go to S3 panel
  2. Click Create Bucket
  3. Set Bucket name to source domain name (i.e., the domain you want to take over)
  4. Click Next multiple times to finish
  5. Open the created bucket
  6. Click Upload
  7. Select the file which will be used for PoC (HTML or TXT file). I recommend naming it differently than index.html; you can use poc (without extension)
  8. In Permissions tab select Grant public read access to this object(s)
  9. After upload, select the file and click More -> Change metadata
  10. Click Add metadata, select Content-Type and value should reflect the type of document. If HTML, choose text/html, etc.
  11. (Optional) If the bucket was configured as a website
    1. Switch to Properties tab
    2. Click Static website hosting
    3. Select Use this bucket to host a website
    4. As an index, choose the file that you uploaded
    5. Click Save

To verify the domain, I run:

http -b GET http://{SOURCE DOMAIN NAME} | grep -E -q '<Code>NoSuchBucket</Code>|<li>Code: NoSuchBucket</li>' && echo "Subdomain takeover may be possible" || echo "Subdomain takeover is not possible"

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/)

Intertesting Find

Service name

AWS S3 && Fastly

I've come across a sub-domain with a CNAME pointing to Fastly.net service while the actual http fingerprint confirms the S3 bucket Not in Use.

Is there are possibility of takeover through S3 bucket (which is not known) while the CNAME points to i2.shared.us-eu.fastly.net?

Subdomain takeover via LaunchRock

Service name

LaunchRock offers service to create marketing pages.

Proof

I was able to perform subdomain takeover in the private program on H1. The POC costed me a 9$ to buy the Premium plan on service (adding custom subdomain is available only on Premium plan). The issue was confirmed, fixed, and rewarded.

Documentation

String to determine subdomain takeover:

It looks like you may have taken a wrong turn somewhere. Don't worry...it happens to all of us.

The vulnerable subdomain can be pointed to the LaunchRock via CNAME (example.launchrock.com) or via next A records:

54.243.190.28
54.243.190.39
54.243.190.47
54.243.190.54

If above conditions are met, we can perform subdomain takeover by adding a vulnerable subdomain as LaunchRock custom domain in the control panel

Ability to inject custom JS

Yes, we can add arbitrary Javascript through control panel.

Last checked date

Dec 2018

Subdomain Takeover through ngrok

Service name

Ngrok allows you to expose a web server running on your local machine to the internet. Just tell ngrok what port your web server is listening on.

Proof

Visiting the subdomain from your browser will show a HTML page, like shown below:

proof

Perform a dig or host command, you will see a CNAME record pointing to [CUSTOM].ngrok.io.

To perform the takeover:

  1. Make an account on https://ngrok.com/
  2. Link a credit card to your account and pay for the $5/month. Otherwise, you are not allowed to make use of Custom subdomains. Important to note: You will get a refund within 15 days.
  3. Follow the steps on https://dashboard.ngrok.com/get-started to link the binary to your account.
  4. Run the following command: ./ngrok http 80 -subdomain quikke. Note, quikke needs to be replaced with the value before .ngrok.io
    5.Visit the subdomain again:

takeover2

The error message is basically saying that I do not have a HTTP service running on port 80 on my local machine.

Documentation

APIs Subdomain Takeover

Usually we see the Subdomain Takeover vulnerability affecting the front-end but I think APIs can also be affected.
For example Apigee use the same CNAME approach to set up an environment (e.g. https://docs-new.apigee.com/custom-domain). The problem is you need a paid Apigee account to create the custom domain.
Do you guys have any reference example or reference that Apigee APIs or any other vendor can be exploited?

Thanks!
Ricardo Iramar

subdomain Takeover through wordpress.com

This Issue is vulnerable or not?

(Warning! Domain mapping upgrade for this domain not found. Please log in and go to the Domains Upgrades page of your blog to use this domain.)

If vulnerable then how i takeover through wordpress

GitHub Pages proofs

Service name

GitHub Pages

Proof

GitHub uses virtual hosting identical to other cloud services. The site needs to be specified explicitly in domain settings. Step-by-step process:

  1. Go to new repository page
  2. Set Repository name to canonical domain name (i.e., {something}.github.io from CNAME record)
  3. Click Create repository
  4. Push content using git to a newly created repo. GitHub itself provides the steps to achieve it
  5. Switch to Settings tab
  6. In GitHub Pages section choose master branch as source
  7. Click Save
  8. After saving, set Custom domain to source domain name (i.e., the domain name which you want to take over)
  9. Click Save

For screenshots, please refer to https://0xpatrik.com/takeover-proofs/.

To verify:

http -b GET http://{DOMAIN NAME} | grep -F -q "<strong>There isn't a GitHub Pages site here.</strong>" && echo "Subdomain takeover may be possible" || echo "Subdomain takeover is not possible"

(Note: DOMAIN NAME has to be the affected domain, not the github.io page itself. This is due to Host header forwarding which affects the HTTP response)

Documentation

There is only one format of GitHub Pages domains:

  • *.github.io

please note that having CNAME to github.io itself can also lead to subdomain takeover.

Subdomain Takeover through Kinsta

Service name

Kinsta

Website

https://kinsta.com/

Credential

screenshot 45 _li

Condition

Subdomain takeover through Kinsta is possible but for creating POC you need a paid account because kinsta need a paid account for creating subdomains and using web hosting through kinsta.

Akamai CDN irregular responses !

I found some subdomains that look like this:
Server: edgesuite and akadns (Akamai)
I found some different 404 responses for those subdomains
look like :
1>File not found."

2>Service Unavailable - DNS failure
The server is temporarily unable to service your request. Please try again later.

3>An error occurred while processing your request.

This is what I getting from that Akamai CDN service
which is different from the last one

Invalid URL
The requested URL "[no URL]", is invalid.

Does anyone know if this vulnerable to a takeover?

Smartling Takeover

Service name

Smartling is a translation service.

Proof

If the vulnerable domain has a CNAME pointing to e.g. *.smartling.com - open that domain and check for the string:

"Domain is not configured"

This means it should be possible to takeover.

Documentation

Problem here is I can't actually be sure this works. A couple of subdomain takeover tools mention this service as well as this fingerprint, but I can't actually look up any report or blog post specifying this. Furthermore, to have access to smartling it seems you actually have to go through a manual register / validation process (I might be wrong).

The best reference so far is actually smartling documentation here. Reading the article, it doesn't seem any kind of ownership verification is done so, in theory, should be possible to just register a domain and complete the takeover.

If anyone can dig a bit more on this, would be awesome.

cloudfront takeover is not possible anymore

AWS finally started mitigating subdomain takeovers on CloudFront. When you try to register Alias (CNAME) for your CloudFront distribution, it refuses to do so if the DNS zone file has CNAME to different CloudFront domain.
This is a type of verification from cloudfront that you can't takeover any subdomain even both (http OR https) port (80 and 443) shows error.
If the DNS zone file has CNAME to different CloudFront domain.

so,from cloudfront bye bye bug bounty

When you try to takeover subdomain you will get this as a further alert!

cloudfront

Unsure about Akamai

There have been a few subdomains that I've come across now that look like this:
Server: AkamaiGHost
and the page will say:

Invalid URL
The requested URL "[no URL]", is invalid.

As far as I can tell, this message is coming from Akamai, I'm assuming from their CDN service unless they have others? Does anyone know if this vulnerable to a takeover?

Subdoamin Takeover Possible via Intercom Help Center

Intercom Help Center

Proof

If you get an Error Similar to this one that gives 404 Error simply go to https://www.intercom.com/customer-support-software create a new account buy the service or get a free demo for 14 days

Then visit https://app.intercom.io/a/apps/pr1twx7u/articles/site/settings and add the subdomain that's giving error in custom domain field

screenshot 2018-11-20 at 3 40 08 pm

Turn On the Help Center and Publish a test article also otherwise you won't be able to turn on the help center

after you turn on successfully you'll be the admin of the help center

screenshot 2018-11-20 at 3 42 23 pm

Documentation

https://www.intercom.com/help/

Thanks 😉

Cloudfront 502 error

Cloudfront 502 error

Error showing

502 ERROR
The request could not be satisfied.
CloudFront wasn't able to connect to the origin.
If you received this error while trying to use an app or access a website, please contact the provider or website owner for assistance.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by following steps in the CloudFront documentation (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/http-502-bad-gateway.html).

Generated by cloudfront (CloudFront)
Request ID: xcB9zQ3IRZxqwgV5duuhW*****EVskahplQSTbcUuNjG86Pg==

when I used dig command no CNAME to cloudfront.

On 502 error it is not vuln to subdomain takeover.

GitHub.io Subdomain Takeover

I have found a subdomain sub.example.com
And the CNAME is pointing to 1234.github.io

When navigating to sub.example.com
It will show the 404 error
There isn't a GitHub Pages site here.

So I created a github page and added sub.example.com as custom domain.

And it will say that this CNAME has already been taken.
Am I doing something wrong? Or is it not vulnerable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.