Taking over Google calendar of a company

Daniel V
Daniel V
Dec 4, 2018 · 3 min read

Hello Guys!

This time i will show an unusual takeover that I found in a company with 30.000 customers.

Summary:

The flaw allows you to take the services of google Gsuite like a common takeover, making it impossible for the company to create a new Gsuite account with the domain itself.

Explaining Takeover vulnerability:

A sub-domain takeover is considered a high severity threat and boils down to the registration of a domain by somebody else (with bad intentions) By doing this, the hacker can take full control of the sub-domains. Sub-domain Takeover can be done by using external services such as Desk, Squarespace, Shopify, Github, Tumblr, and Heroku.

You can read more about it here.

Discovery phase:

Listing all domains is the most time-consuming part of the discovery phase (i’m using my own methodology) so the first tool that i use is ‘Aquatone’ with two functions at the same time, Discovery & Takeover.

aquatone-discover — domain company.com.br && aquatone-takeover — domain company.com.br

Find more about Aquatone here.

The results showed me that one of the subdomains ‘calendar.company.com.br’ had a CNAME pointed to ‘ghs.googlehosted.com’ and when i tried to access i get this error:

To confirm the CNAME association i used mxtoolbox:

Until then i was discouraged with the false positive alert by the tool, as i already had found the same flaw, i knew that it was not possible to perform a takeover in google services. Anyway, i decided to test:

I created a new Gsuite account and specified my company domain as ‘calendar.company.com.br’

Next, next, next… and… Done!

I received an email saying that the account was successfully registered:

I believe that if you followed up until here, you realized the importance of running the tests to the end, even if it was not possible to schedule new events or send emails with company’s gsuite, it was enough to block new registrations on the platform.

Hope you liked it. Happy hacking :)

Find me at Linkedin.

Daniel V

Written by

Daniel V

H3ll0, Fr1end.

InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. In a nutshell, we are the largest InfoSec publication on Medium. Maintained by Hackrew

Daniel V

Written by

Daniel V

H3ll0, Fr1end.

InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. In a nutshell, we are the largest InfoSec publication on Medium. Maintained by Hackrew

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store