Taking over Google calendar of a company

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.

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.

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.

A collection of write-ups from the best hackers in the…

H3ll0, Fr1end.

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

H3ll0, Fr1end.

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