| 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"] |
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
./bin/evilginx -p ./phishlets