CybersecurityApril 17, 202611 min read

Silent Takeovers in the Inbox: Stop Hidden Mailbox Rules and Cloud Phishing

SS

Sakshi Shrivastav, Researcher

Editor at Secured Intel

Silent Takeovers in the Inbox: Stop Hidden Mailbox Rules and Cloud Phishing

Silent Takeovers in the Inbox: Stop Hidden Mailbox Rules and Cloud Phishing

Every 39 seconds, a cyberattack targets an organization somewhere in the world (Cybersecurity Ventures, 2024). But the most dangerous attacks today don't arrive with flashing warning signs — they slip through your front door using keys you handed out yourself.

Attackers are now weaponizing legitimate platform features — Microsoft 365 mailbox rules, Google Cloud Storage links, trusted package managers — to conduct silent, persistent campaigns that evade traditional defenses. A compromised inbox can funnel your payment instructions to criminals for weeks before anyone notices. A link to storage.googleapis.com can install a remote access trojan while your email gateway waves it through.

This post breaks down exactly how these stealthy techniques work, why they are so effective, and what IT and security teams can do right now to detect and disrupt them. Whether you manage cloud email, secure developer pipelines, or train end users, the threats covered here demand your attention.


How Attackers Hijack Your Inbox With Hidden Mailbox Rules

Microsoft 365 processes billions of emails daily for hundreds of millions of users. Buried within its feature set is a powerful automation tool — mailbox rules — that attackers have learned to turn against you.

The Mechanics of a Silent Inbox Takeover

Once an attacker compromises an account — through phishing, password reuse, or token theft — they don't immediately start sending fraudulent emails. That would trigger alerts. Instead, they log in quietly, create one or more malicious mailbox rules, and log out. The account continues operating normally while the rules do the attacker's work in the background.

Common malicious rule configurations include:

  • Forwarding financial emails to an external attacker-controlled address
  • Auto-deleting security alerts from Microsoft or your IT team
  • Moving password reset emails into obscure folders like RSS Feeds or Archive
  • Redirecting conversation threads involving vendors or finance partners

These rules exploit a critical trust gap: because they use built-in Microsoft 365 functionality, no antivirus engine flags them. They blend seamlessly with the legitimate automation rules many organizations already use.

Business Email Compromise: The End Goal

The ultimate objective of inbox rule manipulation is usually Business Email Compromise (BEC). The FBI reported BEC losses exceeding $2.9 billion in 2023 alone (FBI IC3, 2023). Here's a typical scenario:

An attacker compromises an accounts payable manager's mailbox. They create a rule that forwards any email containing "invoice," "wire," or "remittance" to their own address. For weeks, they monitor payment conversations silently. At the precise moment a large transaction is being arranged, they send a spoofed email — from a lookalike domain — changing the bank account details. The payment goes to the attacker.

Table: Common Malicious Mailbox Rule Patterns

Rule TypeTrigger ConditionAction TakenAttacker's Goal
Financial interceptSubject contains "invoice," "wire," "payment"Forward to external addressMonitor and manipulate payments
Alert suppressionSender is Microsoft or IT/security teamMove to RSS Feeds or ArchiveHide detection signals
Communication disruptionFrom finance or key supplierDelete or move to Deleted ItemsBreak communication trails
Thread hijackingSpecific conversation threadRedirect replies externallyMaintain visibility into negotiations

Why Persistence Outlasts Password Resets

Here's a detail that catches many incident responders off guard: changing the victim's password does not remove the malicious rules. The rules persist independently of account credentials. Unless an administrator explicitly audits and removes them, they continue operating even after a compromised account is "secured."

This means organizations that reset passwords after detecting suspicious sign-ins may believe they've contained an incident when the attacker's mechanism is still fully functional.


Cloud Phishing: How Trusted Infrastructure Becomes a Malware Delivery Network

If hidden inbox rules represent the persistence layer of modern attacks, cloud-hosted phishing represents the initial access mechanism. Attackers have discovered that hosting malware payloads on platforms like Google Cloud Storage dramatically improves delivery rates.

Why Attackers Choose Google Cloud Storage

