Categories: HackingSecurity

Gmail hacking, a mine of data for phishing and spam attacks

An Israeli researcher disclosed a Gmail vulnerability, fixed by Google, that exposes an indefinite number of Gmail addresses and business emails.

Google company has fixed a critical vulnerability, disclosed by the Israeli researcher Oren Hafif,  that exposes an indefinite number of Gmail addresses. Technically the experts has discovered that it is possible to bruteforce a token in a Gmail URL used in delegation process to retrieve a list of Google email addresses.

“I bruteforced a token in a Gmail URL to extract all of email addresses hosted on Google,” Hafif wrote.

Hafif, the researcher at Trustwave’s SpiderLabs, disclosed details on how he was able to abuse a token exposed in a URL to reveal every Gmail address, Google assigned him $500 as remuneration for the bug bounty program.

The access to the entire list of Gmail account could give the attackers the needed information for phishing campaigns and targeted attacks.

Hafif started testing the Google’s Gmail delegation feature which allows an account holder to delegate the access to others by adding another account in the settings tab.

At this point the verification process implemented by Google returns an email indicating that access is pending. The delegated have to click on an “accept” or “rejection” link embedded in the email to complete the verification process. The URLs composed by Google for Accept and Reject action are nearly identical, minus a couple of important differences that Hafif was able to take advantage of.

Accept: https://mail[.]google[.]com/mail/mdd-f560c0c4e1-oren.hafif%40gmail.com-bbD8J0t6P6JNOUO36vY6S_pZJy4

Reject: https://mail[.]google[.]com/mail/mda-f560c0c4e1-oren.hafif%40gmail.com-bbD8J0t6P6JNOUO36vY6S_pZJy4

The researcher made a detailed analysis of the URLs used by Google

https://mail.google.com/mail/mdd-f560c0c4e1-oren.hafif%40gmail.com-bbD8J0t6P6JNOUO36vY6S_pZJy4

  1. The first part “https://mail.google.com/mail/”, is just the normal mapping to the Gmail application.
  2. The second “/mdd” is the mapping for the mail delegation deny servlet.
  3. What does “f560c0c4e1” stand for? It looks like a token. There is some hope here, as this one is so short and it’s hexadecimal
  4. My email address – probably not relevant.
  5. What does “bbD8J0t6P6JNOUO36vY6S_pZJy4” stand for? It looks like an encoded blob. This is normally a BAD sign as Google loves to HMAC request URLs and that could be a giant “pain in the scans”.

Resuming the mdd and mda piece distinguish mail delegation actions (accept or deny), following the researcher noticed the sequence of characters used as authentication token. The sequence of characters at the end of the URL is a sort of “encoded blob.”

“So I start a bruteforce – and what do you know… I get email addresses, lots of lots of email addresses. So many email addresses that every single tool I use for the bruteforce collapses,” “So I write my own multithreaded script in ruby – which is not as fast as I want.” Hafif wrote.

Hafif, who is a researcher with Trustwave’s SpiderLabs, also noticed another the within the amount of email addresses retrieved there were also not Gmail addresses, the circumstance suggests that they were businesses using Google Apps as a mail service.

“That is actually a pretty hot topic right now. Should we move to the cloud? Should we use Gmail as our organizational email manager?”  “As the argument about the future of enterprise email goes on with a focus on security – leakage of organizational emails might assist attackers in their spear-phishing attacks and eventually expose the company to advance persistent threats.” added Hafif.

Hafif used the OWASP tool DirBuster as URL fuzzer, he provided to the tool a custom-built Ruby dictionary of all 10-HEX character long token combinations to generate all valid tokens. From each generated token the researcher has accessed to the valid associated email addresses with Burp Intruder attack tool.

E-mails are precious commodities in the underground, their knowledge allows attackers to improve phishing and spam campaigns, let’s remember that email addresses are often used as a user name.

Pierluigi Paganini

(Security Affairs –  Google, hacking)  

Pierluigi Paganini

Pierluigi Paganini is member of the ENISA (European Union Agency for Network and Information Security) Threat Landscape Stakeholder Group and Cyber G7 Group, he is also a Security Evangelist, Security Analyst and Freelance Writer. Editor-in-Chief at "Cyber Defense Magazine", Pierluigi is a cyber security expert with over 20 years experience in the field, he is Certified Ethical Hacker at EC Council in London. The passion for writing and a strong belief that security is founded on sharing and awareness led Pierluigi to find the security blog "Security Affairs" recently named a Top National Security Resource for US. Pierluigi is a member of the "The Hacker News" team and he is a writer for some major publications in the field such as Cyber War Zone, ICTTF, Infosec Island, Infosec Institute, The Hacker News Magazine and for many other Security magazines. Author of the Books "The Deep Dark Web" and “Digital Virtual Currency and Bitcoin”.

Recent Posts

Coinbase disclosed a data breach after an extortion attempt

Coinbase confirmed rogue contractors stole customer data and demanded a $20M ransom in a breach…

1 minute ago

U.S. CISA adds a Fortinet flaw to its Known Exploited Vulnerabilities catalog

U.S. Cybersecurity and Infrastructure Security Agency (CISA) adds a Fortinet vulnerability to its Known Exploited Vulnerabilities…

9 hours ago

Kosovo authorities extradited admin of the cybercrime marketplace BlackDB.cc

Kosovar citizen extradited to the US for running the cybercrime marketplace BlackDB.cc appeared in federal…

11 hours ago

U.S. CISA adds Microsoft Windows flaws to its Known Exploited Vulnerabilities catalog

U.S. Cybersecurity and Infrastructure Security Agency (CISA) adds Microsoft Windows flaws to its Known Exploited…

22 hours ago

Ivanti fixed two EPMM flaws exploited in limited attacks

Ivanti addressed two Endpoint Manager Mobile (EPMM) software vulnerabilities that have been exploited in limited…

24 hours ago

Microsoft Patch Tuesday security updates for May 2025 fixed 5 actively exploited zero-days

Microsoft Patch Tuesday security updates for May 2025 addressed 75 security flaws across multiple products, including…

1 day ago