一、简介
Gophish 是一个功能强大的开源网络钓鱼演练框架,特别适合甲方用来对内部员工进行邮件安全培训演练。
本文假定真实网站域名为:11.xx.com,钓鱼演练网站域名为:111.xxx.com
二、功能简介
1. Dashboard
钓鱼大盘
查看钓鱼数据
2. Settings
账号设置
ui设置
报告邮箱设置
3. User Management
用户管理
新建用户
4. Webhooks
webhooks设置
三、发送钓鱼演练邮件
1. Users & Groups
查看、新建用户群组
新建群组,可填入First Name、Last Name、Email(必须)、Position等信息,也可以通过模板导入。
这里名字可以只用FirstName,后面邮件模板将用作变量。
2. Email Templates
设置钓鱼演练邮件模板
新建邮件模板,Import email导入eml格式邮件
或者可以在编写普通邮件的同时点击编辑html源码获取邮件的html代码
钓鱼演练邮件模板html代码
<html>
<head>
<title></title>
</head>
<body>
<p><font style="vertical-align: inherit;"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">您好 {{.FirstName}}</font></font></font></font></font></font> ,系统检测到您的账号近期有多次异地登陆操作行为,为了您的安全,请立即更改密码,否则系统将冻结您的账号。</p>
<p><font style="vertical-align: inherit;"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">修改链接:</font></font></font></font><a href="{{.URL}}"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">https://11.xx.com</font></font></font></font></a></font></font></p>
<p> </p>
<p><font style="vertical-align: inherit;"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">{{.Tracker}}</font></font></font></font></p>
</body>
</html>
其中用到三个变量{{.FirstName}}(目标姓名,对应新建群组中的First Name)、{{.URL}}(钓鱼链接,带有rid参数,每个人不同,用于记录打开钓鱼链接)、{{.Tracker}}(追踪图片,用于记录打开邮件)
Variable |
Description |
{{.RId}} |
The target’s unique ID |
{{.FirstName}} |
The target’s first name |
{{.LastName}} |
The target’s last name |
{{.Position}} |
The target’s position |
{{.Email}} |
The target’s email address |
{{.From}} |
The spoofed sender |
{{.TrackingURL}} |
The URL to the tracking handler |
{{.Tracker}} |
An alias for <img src="{{.TrackingURL}}"/> |
{{.URL}} |
The phishing URL |
{{.BaseURL}} |
The base URL with the path and rid parameter stripped. Useful for making links to static files. |
同时,也可以通过以下两种办法增加钓鱼演练邮件的迷惑性
①使用二维码进行钓鱼:
<img src="https://www.xxx.com/ewm?config=%7B%22content%22%3A%22{{.URL}}%22%7D">
②添加邮件签名:
<div><font style="display: inline; font-size: 14px; font-family: Helvetica; color: rgb(255, 147, 0); background-color: rgba(0, 0, 0, 0); font-weight: 900; font-style: normal;" __editorwarp__="1">TEST</font></div><div><font style="display: inline; font-size: 14px; font-family: Helvetica; color: rgb(255, 147, 0); background-color: rgba(0, 0, 0, 0); font-weight: 900; font-style: normal;" __editorwarp__="1">安全工程师<br>
---以下省略---
3. Landing Pages
设置钓鱼页面
新建钓鱼页面
注意,目标网站使用了前端框架的话(例如vue)会导致克隆失败,页面无法显示,需要自己保存网站页面并修改HTML代码,VUE框架由于使用js来触发form动作,需要注释并自己添加from代码。
<form action="" autocomplete="off" class="xxx" enctype="application/x-www-form-urlencoded" method="post">
示例代码:
<html>
<head>
<title></title>
</head>
<body>
<form action="" method="post" name="form"><label>用户名:</label> <input name="username" type="text" /><br />
<label>密码:</label> <input name="password" type="password" /><br />
<input id="login" name="login" type="submit" value="修改密码" /> </form>
</body>
</html>
如遇到某些js没起效果,则需要手动添加js代码
<script type="text/javascript"><!--补充js代码--></script>
4. Sending Profiles
发件设置
新建发件配置
5. Campaigns
钓鱼任务
查看、新建钓鱼任务
新建钓鱼任务
四、报告
1. 自带报告
攻击结果
带时间线的原始事件
2. goreport
Goreport是一个第三方的报表生产脚本,通过Gophish API可以帮你快速生成IP地址、操作系统、浏览器类型、版本、位置信息列表。并导出为execl或者word文档。
项目地址:https://github.com/chrismaddalena/GoReport
先创建配置文件,写入Gophish API,其他两项没有可以忽略
gophish.config
[Gophish]
gp_host: https://127.0.0.1:3333
api_key: <YOUR_API_KEY>
[ipinfo.io]
ipinfo_token: <IPINFO_API_KEY>
[Google]
geolocate_key: <GEOLOCATE_API_KEY>
基本用法
<script type="text/javascript"><!--补充js代码--></script>
程序会自动从接口 https://localhost:3333/api/campaigns/20/?api_key=key 获得统计内容,并将结果输出到xlsx/word文件。
一次可以导出多个结果ID的统计报告
python3 goreport.py --id 20,21-25,88 --format excel
合并多个报告
python3 goreport.py --id 20,21-25,88 --format excel --combine
免责声明:
- 本文仅做邮件安全培训演练学习交流使用! - 若因使用本文相关服务或软件造成不必要的纠纷,本人概不负责! - 本人纯粹技术爱好,若侵相关公司的权益,请告知删除!
文章来源:货拉拉应急响应中心
扫码回复“进群”加入交流群
工具获取回复“burp”“awvs”“nessus”“ladon”"Forfity"等可以。
原文始发于微信公众号(WIN哥学安全):邮件安全培训演练工具Gophish的介绍
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论