The logic is straightforward: major cloud providers enjoy an implicit trust that individual domains don't. Security tools built over years of combating shady, newly registered domains simply aren't configured to scrutinize storage.googleapis.com with the same skepticism.

Attackers exploit this trust for several specific reasons:

  • High-reputation domains bypass email gateway allowlists that many organizations maintain
  • HTTPS encryption by default obscures payload inspection at the network level
  • Easy file replacement allows attackers to update hosted payloads without changing URLs
  • No hosting costs or domain registration that might trigger threat intelligence flagging

Important: A link to a Google, Microsoft, or Amazon domain is not inherently safe. The reputation of the hosting platform says nothing about the content being served.

The Remcos RAT Delivery Chain

Recent campaigns have used Google Cloud Storage to deliver Remcos RAT (Remote Access Trojan) — a commercial tool increasingly repurposed by threat actors for unauthorized remote control. The typical kill chain looks like this:

  1. Victim receives a phishing email themed around an invoice, shipment notice, or HR document
  2. Email contains a link to a file hosted on storage.googleapis.com
  3. User clicks — the link appears trustworthy, the domain is familiar
  4. Downloaded file is a malicious archive, macro-enabled document, or disguised executable
  5. Opening the file installs Remcos RAT silently
  6. Attacker gains full remote control: keylogging, file exfiltration, credential theft, persistence across reboots

Table: Cloud Phishing vs. Traditional Phishing — Key Differences

FactorTraditional PhishingCloud-Hosted Phishing
Hosting domainNewly registered, low reputationTrusted cloud provider domain
Email gateway detectionModerate-to-highLow — often bypassed
HTTPS availabilityInconsistentAlways present
Payload flexibilityFixed at domainEasily updated without URL change
User suspicionHigherLower — familiar brand
Threat intel coverageBroadLimited for cloud URLs

The Developer Attack Surface: Package Managers and Cloud Infrastructure

The threat landscape extends beyond email. Two recently disclosed vulnerabilities in PHP Composer (CVE-2026-40176 and CVE-2026-40261) allow arbitrary command execution when Composer processes Perforce VCS repositories with crafted configurations.

Why This Matters Beyond PHP Teams

Even if your organization doesn't use Perforce directly, these vulnerabilities illustrate a broader principle: build tools and package managers are part of your attack surface. Attackers can:

  • Host malicious repository configurations on trusted cloud platforms
  • Target developers running automated build processes
  • Chain this access with inbox rule abuse to intercept credentials or deployment secrets

The convergence matters: an attacker who compromises a developer's mailbox can suppress build failure alerts while a supply chain attack runs quietly. These techniques don't operate in isolation.

Pro Tip: Treat your CI/CD pipeline with the same security rigor as your production environment. Isolated build environments with restricted shell access significantly reduce the blast radius of supply chain compromises.

Table: Attack Surface Comparison Across Cloud Services

Attack VectorPlatform AbusedLegitimate Feature ExploitedPrimary Defense
Hidden mailbox rulesMicrosoft 365Email automation rulesRegular rule audits, forwarding restrictions
Cloud-hosted phishingGoogle Cloud StorageFile hosting and sharingSandbox all downloads, user training
Package manager RCEPHP Composer + PerforceDependency resolutionPatch immediately, isolated build environments

Detection and Defense: A Practical Response Framework

Understanding the attacks is only half the battle. Security teams need concrete, implementable controls to detect and disrupt these techniques.

Auditing Mailbox Rules at Scale

For Microsoft 365 administrators, regular mailbox rule audits should be a standard operating procedure — not an incident response afterthought.

Using PowerShell, administrators can enumerate rules that forward to external addresses across all mailboxes. Flag any rule that:

  • Forwards to a domain outside your organization
  • Targets keywords associated with financial transactions
  • Moves or deletes emails from your IT or security team
  • Was created at an unusual time or from an unfamiliar IP

Complement this with transport rules that block or alert on auto-forwarding to external domains. Microsoft 365 provides this capability natively — many organizations simply haven't enabled it.

Filtering Cloud-Hosted Malware

