Lesson 4 of 5 · 30 min read

BEC & AiTM In Depth — From Delivery to Dwell

BEC and AiTM are the two phishing attack types that cause the most financial and operational damage. They’re also the hardest to detect because the attack vector is trust — not malware. Neither requires the victim to install anything.


BEC In Depth

The Three BEC Variants

Variant 1: CEO Fraud

From: "CEO John Smith" <jsmith@corp-exec.net>   ← lookalike domain
To: finance-team@corp.com
Subject: Confidential — Wire Transfer Authorization

I need you to process an urgent wire transfer for a business acquisition.
Amount: $280,000 USD
Bank: [attacker account]
Handle this directly and confidentially. I'll explain more on my return.
— John

Variant 2: Vendor Fraud

From: accounts@vendor-invoicing.com  ← attacker-registered
Impersonating: accounts@real-vendor.com
Body: "We've updated our banking details. Please update your records
      and process this month's payment to our new account..."

Variant 3: Internal Account Compromise → BEC

The most dangerous variant — the attacker has already compromised a real employee’s email account (via credential phish or AiTM). Now BEC is sent from the real account with correct authentication. No lookalike domain. No header tricks. SPF/DKIM/DMARC all pass correctly. Only behavioral indicators remain.


BEC Indicator Checklist

Header indicators:

Content indicators:

Behavioral indicators (from victim or mailbox):


BEC Investigation Workflow

1. Acquire the email headers → run full header analysis (Lesson 1 checklist)
2. Identify the From: domain → WHOIS lookup for age
3. Check Reply-To: → does it differ? Submit to threat intel.
4. Search M365 UAL for: victim mailbox activity since email arrival
   - Did victim reply?
   - New-InboxRule events?
   - MailItemsAccessed from new IPs?
5. Contact victim directly (call, not email) → confirm if they took action
6. If wire initiated: escalate to finance immediately — wire recall window is ~24h
7. Preserve the email as evidence before remediation

AiTM In Depth

The Attack Timeline

AiTM is a multi-stage attack. Each stage leaves distinct log evidence:

Stage 1: Phishing delivery

Stage 2: AiTM session initiation

Stage 3: Post-compromise access (the dwell phase)

Stage 4: Persistence


AiTM Log Correlation in Microsoft 365

Step 1: Find the suspicious sign-in

In Entra ID sign-in logs (SigninLogs table in Sentinel):

SigninLogs
| where TimeGenerated > ago(7d)
| where UserPrincipalName == "victim@corp.com"
| project TimeGenerated, IPAddress, Location, AppDisplayName, 
          ConditionalAccessStatus, ResultType, AuthenticationRequirement
| order by TimeGenerated desc

Look for: a sign-in from an unfamiliar IP around the time the phishing email was delivered.

Step 2: Confirm with MailItemsAccessed

In M365 UAL (OfficeActivity table):

OfficeActivity
| where TimeGenerated > ago(7d)
| where UserId == "victim@corp.com"
| where Operation == "MailItemsAccessed"
| project TimeGenerated, ClientIP, ClientInfoString, MailboxOwnerUPN
| order by TimeGenerated desc

If ClientIP shows the attacker’s VPS IP (e.g., DigitalOcean, Vultr, Linode ASN) rather than the victim’s expected corporate or residential IP, the session token has been stolen.

Step 3: Check for inbox rules

OfficeActivity
| where Operation == "New-InboxRule"
| where UserId == "victim@corp.com"
| project TimeGenerated, Parameters

Step 4: Check for OAuth grants

AuditLogs
| where OperationName == "Consent to application"
| where InitiatedBy.user.userPrincipalName == "victim@corp.com"