Internal Spearphishing
Adversaries who have already compromised an account or system may abuse the trusted internal identity to send phishing messages to other users within the same organization. Because the message originates from a known colleague, recipients are far more likely to open attachments, click links, or provide credentials. Campaigns typically combine a compromised mailbox or chat account with a weaponized attachment, a credential-harvesting link, or a malicious macro-enabled document. Real-world actors include Gamaredon (Outlook VBA module auto-sending phishing to contacts), Kimsuky (stolen credentials reused for internal mail), Leviathan/APT40, and HEXANE. Detection surfaces include anomalous send volume or recipient patterns from an internal account, Outlook spawning suspicious child processes (macro execution), Microsoft Teams delivering external URLs or files, and mass-BCC or reply-all abuse patterns.
// --- Signal 1: Outlook spawning suspicious child processes (VBA macro execution)
let OutlookMacroParents = DeviceProcessEvents
| where Timestamp > ago(24h)
| where InitiatingProcessFileName =~ "outlook.exe"
| where FileName in~ (
"cmd.exe", "powershell.exe", "pwsh.exe", "wscript.exe", "cscript.exe",
"mshta.exe", "rundll32.exe", "regsvr32.exe", "certutil.exe",
"bitsadmin.exe", "msiexec.exe", "wmic.exe", "curl.exe", "wget.exe"
)
| extend Signal = "OutlookMacroChildProcess"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine, Signal;
// --- Signal 2: Anomalous internal email send volume (Office 365 OfficeActivity)
let HighVolumeSend = OfficeActivity
| where TimeGenerated > ago(24h)
| where Operation == "Send"
| where UserId !endswith "#EXT#"
| extend SenderDomain = tostring(split(UserId, "@")[1])
| summarize EmailsSent=count(), UniqueRecipients=dcount(tostring(Parameters)),
FirstSend=min(TimeGenerated), LastSend=max(TimeGenerated)
by UserId, SenderDomain, bin(TimeGenerated, 1h)
| where EmailsSent > 20
| extend Signal = "HighVolumeInternalSend"
| project TimeGenerated=FirstSend, UserId, SenderDomain, EmailsSent, UniqueRecipients, Signal;
// --- Signal 3: Teams messages containing suspicious external links
let TeamsSuspiciousLinks = OfficeActivity
| where TimeGenerated > ago(24h)
| where RecordType == "MicrosoftTeams"
| where Operation in ("MessageCreatedHasLink", "MessageUpdatedHasLink", "MessagesListed")
| where isnotempty(tostring(ExtraProperties))
| extend MsgContent = tostring(ExtraProperties)
| where MsgContent has_any (
"http://", "https://",
".zip", ".exe", ".lnk", ".iso", ".vbs", ".js", ".hta"
)
| where MsgContent !has "microsoft.com" and MsgContent !has "sharepoint.com"
and MsgContent !has "teams.microsoft.com"
| extend Signal = "TeamsSuspiciousLinkOrFile"
| project TimeGenerated, UserId, ClientIP, MsgContent, Signal;
// --- Union all signals
OutlookMacroParents
| union kind=outer (HighVolumeSend | project Timestamp=TimeGenerated, DeviceName="", AccountName=UserId,
FileName="", ProcessCommandLine=strcat("EmailsSent:", tostring(EmailsSent)),
InitiatingProcessFileName="OfficeActivity", InitiatingProcessCommandLine="", Signal)
| union kind=outer (TeamsSuspiciousLinks | project Timestamp=TimeGenerated, DeviceName="",
AccountName=UserId, FileName="", ProcessCommandLine=MsgContent,
InitiatingProcessFileName="TeamsActivity", InitiatingProcessCommandLine="", Signal)
| sort by Timestamp desc Data Sources
Required Tables
False Positives
- Legitimate marketing or HR mass-email campaigns using a shared internal account that sends newsletters or announcements to all staff
- Automated IT notification systems (monitoring alerts, ticketing systems, patch notifications) sending bulk emails from a service account
- Outlook VBA macros used by finance or legal teams for legitimate templated document workflows spawning cmd.exe or wscript.exe
- IT administrators sending automated onboarding emails via PowerShell scripts authenticated as their own account
- Microsoft Teams bots or connectors posting messages with external links as part of approved integrations (e.g., GitHub notifications, JIRA updates)
References (9)
- https://attack.mitre.org/techniques/T1534/
- https://blog.trendmicro.com/phishing-starts-inside/
- https://www.microsoft.com/en-us/security/blog/2023/08/02/midnight-blizzard-conducts-targeted-social-engineering-over-microsoft-teams/
- https://www.welivesecurity.com/2020/06/11/gamaredon-group-grows-its-game/
- https://www.cisa.gov/sites/default/files/publications/AA21-200A.pdf
- https://secureworks.com/research/lyceum-takes-center-stage-in-middle-east-campaign
- https://learn.microsoft.com/en-us/microsoft-365/compliance/audit-log-search-tool
- https://learn.microsoft.com/en-us/defender-office-365/anti-phishing-policies-about
- https://learn.microsoft.com/en-us/microsoftteams/teams-security-guide
Unlock Pro Content
Get the full detection package for T1534 including response playbook, investigation guide, and atomic red team tests.