Defending against cloud-hosted payloads requires rethinking implicit trust assumptions:

  • Configure email gateways to sandbox files downloaded from cloud storage links, not just direct attachments
  • Flag emails containing links to high-risk file types (archives, executables, macro-enabled documents) regardless of hosting domain
  • Ensure endpoint detection and response (EDR) solutions scan browser downloads even over TLS connections
  • Train users explicitly that a Google or Microsoft link in an email is not a safety guarantee

Hardening Developer Environments

For teams using PHP and Composer, the immediate action is patching to versions that address CVE-2026-40176 and CVE-2026-40261. Beyond patching:

  • Run Composer in isolated environments with restricted shell execution
  • Avoid using untrusted or externally supplied VCS repository configurations
  • Monitor build logs for unexpected command execution patterns
  • Apply zero-trust principles to third-party code: assume it may be hostile until verified

Key Takeaways

  • Audit mailbox rules immediately — look for forwarding to external addresses and suppression of security alerts
  • Reset passwords alone does not remove malicious rules — always combine credential rotation with rule review
  • Treat cloud storage links with the same suspicion as unknown domains — reputation of the host does not guarantee safety of the content
  • Deploy transport rules in Microsoft 365 to block or alert on external auto-forwarding
  • Patch PHP Composer and isolate build environments to close recently disclosed RCE vulnerabilities
  • Train users that phishing now leverages trusted platforms — the old "check the domain" advice is no longer sufficient

Conclusion

The attacks described here succeed because they exploit trust — in platform features, in cloud domains, in familiar workflows. Hidden mailbox rules don't look like malware. Google Cloud Storage links don't look suspicious. That's precisely what makes them effective.

Defending against these techniques requires organizations to move beyond signature-based thinking. The question is no longer whether a domain is trusted or a feature is legitimate. The question is who configured it, when, and for what purpose.

Security teams that build audit habits around mailbox rules, apply consistent skepticism to cloud-hosted links, and treat developer build pipelines as critical infrastructure will be substantially better positioned than those waiting for an obvious indicator of compromise. The attackers are already inside your trusted platforms — the defense has to be too.


Frequently Asked Questions

Q: How do I know if my Microsoft 365 account has malicious mailbox rules? A: Use the Outlook Web App's Rules settings to review all active rules, paying particular attention to any that forward emails externally or move messages from IT or security senders. Administrators can run PowerShell cmdlets like Get-InboxRule to audit rules across all mailboxes at scale and should do so regularly as part of their security operations routine.

Q: Does changing my password remove malicious mailbox rules? A: No — mailbox rules persist independently of account credentials in Microsoft 365. After any account compromise, administrators must explicitly review and remove suspicious rules in addition to resetting the password, revoking active sessions, and reviewing sign-in logs for the scope of unauthorized access.

Q: Why can't email security gateways detect cloud-hosted phishing payloads? A: Many email security tools maintain reduced-scrutiny allowlists for major cloud providers like Google and Microsoft, because blocking those domains entirely would disrupt legitimate business communication. Attackers exploit this gap by hosting payloads on trusted infrastructure. Effective defense requires sandboxing downloads from all links — cloud-hosted or otherwise — rather than relying on domain reputation alone.

Q: What compliance frameworks address Business Email Compromise and mailbox rule abuse? A: Several frameworks provide relevant guidance. NIST SP 800-53 covers access control and audit requirements. CIS Controls (v8) address email and web browser protections under Control 9. For regulated industries, HIPAA requires audit controls that would surface unauthorized mailbox configurations, and PCI DSS v4.0 mandates phishing-resistant controls for systems handling payment data. SOC 2 Type II engagements should also evaluate email security configurations as part of logical access reviews.

Q: How can I train users to recognize cloud-hosted phishing if the domain looks legitimate? A: Focus training on behavior and context rather than domain names alone. Teach users to question whether they expected to receive a cloud-hosted file from that sender, whether the request creates urgency around financial actions, and whether the file type makes sense for the stated purpose. Simulated phishing exercises using cloud-hosted payloads — not just classic phishing domains — help build realistic detection instincts for the current threat environment.

Secured Intel

Enjoyed this article?

Subscribe for more cybersecurity insights.

Subscribe Free