T1586.001

Social Media Accounts

Adversaries may compromise existing social media accounts to conduct operations against target organizations. Rather than creating new personas, adversaries compromise legitimate accounts to leverage existing trust relationships and follower networks. Compromised accounts are used to deliver spearphishing messages via social platforms (T1566.003), conduct OAuth-based initial access attacks, or establish connections with target employees as a precursor to further social engineering. Threat groups including Sandworm Team (credential capture webpages) and Leviathan/APT40 (social engineering campaigns) have leveraged compromised social media accounts in operations. Detection focuses on observable effects when compromised accounts interact with the organization: anomalous OAuth authentication events using social identity providers, suspicious OAuth consent grants that may follow social media phishing, and Microsoft Defender for Cloud Apps anomalies on monitored corporate social accounts.

Microsoft Sentinel / Defender
kusto
// T1586.001 — Social Media Account Compromise
// Detect anomalous sign-ins via social identity providers with composite risk scoring
// A compromised social media account used to access corporate resources via OAuth federation
// generates exactly this pattern: social IdP + elevated risk indicators
let SocialProviders = dynamic(["google", "facebook", "linkedin", "twitter", "github", "slack", "yahoo"]);
let RiskyCountryCodes = dynamic(["CN", "RU", "IR", "KP", "BY", "VE", "CU", "SY"]);
let LookbackPeriod = 24h;
SigninLogs
| where TimeGenerated > ago(LookbackPeriod)
| where IdentityProvider has_any (SocialProviders)
    or (AuthenticationProtocol == "oAuth2" and AppDisplayName has_any (SocialProviders))
| extend CountryCode = tostring(LocationDetails.countryOrRegion)
| extend IsCompliant = tostring(DeviceDetail.isCompliant)
| extend TrustType = tostring(DeviceDetail.trustType)
| extend BrowserUA = tostring(DeviceDetail.browser)
| extend RiskScore = 0
| extend RiskScore = RiskScore + iif(RiskLevelAggregated in ("high", "medium"), 3, 0)
| extend RiskScore = RiskScore + iif(CountryCode in (RiskyCountryCodes), 2, 0)
| extend RiskScore = RiskScore + iif(IsCompliant != "true", 1, 0)
| extend RiskScore = RiskScore + iif(TrustType == "", 1, 0)
| extend RiskScore = RiskScore + iif(RiskEventTypes has_any ("anonymizedIPAddress", "unfamiliarFeatures", "maliciousIPAddress", "impossibleTravel", "leakedCredentials"), 3, 0)
| extend RiskScore = RiskScore + iif(IsInteractive == false, 1, 0)
| extend RiskScore = RiskScore + iif(ResultType != 0, 1, 0)
| where RiskScore >= 2
| project TimeGenerated, UserPrincipalName, IPAddress, CountryCode,
         IdentityProvider, AppDisplayName, AuthenticationProtocol,
         RiskLevelAggregated, RiskEventTypes, RiskScore,
         IsCompliant, TrustType, BrowserUA, CorrelationId, ResultType, ResultDescription
| sort by RiskScore desc, TimeGenerated desc
medium severity low confidence

Data Sources

Azure AD: Sign-in Logs Identity: Authentication Microsoft Entra ID / Azure Active Directory

Required Tables

SigninLogs

False Positives

  • Employees traveling internationally who use social identity provider SSO to access corporate applications, generating legitimate sign-ins from foreign country codes
  • Developers using GitHub or Google OAuth to access internal developer tools and cloud services from personal non-compliant devices outside MDM enrollment
  • Service accounts or CI/CD pipelines using OAuth federation with social identity providers for non-interactive automation (GitHub Actions, Google Cloud service accounts)
  • Employees using corporate VPN with split tunneling that causes their exit IP to appear in a high-risk country classification despite being physically in a legitimate location
  • New employees authenticating via social identity providers before their corporate device completes MDM enrollment and appears compliant in Azure AD

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections