How to Hunt Microsoft 365 Password-Spraying Attacks and Strengthen Defenses

· Original article ↗

Summary

Huntress explains how to hunt for Microsoft 365 password spraying, including jitter and cloud IP rotation, and recommends password protection, blocking legacy authentication, and phishing-resistant MFA.

Key points

  • Password spraying spreads attempts across accounts, so alerts focused on repeated failures for one user may miss it; defenders should understand normal sign-in patterns.
  • TREVORspray can randomize login delays, while CredMaster can schedule attempts during working hours to evade time- and off-hours-based detections.
  • CredMaster and git-rotate use AWS or GitHub Actions infrastructure to rotate IP addresses; Huntress advises investigating cloud-service sign-ins rather than dismissing them as trusted.
  • Huntress describes hunting for unusual sign-ins across ASNs, operating systems, browsers, and geographic locations, grouped by user and session.
  • In Huntress examples, further review of anomalous sign-ins led analysts to confirm credential theft and notify affected customers.
  • Recommended protections include preventing weak or previously compromised passwords, blocking legacy authentication where possible, and using the strongest feasible MFA methods; the article cautions that MFA alone is not enough.

Article Details

Defense Focus
Detecting and preventing password-spraying attacks against Microsoft 365 identities, including attempts that evade simple failed-login and single-IP detections.
Detection Methods
  • Establish normal authentication patterns for each organization and investigate deviations rather than relying on failed-login counts alone.
  • Hunt for authentication anomalies grouped by username and session ID, including multiple ASNs, operating systems, browsers, or geographic locations.
  • Correlate sign-in IPs with published AWS and GitHub IP ranges; investigate matches rather than dismissing them as trusted cloud-service traffic.
  • Review successful authentication events in context, including VPN use and unusual or programmatic user agents, and compare them with the user's normal activity.
  • Account for randomized delays and jitter, working-hours scheduling, and IP rotation when designing detections.
Data Sources
  • Microsoft 365 authentication and sign-in events
  • Username and session ID
  • Source IP address and ASN
  • Operating system and browser
  • User agent
  • Geographic location
  • Published AWS and GitHub IP ranges
Rule Types
  • ES|QL query
Platforms
  • Microsoft 365
  • Microsoft Entra
  • Huntress platform
Defensive Actions
  • Enable Microsoft Entra password protection to block known-weak or previously compromised passwords.
  • Educate users to choose unique, strong passwords for Microsoft 365 and Entra accounts.
  • Block legacy authentication protocols in the tenant where possible.
  • Use the strongest feasible phishing-resistant multi-factor authentication methods; do not rely on MFA alone.
  • Investigate anomalous successful sign-ins and notify affected customers when compromise is confirmed.

MITRE ATT&CK

People

Threat Actors

Vendors

Products

Tools

Related Articles