CG
SkillsPerforming Adversary in the Middle Phishing Detection
Start Free
Back to Skills Library
Phishing Defense🟡 Intermediate

Performing Adversary in the Middle Phishing Detection

Detect and respond to Adversary-in-the-Middle (AiTM) phishing attacks that use reverse proxy kits like EvilProxy, Evilginx, and Tycoon 2FA to bypass MFA and steal session tokens.

3 min read

Prerequisites

  • Azure AD / Entra ID Conditional Access policies
  • SIEM with authentication log ingestion (Azure AD sign-in logs)
  • Web proxy with SSL inspection and URL categorization
  • Endpoint Detection and Response (EDR) solution
  • FIDO2/phishing-resistant MFA capability

Performing Adversary-in-the-Middle Phishing Detection

Overview

Adversary-in-the-Middle (AiTM) phishing attacks use reverse-proxy infrastructure to sit between the victim and the legitimate authentication service, intercepting both credentials and session cookies in real time. This allows attackers to bypass multi-factor authentication (MFA). The most prevalent PhaaS kits in 2025 include Tycoon 2FA, Sneaky 2FA, EvilProxy, and Evilginx. Over 1 million PhaaS attacks were detected in January-February 2025 alone. These attacks have evolved from QR codes to HTML attachments and SVG files for link distribution.

Prerequisites

  • Azure AD / Entra ID Conditional Access policies
  • SIEM with authentication log ingestion (Azure AD sign-in logs)
  • Web proxy with SSL inspection and URL categorization
  • Endpoint Detection and Response (EDR) solution
  • FIDO2/phishing-resistant MFA capability

Key Concepts

How AiTM Works

  1. Victim receives phishing email with link to attacker-controlled domain
  2. Attacker domain runs reverse proxy that mirrors legitimate login page
  3. Victim enters credentials on proxied page; credentials captured in transit
  4. Reverse proxy forwards credentials to real authentication service
  5. MFA challenge sent to victim; victim completes MFA on proxied page
  6. Attacker captures session cookie returned by legitimate service
  7. Attacker replays session cookie to access victim's account without MFA

Major AiTM Kits (2025)

KitTypePrimary TargetsEvasion
Tycoon 2FAPhaaSMicrosoft 365, GoogleCAPTCHA, Cloudflare turnstile
EvilProxyPhaaSMicrosoft 365, Google, OktaRandom URLs, IP rotation
EvilginxOpen-sourceAny web applicationCustom phishlets
Sneaky 2FAPhaaSMicrosoft 365Anti-bot checks
NakedPagesPhaaSMultipleMinimal infrastructure

Detection Indicators

  • Authentication from unusual IP not matching user profile
  • Session cookie reuse from different IP/device than authentication
  • Login page served from non-Microsoft/non-Google infrastructure
  • CDN requests to legitimate auth providers from phishing domains
  • Impossible travel between authentication and session usage

Implementation Steps

Step 1: Deploy Phishing-Resistant MFA

  • Implement FIDO2 security keys or Windows Hello for Business for high-value accounts
  • Configure Conditional Access to require phishing-resistant MFA for admins
  • Enable certificate-based authentication where possible
  • Disable SMS and voice MFA for privileged accounts
  • AiTM cannot intercept FIDO2 because authentication is bound to origin domain

Step 2: Configure Conditional Access Policies

  • Require compliant/managed device for sensitive application access
  • Block authentication from anonymous proxies and Tor exit nodes
  • Enforce token binding to limit session cookie replay
  • Configure continuous access evaluation (CAE) for real-time token revocation
  • Implement sign-in risk policies that require re-authentication for risky sign-ins

Step 3: Build AiTM Detection Rules

  • Alert on sign-in followed by session from different IP within 10 minutes
  • Detect authentication where proxy IP does not match user's expected location
  • Monitor for impossible travel patterns in session usage
  • Alert on inbox rules created immediately after authentication (common post-compromise)
  • Detect new MFA method registration from suspicious sign-in

