T1586.003

Cloud Accounts

Adversaries may compromise cloud accounts to use during targeting operations. Compromised cloud accounts (Azure, AWS, GCP, Dropbox, OneDrive, GitHub) allow adversaries to leverage trusted third-party infrastructure for command and control, exfiltration to cloud storage, sending phishing or spam via cloud messaging services (AWS SES/SNS, SendGrid, Twilio), and acquiring additional cloud infrastructure without managing their own servers. Compromise methods include phishing for cloud credentials, password spraying, purchasing leaked credential sets from criminal markets, or stealing OAuth access tokens. APT29 has been observed using compromised Azure Virtual Machine accounts with residential proxies to obfuscate access to victim environments. This is a PRE-ATT&CK technique — the initial account compromise occurs outside the victim environment on third-party cloud platforms. Detection pivots to observable downstream effects: anomalous authentication events in cloud identity provider logs, risk signals from Identity Protection engines, MFA bypass indicators, and post-compromise behaviors such as bulk cloud storage access or cloud messaging API abuse.

Microsoft Sentinel / Defender
kusto
// T1586.003 — Compromised Cloud Account Usage Detection
// Detects compromised cloud accounts via Azure AD Identity Protection risk events,
// confirmed compromise states, impossible travel, and cross-tenant MFA bypass patterns
let SuspiciousRiskEventTypes = dynamic([
    "impossibleTravel", "anonymizedIPAddress", "maliciousIPAddress",
    "unfamiliarFeatures", "passwordSpray", "leakedCredentials",
    "nationStateIP", "riskyIPAddress", "investigationsThreatIntelligence"
]);
SigninLogs
| where TimeGenerated > ago(24h)
| where ResultType == 0
| extend CountryCode = tostring(LocationDetails.countryOrRegion)
| extend City = tostring(LocationDetails.city)
| extend ParsedBrowser = tostring(DeviceDetail.browser)
| extend ParsedOS = tostring(DeviceDetail.operatingSystem)
| extend IsHighRiskSignIn = RiskLevelDuringSignIn in ("high", "medium")
| extend IsCompromisedState = RiskState in ("atRisk", "confirmedCompromised")
| extend HasSuspiciousRiskEvent = RiskEventTypes_V2 has_any (SuspiciousRiskEventTypes)
| extend IsCrossTenantMFABypass = AuthenticationRequirement == "singleFactorAuthentication"
    and isnotempty(HomeTenantId)
    and HomeTenantId != ResourceTenantId
| where IsHighRiskSignIn or IsCompromisedState or HasSuspiciousRiskEvent or IsCrossTenantMFABypass
| extend AlertReason = case(
    IsCompromisedState, "ConfirmedCompromise",
    IsHighRiskSignIn and HasSuspiciousRiskEvent, strcat("HighRisk+Event:", tostring(RiskEventTypes_V2)),
    IsHighRiskSignIn, "HighRiskSignIn",
    HasSuspiciousRiskEvent, strcat("RiskEvent:", tostring(RiskEventTypes_V2)),
    IsCrossTenantMFABypass, "CrossTenantMFABypass",
    "UnknownRisk"
)
| extend RiskIndicatorCount = toint(IsHighRiskSignIn) + toint(IsCompromisedState)
    + toint(HasSuspiciousRiskEvent) + toint(IsCrossTenantMFABypass)
| project TimeGenerated, UserPrincipalName, AppDisplayName, IPAddress,
          CountryCode, City, ParsedBrowser, ParsedOS,
          RiskLevelDuringSignIn, RiskLevelAggregated, RiskState,
          RiskEventTypes_V2, ConditionalAccessStatus, AuthenticationRequirement,
          HomeTenantId, ResourceTenantId,
          AlertReason, RiskIndicatorCount
| sort by RiskIndicatorCount desc, TimeGenerated desc
high severity medium confidence

Data Sources

Application Log: Application Log Content User Account: User Account Authentication Azure Active Directory Sign-In Logs Microsoft Identity Protection

Required Tables

SigninLogs

False Positives

  • Legitimate business travel — users authenticating from new geographic regions trigger impossibleTravel and unfamiliarFeatures risk events; correlate against HR travel records or user-submitted travel notifications
  • Corporate VPN or proxy services routing authentication traffic through anonymizing or geographically unexpected IP ranges, triggering anonymizedIPAddress or unfamiliarFeatures events
  • Automated service accounts and CI/CD pipelines authenticating from cloud-hosted build agents (GitHub Actions, Azure DevOps) with IP ranges that Identity Protection classifies as anomalous or associated with hosting providers
  • Cross-tenant guest access patterns for legitimate B2B collaboration where users regularly authenticate to partner tenant resources using single-factor authentication under legacy conditional access policies

Unlock Pro Content

Get the full detection package for T1586.003 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections