How an0nud4y/evilginx-phishing-infra-setup works
Project type and purpose
• This repository is a documentation and automation-playbook for building a Phishing Engagement Infrastructure (i.e., a red-team phishing platform).
• It covers domain procurement & reputation checking, email delivery methods, multiple phishing proxies (Evilginx, GoPhish), email template‐linting, OPSEC/anti-detection hardening, and defense research.
Main architectural components
a. Domain Management & Reputation Services
• Domain registrar/DNS provider (automated via scripts or cloud APIs)
• External categorization/reputation APIs (Bluecoat, McAfee, Palo Alto, FortiGuard, etc.)
b. Certificate Authority
• Let’s Encrypt (wildcard cert issuance for phishing domains)
c. Edge Proxy & WAF
• Cloudflare (DNS proxy, basic WAF, TLS termination)
• Nginx reverse proxy (to obfuscate Golang fingerprints, enforce UA rules)
d. Phishing Proxy Layer
• Evilginx2 instances (HTTP/S mitm to proxy legitimate sites, inject JS, capture credentials)
• Phishlets (custom scripts, wildcard cert automation)
e. Campaign Management & SMTP Relay
• GoPhish server (campaign orchestration, landing pages, tracking pixel)
• External SMTP services (SendGrid, Mailgun, AWS SES, or Microsoft365/Azure)
• Email‐template tooling (HTML linter, spam header decoder)
f. Data Storage & Analytics
• SQLite (GoPhish or Evilginx session DBs)
• Log aggregation/monitoring (custom scripts, mail-tester)
g. Attacker Workstation
• CLI/tools to automate deployment (Terraform/Ansible/Github Actions)
• Local dev scripts for phishlet building and testing
Relationships and data flows
• Attacker workstation → (1) Domain API calls → DNS provider
• Attacker workstation → (2) Cert-request → Let’s Encrypt
• Attacker workstation → (3) Cloudflare config → Proxy/TLS setup
• Target user email flow:
• GoPhish → SMTP relay → Target inbox
• Target clicks link to phishing domain → Cloudflare → Nginx → Evilginx → real site upstream
• Evilginx injects JS, captures credentials → writes to core/http_proxy.go DB
• GoPhish GUI/API for campaign metrics → Analyst workstation
Architectural patterns & design principles
• Layered security & defense-in-depth: separate domain management, TLS termination, proxying, app logic
• Modular phishlets: each target site encapsulated as a self-contained proxy rule
• Microservices style: GoPhish and Evilginx run as distinct services behind Nginx
• Infrastructure-as-Code: automate setup to reduce OPSEC leaks
• Notes on OPSEC hardening layers (header removal, UA filters, JS obfuscation)
• Components into logical tiers: Provisioning → Edge Proxy → Phishing Services → Data Store → Analyst