Step 4: Monitor Web Proxy for AiTM Infrastructure

  • Log and analyze DNS queries to newly registered domains
  • Detect connections to known PhaaS infrastructure IPs
  • Alert on authentication page backgrounds loaded from legitimate CDNs through proxy domains
  • Monitor for SSL certificates issued to domains mimicking corporate login pages
  • Block access to known EvilProxy/Evilginx infrastructure via threat intelligence

Step 5: Implement Post-Compromise Detection

  • Alert on mailbox forwarding rules created after suspicious authentication
  • Detect OAuth app consent after AiTM sign-in
  • Monitor for email sending patterns indicating BEC follow-up
  • Alert on SharePoint/OneDrive mass download after session hijack
  • Track lateral movement from compromised account

Tools & Resources

  • Microsoft Entra ID Protection: Risk-based Conditional Access
  • Azure AD Sign-in Logs: Authentication event analysis
  • Okta ThreatInsight: AiTM proxy detection at IdP level
  • Sekoia TDR: AiTM campaign tracking and intelligence
  • Evilginx (defensive): Understanding attack mechanics for detection

Validation

  • Phishing-resistant MFA blocks AiTM session capture in test scenario
  • Conditional Access denies session replay from different device/IP
  • SIEM alerts fire on simulated AiTM sign-in patterns
  • Web proxy blocks connections to known PhaaS infrastructure
  • Post-compromise rules detect inbox rule creation after suspicious auth

Compliance Framework Mapping

This skill supports compliance evidence collection across multiple frameworks:

  • SOC 2: CC6.1 (Logical Access), CC7.2 (Anomaly Detection)
  • ISO 27001: A.7.2 (Information Security Awareness), A.13.2 (Information Transfer)
  • NIST 800-53: AT-2 (Awareness Training), SI-8 (Spam Protection), SC-7 (Boundary Protection)
  • NIST CSF: PR.AT (Awareness & Training), DE.CM (Continuous Monitoring)

Claw GRC Tip: When this skill is executed by a registered agent, compliance evidence is automatically captured and mapped to the relevant controls in your active frameworks.

Deploying This Skill with Claw GRC

Agent Execution

Register this skill with your Claw GRC agent for automated execution:

# Install via CLI
npx claw-grc skills add performing-adversary-in-the-middle-phishing-detection

# Or load dynamically via MCP
grc.load_skill("performing-adversary-in-the-middle-phishing-detection")

Audit Trail Integration

When executed through Claw GRC, every step of this skill generates tamper-evident audit records:

  • SHA-256 chain hashing ensures no step can be modified after execution
  • Evidence artifacts (configs, scan results, logs) are automatically attached to relevant controls
  • Trust score impact — successful execution increases your agent's trust score

Continuous Compliance

Schedule this skill for recurring execution to maintain continuous compliance posture. Claw GRC monitors for drift and alerts when re-execution is needed.

Use with Claw GRC Agents

This skill is fully compatible with Claw GRC's autonomous agent system. Deploy it to any registered agent via MCP, and every execution will be logged in the tamper-evident audit trail.

// Load this skill in your agent
npx claw-grc skills add performing-adversary-in-the-middle-phishing-detection
// Or via MCP
grc.load_skill("performing-adversary-in-the-middle-phishing-detection")

Tags

aitmevilproxyevilginxphishingmfa-bypasssession-hijackingreverse-proxycredential-theft

Related Skills

Red Team & Offensive Security

Performing Initial Access with Evilginx3

4m·intermediate
Phishing Defense

Analyzing Malicious Url with URLScan

3m·intermediate
Phishing Defense

Detecting Qr Code Phishing with Email Security

3m·intermediate
Phishing Defense

Implementing Anti Phishing Training Program

3m·intermediate
Phishing Defense

Implementing DMARC DKIM SPF Email Security

3m·intermediate
Phishing Defense

Implementing Email Sandboxing with Proofpoint

3m·intermediate

Skill Details

Domain
Phishing Defense
Difficulty
intermediate
Read Time
3 min
Code Examples
0

On This Page

OverviewPrerequisitesKey ConceptsImplementation StepsTools & ResourcesValidationCompliance Framework MappingDeploying This Skill with Claw GRC

Deploy This Skill

Add this skill to your Claw GRC agent and start automating.

Get Started Free →