Spearphishing Service
Adversaries may send spearphishing messages via third-party services to elicit sensitive information that can be used during targeting. This includes messages sent through social media platforms (LinkedIn, Twitter, Facebook, WhatsApp), personal webmail, and other non-enterprise controlled services. Adversaries create fake personas — often posing as recruiters, colleagues, or vendors — to build rapport with targets and extract credentials, security configurations, VPN details, or other actionable intelligence. Because these messages transit third-party platforms outside the victim's network perimeter, they generate no traditional endpoint or network telemetry on the victim side. Detection must focus on downstream indicators: post-harvest sign-in anomalies, inbox rule changes, MFA modifications, and OAuth consent grants.
// Branch 1: High-risk Azure AD sign-ins — potential credential use after social media spearphishing
let HighRiskSignins = SigninLogs
| where TimeGenerated > ago(24h)
| where RiskLevelDuringSignIn in ("high", "medium") or RiskState == "atRisk"
| extend DetectionBranch = "HighRiskSignin"
| extend Details = strcat("App:", AppDisplayName, " RiskLevel:", RiskLevelDuringSignIn, " RiskDetail:", tostring(RiskDetail), " Location:", tostring(LocationDetails.countryOrRegion), " ASN:", tostring(AutonomousSystemNumber))
| project TimeGenerated, UserPrincipalName, SourceIP = IPAddress, DetectionBranch, Details;
// Branch 2: Inbox forwarding rules created to external addresses — post-compromise persistence after credential harvest
let InboxForwardingRules = OfficeActivity
| where TimeGenerated > ago(24h)
| where Operation in ("New-InboxRule", "Set-InboxRule")
| extend Params = tostring(Parameters)
| where Params has_any ("ForwardTo", "ForwardAsAttachmentTo", "RedirectTo")
| where Params !contains ".onmicrosoft.com"
| extend DetectionBranch = "InboxForwardingRule"
| extend Details = strcat("Operation:", Operation, " RuleParams:", Params)
| project TimeGenerated, UserPrincipalName = UserId, SourceIP = ClientIP, DetectionBranch, Details;
// Branch 3: MFA / security info changes — adversary modifies authentication after gaining access via harvested credentials
let SecurityInfoChanges = AuditLogs
| where TimeGenerated > ago(24h)
| where OperationName in ("User registered security info", "User deleted security info", "User changed default security info")
| extend TargetUser = tostring(TargetResources[0].userPrincipalName)
| extend InitiatedByUser = tostring(InitiatedBy.user.userPrincipalName)
| extend InitiatedByIP = tostring(InitiatedBy.user.ipAddress)
| extend DetectionBranch = "SecurityInfoChanged"
| extend Details = strcat("Operation:", OperationName, " InitiatedBy:", InitiatedByUser, " Target:", TargetUser)
| project TimeGenerated, UserPrincipalName = TargetUser, SourceIP = InitiatedByIP, DetectionBranch, Details;
HighRiskSignins
| union InboxForwardingRules
| union SecurityInfoChanges
| sort by TimeGenerated desc Data Sources
Required Tables
False Positives
- Employees logging in from personal devices, travel locations, or via commercial VPNs generating high-risk sign-in events in Azure AD Identity Protection
- Legitimate inbox forwarding rules created by users to route work email to personal accounts in BYOD environments where this is policy-permitted
- IT helpdesk-initiated MFA resets during support tickets generating security info change audit events under the user's context
- Corporate travel to new countries generating impossible-travel and new-ASN risk detections with no malicious activity
- Automated SOAR playbooks or onboarding workflows that modify MFA settings and create inbox rules as part of approved provisioning processes
References (10)
- https://attack.mitre.org/techniques/T1598/001/
- https://threatpost.com/facebook-launching-pad-phishing-attacks/160351/
- https://learn.microsoft.com/en-us/azure/active-directory/identity-protection/overview-identity-protection
- https://learn.microsoft.com/en-us/microsoft-365/security/defender/advanced-hunting-signinlogs-table
- https://learn.microsoft.com/en-us/office/office-365-management-api/office-365-management-activity-api-schema
- https://learn.microsoft.com/en-us/microsoft-365/compliance/audit-mailboxes
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1598.001/T1598.001.md
- https://www.microsoft.com/en-us/security/blog/2022/11/03/how-microsoft-threat-intelligence-center-tracks-north-korean-threat-actor-zinc/
- https://www.cisa.gov/news-events/cybersecurity-advisories/aa22-335a
- https://github.com/gophish/gophish
Unlock Pro Content
Get the full detection package for T1598.001 including response playbook, investigation guide, and atomic red team tests.