技能 编程开发 自动化红队钓鱼模拟测试

自动化红队钓鱼模拟测试

v20260406
performing-red-team-phishing-with-gophish
该技能使用Python和gophish库自动化红队钓鱼模拟活动。用户可以创建带有追踪像素的邮件模板,配置SMTP发送协议,导入CSV目标群体,并启动全面的模拟测试。系统可分析打开率、点击率和提交的凭证等关键指标,为安全意识培训和漏洞评估提供重要数据。
获取技能
230 次下载
概览

When to Use

  • When conducting security assessments that involve performing red team phishing with gophish
  • 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 security operations 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

Instructions

  1. Install dependencies: pip install gophish requests
  2. Deploy GoPhish server and obtain an API key from Settings.
  3. Use the Python gophish library to automate campaign setup:
    • Create email templates with HTML body and tracking
    • Configure SMTP sending profiles
    • Import target groups from CSV
    • Create landing pages for credential capture
    • Launch and monitor campaigns
  4. Analyze campaign results: opens, clicks, submitted data, reported.
# For authorized penetration testing and lab environments only
python scripts/agent.py --gophish-url https://localhost:3333 --api-key <key> --campaign-name "Q1 Awareness" --output phishing_report.json

Examples

Create Campaign via API

from gophish import Gophish
from gophish.models import Campaign, Template, Group, SMTP, Page
api = Gophish("api_key", host="https://localhost:3333", verify=False)  # Self-signed cert on localhost lab
campaign = Campaign(name="Q1 Test", groups=[Group(name="Sales Team")],
    template=Template(name="IT Password Reset"), smtp=SMTP(name="Internal SMTP"),
    page=Page(name="Credential Page"))
api.campaigns.post(campaign)
信息
Category 编程开发
Name performing-red-team-phishing-with-gophish
版本 v20260406
大小 8.67KB
更新时间 2026-04-17
语言