As phishing threats continue to evolve, attackers are leveraging increasingly sophisticated methods that use legitimate cloud platforms to disguise their malicious campaigns. Recent research has uncovered a worrying trend: the abuse of Google Apps Script as a vehicle for launching convincing phishing attacks specifically designed to steal Microsoft 365 login credentials. This sophisticated approach capitalizes on both the trust users place in Google domains and the ubiquity of Microsoft 365 in the business world, making it a critical cybersecurity concern for organizations of all sizes.
At the center of this new wave of phishing is Google Apps Script—a cloud-based scripting platform designed to extend the capabilities of Google Workspace applications such as Gmail, Drive, and Sheets through JavaScript automation. Traditionally, Apps Script is used for automating email notifications, customizing workflows, or managing files. However, in the hands of cybercriminals, it becomes a potent tool for constructing believable phishing lures.
The attack, as documented by cybersecurity experts at Cofense and reported by TechRadar, typically starts with a standard phishing email purporting to contain a business-related invoice. The lure includes a link to what appears to be a Google-related service, using a domain structure like script[.]google[.]com. This tactic leverages the inherent trust most users have in Google domains, as people are conditioned to believe that anything hosted on a legitimate Google subdomain is inherently safe.
Upon clicking the link, the victim lands on a page with a message such as “you have one pending download available” and a prominent "preview" button. This apparent simplicity serves to lower suspicions. However, clicking the preview button silently redirects users to a replica of the Microsoft 365 login page. Unwitting users who input their credentials do not access a legitimate document—instead, their login information is instantly funneled to the attackers. To further obscure traces of malicious activity and reduce suspicion, the script then redirects the user to the real Microsoft 365 login page, creating the impression that a session expired or an error occurred.
This layered approach—leveraging well-known brands, cloud automation, and redirection—makes detection and prevention much more challenging.
Some of the factors contributing to its appeal for attackers include:
For attackers:
Microsoft 365 remains one of the most phished brands due to its extensive use in enterprise environments. Cybercriminals design fake login pages that are visually indistinguishable from the real ones, right down to the smallest UI element. For many users, subtle clues about the underlying URL or SSL certificate go unnoticed, especially when the initial part of the workflow pointed to a Google domain.
Key risks include:
Organizations and individuals must adapt to a reality where domain reputation alone cannot be used as a proxy for safety. Attackers will continue to innovate, making security awareness, layered defenses, and cross-platform vigilance essential.
As cloud adoption accelerates and legitimate platforms become integral to daily work, the opportunity for attackers to piggyback on trusted infrastructure will only increase. The path forward lies in stronger collaboration between cloud providers, more intelligent detection tools, and an unwavering focus on user education.
Until then, every email, no matter how seemingly legitimate, deserves a dose of healthy skepticism—especially those promising urgent invoices or login confirmations from “trusted” domains. The most successful defense is a blend of vigilance, technology, and continuous reevaluation of evolving phishing strategies.
Source: TechRadar Google Apps Script abused to launch dangerous phishing attacks
The Mechanics of the New Phishing Campaign
At the center of this new wave of phishing is Google Apps Script—a cloud-based scripting platform designed to extend the capabilities of Google Workspace applications such as Gmail, Drive, and Sheets through JavaScript automation. Traditionally, Apps Script is used for automating email notifications, customizing workflows, or managing files. However, in the hands of cybercriminals, it becomes a potent tool for constructing believable phishing lures.The attack, as documented by cybersecurity experts at Cofense and reported by TechRadar, typically starts with a standard phishing email purporting to contain a business-related invoice. The lure includes a link to what appears to be a Google-related service, using a domain structure like script[.]google[.]com. This tactic leverages the inherent trust most users have in Google domains, as people are conditioned to believe that anything hosted on a legitimate Google subdomain is inherently safe.
Upon clicking the link, the victim lands on a page with a message such as “you have one pending download available” and a prominent "preview" button. This apparent simplicity serves to lower suspicions. However, clicking the preview button silently redirects users to a replica of the Microsoft 365 login page. Unwitting users who input their credentials do not access a legitimate document—instead, their login information is instantly funneled to the attackers. To further obscure traces of malicious activity and reduce suspicion, the script then redirects the user to the real Microsoft 365 login page, creating the impression that a session expired or an error occurred.
This layered approach—leveraging well-known brands, cloud automation, and redirection—makes detection and prevention much more challenging.
Why Google Apps Script Is an Attractive Target
Google Apps Script has become a target for abuse due to its versatility and the nearly universal trust in Google services. Organizations worldwide rely on Google Workspace for critical operations, and the domain itself (script.google.com) rarely appears in blocklists or email filtering blacklists, as blocking it would disrupt core business functions.Some of the factors contributing to its appeal for attackers include:
- Legitimacy of Hosting: By hosting malicious scripts on an official Google domain, attackers bypass many traditional spam and malware filters that flag suspicious or unknown domains.
- Automation: Apps Script enables fast deployment of phishing pages and seamless integration into existing attack infrastructure.
- Easy Redirection: The scripting language’s redirect capabilities allow phishing campaigns to dynamically direct victims to fake login pages and then to genuine services, masking the theft of credentials.
- Trust Factor: Most employees and users see a Google link and assume safety, reducing the likelihood of skepticism or second-guessing.
Anatomy of a Fake Invoice Phishing Email
Let’s break down a typical attack chain as observed in this campaign:- Initial Contact: The victim receives a phishing email from what appears to be a legitimate business partner or vendor. The message contains an urgent prompt to review or pay an attached invoice.
- Embedded Link: The invoice is not attached but linked via a URL such as script.google.com, encouraging recipients to click.
- Google Apps Script Landing Page: Clicking the link leads to a Google-hosted Apps Script page displaying a download or preview button.
- Redirection: Activating the "preview" button redirects the user to a fake Microsoft 365 login page.
- Credential Harvesting: The user enters their email and password, thinking they are logging into Microsoft 365 to view the document.
- Final Redirect: The script redirects the user to the actual Microsoft 365 login page, minimizing suspicion once the credentials have been stolen.
Technical Deep Dive: How Attackers Abuse Cloud Platforms
Understanding this attack requires a closer look at how Google Apps Script operates. Apps Script allows users—legitimate or otherwise—to create lightweight web applications accessible via custom URLs under the Google domain. Scripts can read and write data, trigger events, and, crucially, redirect site visitors.For attackers:
- A simple script can host an HTML landing page that displays a benign message and a button.
- That button, when clicked, uses the scripting API to redirect to any destination, including phishing sites designed to masquerade as Microsoft 365 login pages.
- Since the initial request comes from an official Google infrastructure, email security solutions often allow these messages through without quarantine or warning.
- Scripts can be updated and controlled remotely, letting threat actors adjust campaigns in real-time or launch multiple campaigns simultaneously.
The Infamous "Brand Hijacking" Tactic
The abuse of trusted brands is nothing new in the phishing world, but the combination of Google’s infrastructure with Microsoft 365 branding amplifies the success rate of these campaigns. According to Cofense, phishing emails that use trusted domains like Google are much more likely to evade detection and to elicit a response from targets.Microsoft 365 remains one of the most phished brands due to its extensive use in enterprise environments. Cybercriminals design fake login pages that are visually indistinguishable from the real ones, right down to the smallest UI element. For many users, subtle clues about the underlying URL or SSL certificate go unnoticed, especially when the initial part of the workflow pointed to a Google domain.
Detecting and Preventing Google Apps Script Phishing
Mitigating this sophisticated attack vector requires both technical and organizational responses.Security Controls and Filtering Enhancements
- URL Reputation Services: Organizations should consider integrating advanced URL filtering that checks the entire redirect chain, not just the originating domain.
- Sandboxing: Open suspicious links in sandbox environments to detect redirections and the appearance of fake login pages.
- Threat Intelligence: Maintain up-to-date feeds on known phishing campaigns and periodically review them to update detection rules. Specific attention should be paid to new abuses of legitimate cloud services.
User Awareness and Training
Employees need robust, ongoing training to recognize phishing lures, even when they originate from reputable domains. Key elements include:- Scrutinizing the content of emails for suspicious requests or language.
- Hovering over links to verify the full URL path before clicking, though this alone is less effective when a Google domain is involved.
- Knowing that Google typically does not serve third-party invoices or payment instructions via Apps Script.
Technical Safeguards
- Conditional Access Policies: Microsoft 365 administrators can enforce geographic or device-based login restrictions. If possible, require multi-factor authentication (MFA) on all accounts to render stolen credentials less useful.
- Browser Security Extensions: Deploy browser plugins that flag suspicious redirects or mismatched branding on login pages.
- Incident Response Drills: Regularly simulate phishing attacks using both trusted and untrusted domains to measure employee resilience and refine detection rules.
Broader Implications for Cloud Trust
This phishing trend has far-reaching consequences not only for individual organizations, but also for the broader perception of cloud trust and infrastructure resilience. When attackers successfully use legitimate Google services to compromise Microsoft 365 accounts, it demonstrates how interconnected and interdependent modern cloud ecosystems are.Key risks include:
- Supply Chain Vulnerabilities: A successful attack on a single account can lead to downstream compromise of business partners, vendors, and clients through unauthorized access or further phishing attempts using the stolen Microsoft 365 credentials.
- Privilege Escalation: With access to a business user’s Microsoft 365 account, attackers can exfiltrate sensitive data, manipulate business workflows, or create fraudulent messages targeting other employees.
- Persistence: If campaigns are not swiftly detected and neutralized, attackers may maintain access for days or weeks, leveraging time to maximize returns through additional phishing or business email compromise (BEC) attacks.
Recommendations for Google and Microsoft
Experts increasingly recommend that cloud giants such as Google and Microsoft work collaboratively to detect, dismantle, and prevent such abuse. Some actionable steps include:- Enhanced Abuse Detection: Google can add additional heuristics and automated analysis to identify potentially malicious Apps Script projects, such as those hosting common phishing patterns.
- Improved User Reporting: Make it easier for users to flag suspicious Apps Script pages for rapid review and takedown.
- Cross-Cloud Intelligence Sharing: Foster more robust sharing of indicators of compromise (IoCs) between cloud providers to halt multi-platform phishing quickly.
A Balanced Perspective: Strengths and Weaknesses of Apps Script
While this campaign highlights risks in Google Apps Script, it’s important to balance the narrative with the platform’s legitimate, powerful use cases. Educators automate grade reporting; businesses streamline workflows; developers rapidly prototype and deploy new app features. Abusive campaigns remain a fraction of overall usage.Notable Strengths
- Ease of Use: Simple scripting for non-programmers and advanced automation for developers.
- Security by Default: Google’s native tools, such as OAuth consent screens and API restrictions, provide baseline protection.
- Broad Ecosystem: Integration across the entire Google Workspace product range.
Potential Risks and Limitations
However, the underlying flexibility is a double-edged sword. Without granular monitoring and proactive filtering, malicious actors can create scripts that go undetected for critical windows of time, especially as scripts are hosted under universally trusted domains.- Lack of Contextual Filtering: Traditional email and web filters rely on domain reputation rather than content analysis, so attacks leveraging Google or Microsoft’s own infrastructure can often bypass controls.
- Delayed Takedown: While Google responds quickly to abuse reports, there can still be a window of opportunity for attackers, especially during off-hours or holidays.
Conclusion: Defending Against “LegitTrust” Phishing in the Cloud Era
The hijacking of Google Apps Script for phishing is a textbook example of what some researchers dub “LegitTrust” attacks—leveraging trusted platforms to make malicious activity invisible to both humans and machines.Organizations and individuals must adapt to a reality where domain reputation alone cannot be used as a proxy for safety. Attackers will continue to innovate, making security awareness, layered defenses, and cross-platform vigilance essential.
As cloud adoption accelerates and legitimate platforms become integral to daily work, the opportunity for attackers to piggyback on trusted infrastructure will only increase. The path forward lies in stronger collaboration between cloud providers, more intelligent detection tools, and an unwavering focus on user education.
Until then, every email, no matter how seemingly legitimate, deserves a dose of healthy skepticism—especially those promising urgent invoices or login confirmations from “trusted” domains. The most successful defense is a blend of vigilance, technology, and continuous reevaluation of evolving phishing strategies.
Source: TechRadar Google Apps Script abused to launch dangerous phishing attacks