diff --git a/modules/phishing/gophish/files/opsec_wrapper.py b/modules/phishing/gophish/files/opsec_wrapper.py new file mode 100644 index 0000000..829a6b9 --- /dev/null +++ b/modules/phishing/gophish/files/opsec_wrapper.py @@ -0,0 +1,15 @@ +class OPSECGoPhish: + def __init__(self): + self.use_gophish_for = ['email_sending', 'template_management'] + self.use_custom_for = ['tracking', 'credential_capture', 'reporting'] + + def send_campaign(self, targets, template): + # Use GoPhish SMTP capabilities + campaign = self.create_minimal_campaign(targets, template) + + # But replace tracking with custom implementation + campaign.tracking_url = self.custom_tracker.generate_url() + campaign.landing_page = self.custom_landing.generate() + + # Store results in encrypted, distributed storage + self.secure_storage.initialize(campaign.id) \ No newline at end of file diff --git a/modules/phishing/gophish/templates/gophish-opsec.yaotl.j2 b/modules/phishing/gophish/templates/gophish-opsec.yaotl.j2 new file mode 100644 index 0000000..6c7199c --- /dev/null +++ b/modules/phishing/gophish/templates/gophish-opsec.yaotl.j2 @@ -0,0 +1,22 @@ +# modules/phishing/gophish/templates/gophish-opsec.yaotl.j2 +gophish: + admin_server: + # Only listen on localhost + listen_url: "127.0.0.1:{{ gophish_admin_port }}" + # Use client certificates + use_tls: true + tls_cert: "/opt/gophish/admin-cert.pem" + tls_key: "/opt/gophish/admin-key.pem" + client_ca: "/opt/gophish/client-ca.pem" + + phish_server: + # Behind nginx, no direct exposure + listen_url: "127.0.0.1:{{ gophish_phish_port }}" + + # Custom modifications + modifications: + - remove_default_headers: true + - randomize_endpoints: true + - custom_tracking_pixel: true + - encrypted_storage: true + - auto_purge_days: 7 \ No newline at end of file diff --git a/modules/phishing/webserver/templates/page-templates/microsoft-login.html.j2 b/modules/phishing/webserver/templates/page-templates/microsoft-login.html.j2 index dae3521..53e7cd7 100644 --- a/modules/phishing/webserver/templates/page-templates/microsoft-login.html.j2 +++ b/modules/phishing/webserver/templates/page-templates/microsoft-login.html.j2 @@ -6,7 +6,10 @@