SOC Analyst Lab Challenge: Investigating a Spear-Phishing Credential Harvester
Welcome to this week's hands-on case study. Grab your notebook, this one mirrors a real Tier-1 SOC triage ticket.
Scenario Background
Alert: "Suspicious OAuth Consent Grant Following External Email Link Click" — fired by the email security gateway and corroborated by an identity provider sign-in log alert.
Timeline:
09:14:02 UTC— Userj.alvarez@corp.localreceives an email fromaccounts-verify@corp-0kta.com(note the lookalike domain) titled "Action Required: Verify Your Account Access."09:16:47 UTC— User clicks the embedded link:hxxps://corp-0kta[.]com/login?redirect=outlook09:17:10 UTC— Landing page is a pixel-perfect clone of the Microsoft 365 login portal, hosted on a domain registered 6 days prior.09:17:52 UTC— Credentials submitted; harvester proxies them to the real Microsoft login in real time (adversary-in-the-middle), capturing the session token along with the password.09:18:30 UTC— A new OAuth application named "Document Viewer Pro" is grantedMail.Read,Mail.Send, andFiles.ReadWrite.Allscopes on the user's mailbox.09:22:15 UTC— Inbound sign-in from an unfamiliar ASN (hosting provider, not residential ISP) succeeds using the stolen session token, bypassing MFA because the token was already authenticated.09:40:00 UTC— Outbound email detected from the compromised mailbox to 11 internal recipients, replicating the same lure with a slightly modified subject line.
Observed Indicators:
Sender domain:
corp-0kta.com(typosquat of the org's real identity provider)Landing page domain: same, SSL cert issued same week via a free CA
Malicious OAuth app name: "Document Viewer Pro", publisher unverified
Anomalous sign-in ASN and impossible-travel distance from the user's last known location
Mail forwarding rule silently created: forwards messages containing "invoice" or "wire" to an external address
User-Agent mismatch between the original login and the token-replay session
Step-by-Step Triage Guide
Here's how a junior analyst should work this ticket from open to closure:
Validate the alert, don't dismiss it. Pull the raw email headers (SPF/DKIM/DMARC results) for the original message. A typosquatted domain with a failed or absent DMARC alignment is your first red flag.
Pivot on the URL. Check the link against threat intel (VirusTotal, URLscan) and look at domain registration age (WHOIS). A domain registered days ago pointing to a brand login clone is a near-certain credential harvester.
Check identity provider logs for the token issuance. Look at sign-in logs around the click timestamp. Compare the IP/ASN and device fingerprint of the "legitimate" login event versus any subsequent session activity. A mismatch in ASN, country, or user-agent right after the click is your proof of session theft.
Audit OAuth app consents. This is the step junior analysts miss most often. Adversary-in-the-middle phishing kits often provision an illicit OAuth app post-compromise so they keep access even after a password reset. List all app registrations/consents granted around the incident window and flag anything with broad mail or file scopes from an unverified publisher.
Check for persistence mechanisms. Look for inbox rules, forwarding rules, or delegated mailbox permissions created after the compromise timestamp. Attackers set these up fast to maintain visibility even after remediation starts.
Scope the blast radius. Search for the same lure (subject line, sender pattern, or URL) across the whole mail environment. In this scenario, the compromised account was used to send the same phish internally, so every one of those 11 recipients needs the same triage applied to their accounts.
Containment actions, in order: disable the user's active sessions/tokens, force a password reset, revoke the malicious OAuth app's consent tenant-wide, remove the forwarding rule, and block the sender domain and URL at the email gateway and proxy.
Notify and escalate. Loop in IR leadership once persistence (OAuth app, forwarding rule) is confirmed. This upgrades the incident from "phishing click" to "account compromise with attacker-established persistence."
Key Takeaway: Documenting for Your Interview Portfolio
When you're building a portfolio writeup from a lab like this, structure it the way a hiring SOC lead actually reads it:
Lead with impact, not steps. One line: "Identified and contained an AiTM phishing compromise before attacker-established persistence (malicious OAuth app, mail forwarding rule) could be used for long-term data exfiltration."
Show your pivot logic, not just your conclusion. Interviewers care more about why you checked OAuth consents after seeing a session anomaly than the fact that you found the app. Narrate the "because X, I checked Y" chain.
Include your IOCs in a clean table (domain, hash, IP/ASN, timestamp) — it signals you know how to produce intel other analysts can act on.
Note what you'd automate next time. E.g., "This would justify a detection rule for OAuth consents with mail/file scopes granted within 10 minutes of a flagged sign-in." Shows maturity beyond just ticket closure.
Redact or fictionalize company specifics if this came from real work, but keep the technical detail intact. Depth is what gets you hired, not the company name.
Over to you
How would you have approached the OAuth consent audit step, and at what point in this timeline would you have escalated to IR leadership? Also curious: has anyone here dealt with an AiTM phishing kit (like Evilginx-style proxying) in the wild, and what detection caught it for you? Drop your approach or questions below.
