What it does. Perform authorized initial access using EvilGinx3 adversary-in-the-middle Part of mukul975/Anthropic-Cybersecurity-Skills (817 security skills) (mukul975/Anthropic-Cybersecurity-Skills).
Install
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill performing-initial-access-with-evilginx3, or copy the skill folder into ~/.claude/skills/performing-initial-access-with-evilginx3/.
- Raw file:
curl -sL https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/HEAD/skills/performing-initial-access-with-evilginx3/SKILL.md
SKILL.md (verbatim)
name: performing-initial-access-with-evilginx3
description: 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.
domain: cybersecurity
subdomain: red-teaming
tags:
- red-team
- initial-access
- phishing
- evilginx
- mfa-bypass
- adversary-in-the-middle
- credential-theft
version: '1.0'
author: mahipal
license: Apache-2.0
d3fend_techniques:
- File Metadata Consistency Validation
- Application Protocol Command Analysis
- Identifier Analysis
- Content Format Conversion
- Message Analysis
nist_csf:
- ID.RA-01
- GV.OV-02
- DE.AE-07
mitre_attack:
- T1595
- T1190
- T1059
- T1078
- T1003
mitre_f3:
version: '1.1'
tactics:
- resource-development
- initial-access
- positioning
techniques:
- id: T1583.001
name: 'Acquire Infrastructure: Domains'
tactic: resource-development
source: attack
- id: T1660
name: Phishing
tactic: initial-access
source: attack
- id: T1557
name: Adversary-in-the-Middle
tactic: initial-access
source: attack
- id: T1539
name: Steal Web Session Cookie
tactic: positioning
source: attack
- id: T1111
name: Multi-Factor Authentication Interception
tactic: initial-access
source: attack
- id: F1004
name: Access with Stolen Session Cookie
tactic: initial-access
source: f3
- id: F1006
name: Account Takeover
tactic: initial-access
source: f3
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.
When to Use
- When conducting security assessments that involve performing initial access with evilginx3
- When following incident response procedures for related security events
- When performing scheduled security testing or auditing activities
- When validating security controls through hands-on testing
Prerequisites
- Familiarity with red teaming concepts and tools
- Access to a test or lab environment for safe execution
- Python 3.8+ with required dependencies installed
- Appropriate authorization for any testing activities
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
Workflow
Phase 1: Infrastructure Setup
- Register a convincing lookalike domain (e.g., using homoglyphs or typosquatting)
- Provision a VPS and point the domain's DNS A record to the server IP
- Install EvilGinx3:
git clone https://github.com/kgretzky/evilginx2.git
cd evilginx2
make
sudo ./bin/evilginx -p ./phishlets
- Configure the domain and IP in EvilGinx3:
config domain example-phish.com
config ipv4 <server-ip>
- EvilGinx3 automatically provisions Let's Encrypt certificates for configured hostnames
Phase 2: Phishlet Configuration
- 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
- Verify phishlet is active and SSL certificate is issued:
phishlets
- Create a lure URL for the phishing campaign:
lures create o365
lures get-url 0
- Optionally configure a redirect URL for post-capture:
lures edit 0 redirect_url https://legitimate-site.com
Phase 3: Phishing Delivery
- Craft a pretext email with the lure URL embedded
- Use GoPhish or manual SMTP for email delivery:
# Integration with EvilGoPhish for combined campaigns
# Provides GoPhish email tracking + EvilGinx3 credential capture
- Implement URL masking or shortening if needed for link obfuscation
- Deploy landing page with appropriate social engineering pretext
Phase 4: Session Hijacking
- Monitor EvilGinx3 for captured sessions:
sessions
sessions <session-id>
- Extract captured session cookies from the session:
# Session output includes:
# - Username and password
# - Session cookies (authentication tokens)
# - Custom captured parameters
- 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
- Establish persistent access by creating application passwords or OAuth tokens
Phase 5: Post-Access Activities
- Enumerate mailbox contents, contacts, and shared drives
- Identify additional targets for lateral phishing
- Check for access to connected cloud applications (SharePoint, Teams, OneDrive)
- Document all captured credentials and access achieved
| Tool |
Purpose |
Platform |
| EvilGinx3 |
AiTM phishing framework |
Linux |
| GoPhish |
Phishing campaign management |
Cross-platform |
| EvilGoPhish |
Combined EvilGinx3 + GoPhish integration |
Linux |
| Cookie-Editor |
Browser cookie import/export |
Browser Extension |
| Modlishka |
Alternative AiTM proxy framework |
Linux |
| Muraena |
Alternative AiTM phishing proxy |
Linux |
Phishlet Targets
| Target Service |
Phishlet |
Captured Data |
| Microsoft 365 |
o365 |
Session cookies, credentials |
| Google Workspace |
google |
Session cookies, credentials |
| Okta |
okta |
Session tokens, credentials |
| GitHub |
github |
Session cookies, credentials |
| AWS Console |
aws |
Session tokens, credentials |
Detection Indicators
| Indicator |
Detection Method |
| Newly registered lookalike domains |
Domain monitoring and certificate transparency logs |
| SSL certificates for suspicious domains |
CT log monitoring (crt.sh, Censys) |
| Unusual login locations after phishing |
SIEM correlation of authentication events |
| Session cookie replay from different IP |
Conditional access policy alerts |
| AiTM proxy headers in traffic |
Network inspection for proxy artifacts |
Validation Criteria
Other files in this skill
assets/template.md (verbatim)
EvilGinx3 Phishing Campaign Template
| Field |
Value |
| Campaign Name |
|
| Target Organization |
|
| Authorization Reference |
|
| Target Service |
Microsoft 365 / Google / Okta / Other |
| Start Date |
|
| End Date |
|
Infrastructure
| Component |
Details |
| Phishing Domain |
|
| Server IP |
|
| Phishlet |
|
| SSL Certificate |
Let's Encrypt (auto) |
| Redirector |
Yes / No |
Target List
| # |
Email |
Department |
Pretext |
| 1 |
|
|
|
| 2 |
|
|
|
Session Captures
| # |
Session ID |
Username |
Cookies Captured |
Time |
MFA Bypassed |
| 1 |
|
|
Yes / No |
|
Yes / No |
Results Summary
| Metric |
Value |
| Emails Sent |
|
| Emails Opened |
|
| Links Clicked |
|
| Credentials Captured |
|
| Sessions Hijacked |
|
| MFA Bypassed |
|
Evidence Checklist
references/api-reference.md (verbatim)
API Reference — Performing Initial Access with Evilginx3
Libraries Used
- pyyaml: Parse Evilginx3 phishlet YAML configuration files
- subprocess: Check Evilginx installation and version
- pathlib: Directory listing and file reading
- re: IP address extraction from session logs
CLI Interface
python agent.py parse --phishlet office365.yaml
python agent.py logs --file sessions.log
python agent.py check
python agent.py list --dir /path/to/phishlets/
python agent.py detect --phishlet office365.yaml
Core Functions
parse_phishlet(phishlet_path) — Analyze phishlet configuration
Extracts proxy hosts, auth tokens, credential fields. Determines MFA bypass capability.
analyze_session_log(log_file) — Parse Evilginx session captures
Identifies sessions with captured tokens and credentials. Extracts source IPs.
check_evilginx_installation() — Verify Evilginx3 binary
Returns installed status and version string.
list_phishlets(phishlet_dir) — Enumerate available phishlets
Lists .yaml/.yml files in phishlet directory with sizes.
generate_detection_rules(phishlet_path) — Create defensive signatures
Generates DNS monitoring, cookie relay detection, and network anomaly rules.
Includes FIDO2/WebAuthn MFA recommendations.
Phishlet Structure
proxy_hosts: Domain-to-phishing-subdomain mappings
auth_tokens: Session cookies to intercept (enables MFA bypass)
credentials: Form fields to capture (username/password)
sub_filters: Content replacement rules for convincing proxied pages
Dependencies
pip install pyyaml
System: evilginx (optional, for live testing)
references/standards.md (verbatim)
Standards and References - EvilGinx3 Initial Access
MITRE ATT&CK References
| Technique ID |
Name |
Tactic |
| T1566.002 |
Phishing: Spearphishing Link |
Initial Access |
| T1557 |
Adversary-in-the-Middle |
Credential Access |
| T1539 |
Steal Web Session Cookie |
Credential Access |
| T1078 |
Valid Accounts |
Initial Access, Persistence |
| T1556 |
Modify Authentication Process |
Credential Access |
| T1550.004 |
Use Alternate Authentication Material: Web Session Cookie |
Lateral Movement |
Industry Standards
- PTES - Pre-Engagement and Intelligence Gathering phases
- OWASP Testing Guide - Authentication Testing
- NIST SP 800-63B - Digital Identity Guidelines: Authentication
- CISA Advisory AA22-277A - Threat Actors Exploiting MFA Bypass Techniques
Official Resources
Research Papers
- Microsoft Storm-1167 AiTM Phishing Campaign Analysis (2023)
- Deepwatch: Catching the Phish - Detecting Evilginx & AiTM
- BDO Security: MFA-Phishing as Initial Access in Red Teaming
references/workflows.md (verbatim)
Workflows - EvilGinx3 Initial Access
End-to-End AiTM Phishing Workflow
1. Reconnaissance
├── Identify target authentication service (M365, Google, Okta)
├── Analyze target MFA implementation (SMS, Authenticator, FIDO2)
├── Register lookalike domain with appropriate TLD
└── Categorize domain to avoid URL filtering
2. Infrastructure Setup
├── Deploy VPS and configure DNS records
├── Install and configure EvilGinx3
├── Enable phishlet for target service
├── Verify SSL certificate provisioning
└── Create and test lure URLs
3. Phishing Delivery
├── Craft pretext email with social engineering
├── Configure GoPhish or SMTP relay for delivery
├── Send phishing emails to authorized targets
└── Monitor delivery and open rates
4. Credential and Session Capture
├── Monitor EvilGinx3 session dashboard
├── Capture credentials as victims authenticate
├── Capture session cookies (MFA bypass tokens)
└── Export session data for exploitation
5. Session Hijacking
├── Import session cookies into attacker browser
├── Navigate to target service with hijacked session
├── Validate access to victim's account
└── Enumerate accessible resources
6. Persistence and Escalation
├── Create application-specific passwords
├── Register attacker device in Azure AD / Entra ID
├── Add OAuth application consents
└── Establish email forwarding rules for persistence
7. Reporting
├── Document attack chain with evidence
├── Record number of successful captures
├── Identify defensive gaps exploited
└── Provide remediation recommendations
Cookie Import Workflow
1. From EvilGinx3 session output, copy cookie data
2. Open browser with Cookie-Editor extension
3. Navigate to target service login page
4. Clear existing cookies for the domain
5. Import captured cookies via Cookie-Editor
6. Refresh the page to obtain authenticated session
7. Verify access to victim's account
Back to mukul975/Anthropic-Cybersecurity-Skills (817 security skills) or Agent skills.