Detect Social Media Accounts in Sumo Logic CSE
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.
MITRE ATT&CK
- Tactic
- Resource Development
- Technique
- T1586 Compromise Accounts
- Sub-technique
- T1586.001 Social Media Accounts
- Canonical reference
- https://attack.mitre.org/techniques/T1586/001/
Sumo Detection Query
(_sourceCategory=*azure* OR _sourceCategory=*o365* OR _sourceCategory=*microsoft* OR _sourceCategory=*aad*)
| json "Operation", "UserId", "ClientIP", "ApplicationId" nodrop
| json "ModifiedProperties" as ModProps nodrop
| json "ExtendedProperties" as ExtProps nodrop
| where Operation in ("Consent to application", "Add OAuth2PermissionGrant", "Add service principal",
"Add delegation entry", "Add app role assignment to service principal")
OR (Operation in ("UserLoggedIn", "Sign-in") AND
(%"AppName" matches /(?i)(google|facebook|linkedin|twitter|github|slack|yahoo)/
OR %"AuthMethod" matches /(?i)(oauth|federation|social)/))
| parse regex field=ModProps "(?i)\"NewValue\":\"(?<GrantedScopes>[^\"]*(?:Mail\.ReadWrite|Files\.ReadWrite\.All|Directory\.ReadWrite|RoleManagement\.ReadWrite|User\.Read\.All|EWS\.AccessAsUser\.All|MailboxSettings\.ReadWrite)[^\"]*)\""
| parse regex field=ModProps "(?i)\"ConsentType\":\"(?<ConsentType>[^\"]+)\"" nodrop
| parse regex field=ModProps "(?i)\"ApplicationName\":\"(?<AppName>[^\"]+)\"" nodrop
| parse regex field=ExtProps "(?i)\"RequestType\":\"(?<RequestType>[^\"]+)\"" nodrop
| eval HighPrivScopes = if (!isNull(GrantedScopes) AND GrantedScopes != "", 1, 0)
| eval AdminConsent = if (ConsentType = "AllPrincipals", 1, 0)
| eval SocialIdP = if (AppName matches /(?i)(google|facebook|linkedin|twitter|github|slack|yahoo)/, 1, 0)
| eval RiskScore = (HighPrivScopes * 2) + (AdminConsent * 3) + (if(AdminConsent = 1 AND HighPrivScopes = 1, 2, 0)) + (SocialIdP * 1)
| where RiskScore > 0
| fields _messageTime, UserId, Operation, AppName, ApplicationId, ConsentType, GrantedScopes, HighPrivScopes, AdminConsent, SocialIdP, RiskScore, ClientIP
| sort by RiskScore desc, _messageTime desc Detects T1586.001 in Sumo Logic by parsing Microsoft 365 Unified Audit and Azure AD logs for suspicious OAuth consent events and social identity provider sign-ins. Applies composite risk scoring identical to the reference SPL: high-privilege scope grants score +2, admin-wide consent (AllPrincipals) scores +3, combined admin consent with high-priv scopes adds +2, and social platform involvement adds +1. Requires M365/Azure AD logs routed to the appropriate source category.
Data Sources
Required Tables
False Positives & Tuning
- Help desk or IT staff performing legitimate tenant-wide admin consent for approved third-party SaaS applications (e.g., DocuSign, Workday) that require Mail or File scopes — these will produce RiskScore 5+ and require suppression by known application IDs
- Security awareness platforms or phishing simulation tools that use Google or LinkedIn OAuth for participant tracking, generating both social IdP sign-ins and potentially high-scope consent events
- Partner tenant application provisioning during B2B collaboration setup where external organizations grant service principals access to shared SharePoint or mailbox data
Other platforms for T1586.001
Testing Methodology
Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Simulate OAuth Consent Grant Following Social Media Phishing Link
Expected signal: Azure AD AuditLogs: OperationName='Add application' showing new app registration with AppName matching df00tech-oauth-test-*. If test user navigates to URL and consents: SigninLogs entry for test user with AppDisplayName matching test app, followed by AuditLogs OperationName='Consent to application' with Scope='Mail.Read Contacts.Read offline_access'. Microsoft Defender for Cloud Apps will generate an OAuth app governance alert if MCAS is configured with tenant OAuth monitoring.
- Test 2Test Anomalous Social Identity Provider Sign-in Detection
Expected signal: Azure AD SigninLogs: entry with IdentityProvider='github' (or Microsoft external identity), UserAgent containing 'Googlebot', DeviceDetail.browser='Other' or unknown classification, DeviceDetail.isCompliant='false' (non-MDM device). Azure AD risk engine may flag as 'unfamiliarFeatures' risk detection, incrementing RiskLevelAggregated. The sign-in will result in a redirect (not a full authentication) but is still captured in logs.
- Test 3Credential Stuffing Simulation Against Social Identity Federated Account
Expected signal: Azure AD SigninLogs: 5 entries with ResultType=50126 (AADSTS50126: Invalid username or password) or 50053 (AADSTS50053: account locked) for TEST_USER within a 20-second window. IPAddress and UserAgent fields match curl defaults. Azure AD Identity Protection may generate 'Password spray' or 'Leaked credentials' risk detection. This simulates the upstream account compromise that precedes T1586.001 use against a victim organization.
- Test 4Corporate Social Media Account Exposure Enumeration (Authorized OSINT)
Expected signal: DNS queries to linkedin.com, github.com from the network running this script — visible in proxy and DNS logs. No authentication events generated against the target organization's Azure AD. GitHub API calls logged in GitHub audit log if an org membership query is made.
References (10)
- https://attack.mitre.org/techniques/T1586/001/
- https://arstechnica.com/tech-policy/2011/02/anonymous-speaks-the-inside-story-of-the-hbgary-hack/
- https://www.securityweek.com/iranian-hackers-targeted-us-officials-elaborate-social-media-attack-operation
- http://media.blackhat.com/bh-us-10/whitepapers/Ryan/BlackHat-USA-2010-Ryan-Getting-In-Bed-With-Robin-Sage-v1.0.pdf
- https://www.cisa.gov/sites/default/files/publications/AA21-200A.pdf
- https://learn.microsoft.com/en-us/azure/active-directory/reports-monitoring/reference-azure-monitor-sign-ins-log-schema
- https://learn.microsoft.com/en-us/defender-cloud-apps/tutorial-suspicious-activity
- https://learn.microsoft.com/en-us/azure/active-directory/identity-protection/overview-identity-protection
- https://learn.microsoft.com/en-us/microsoft-365/compliance/audit-log-activities
- https://learn.microsoft.com/en-us/azure/active-directory/manage-apps/configure-admin-consent-workflow
Unlock Pro Content
Get the full detection package for T1586.001 including response playbook, investigation guide, and atomic red team tests.