一、演习目的
企业安全威胁中来自网络邮件的威胁在近几年不断增长,因为邮件已经成为日常生活中不可缺少的一部分,办公信息通知,沟通方案留存,都是需要通过邮件进行交付。如果没有邮件相关的安全防范意识,及其可能会被钓鱼、社工、甚至被种植木马,对于企业来说这是极大的安全风险。故本次通过模仿一次真实的钓鱼事件,进行安全意识培训,告诉员工已经被钓鱼,今后应该怎样识别、怎样判断是否为钓鱼邮件,从而达到增加行员安全意识的目的。
为更好地认识公司的安全意识成熟程度,验证前期防止钓鱼邮件宣贯效果,通过仿真训练提升全员的安全防范意识,降低公司信息泄露的风险。
二、演习步骤
邮件模板(供参考)
各部门及全体员工:
大家好!
近期云南等地区持续出现本土新增新冠病毒肺炎确诊病例。临近暑期人员流动变大,为强化疫情防控成果,公司特就疫情防控要求再次进行强调如下:
一、各区域员工应主动关注本地疫苗接种政策,提高疫情防控意识,积极进行新冠疫苗接种。
为保障新冠肺炎疫情防控和维护经济社会秩序,快速形成人群免疫屏障,有效阻止新冠肺炎病毒传播,保障我司员工的身体健康和生命安全,按照疫情防控疫苗接种组织协调工作组和疫情防控工作领导小组的整体规划,现再次统计我司在职员工新冠疫苗注射情况 ,请各位按要求在下面调查问卷或附件中的问卷上填写接种情况。
二、调查问卷
请于2021年xx月xx日下午下班前完成问卷填写,谢谢配合。
请在此处填写调查问卷
(恶意链接地址,点击跳转到恶意页面)
XXXX人力资源部
2021年7月xx日
整体思路
1、前端页面嵌入form表单负责提交个人信息;
2、后端使用flask框架接收、处理数据;
3、需分别定位点击链接、提交数据的员工,并且做好员工上报收到钓鱼邮件的记录;
跳转页面制作(前端页面)
可通过简单的前端代码制作一个form表单供员工填写信息(此页面可从公司系统中扒下来修改,更加逼真)。
关键代码如下:
<form action="http://vps地址:flask端口/submit路由" method="post"><input name="name" placeholder="姓名" required="required" type="text" style="width:100px;height:45px"/><input name="staff_id" placeholder="工号" required="required" type="text" style="width:100px;height:45px"/><input name="status" placeholder="是否已接种" required="required" type="text" style="width:100px;height:45px"/><button class="but" type="submit">提交</button></form>
提交数据后的页面制作
我们这次用的比较简单,一个提交成功提示的页面submit.html,如下图:
后台数据接收处理
from flask import Flask,jsonify,render_template,request
import json
import pymysql
app = Flask(__name__)#实例化app对象
#员工提交的数据写入数据库
def mysql(name,staff_id,status):
db = pymysql.connect(host = "x.x.x.x",port = xxx,user = "xxx",passwd = "xxx",db = 'xxx', charset='utf8' )
cursor = db.cursor()
command = "insert into 库名.表名 (name, staff_id, status) values(%s, %s, %s);"
values = (name,staff_id,status)
cursor.execute(command,values)
db.commit()
cursor.close()
db.close()
#'/ ' URL与submit()函数绑定,当在打开web服务器的主页时,将呈现该函数的输出
flask类的run()方法在本地开发服务器上运行应用程序,即上述submit.html页面
@app.route('/submit', methods=['POST'])
def submit():
if request.method == 'POST':
name = request.form.get('name')
staff_id = request.form.get('staff_id')
status = request.form.get('status')
print(name,staff_id,status)
s = mysql(name,staff_id,status)
with open("submit.html","r",encoding = "utf-8") as f:
submit_html = f.read()
return submit_html
if __name__ == '__main__':
# run_simple(host, port, self, **options)
app.run(host = '0.0.0.0',port = "xxx",debug=True)
python批量发送邮件
# coding:utf-8
import xlrd
import xlwt
import os
import smtplib #smtp服务器
from email.mime.text import MIMEText #邮件文本
from email.header import Header
#取邮箱
workBook = xlrd.open_workbook(r"邮箱表路径")
allSheetNames = workBook.sheet_names()
target_Sheet = workBook.sheet_names()[x]
target_Sheet_content = workBook.sheet_by_name(f"{target_Sheet}")
rows = target_Sheet_content.nrows
#cols = target_Sheet_content.ncols
print(f"sheet表的名字为:{target_Sheet}\nsheet邮箱总数:{rows}")
for i in range(0,rows):
person_Email = target_Sheet_content.cell(i,0).value
#邮件构建
subject = "【疫情防控】关于第三季度新冠疫苗接种情况更新统计"#邮件标题
sender = "发件人邮箱"#发送方
password = "发件人邮箱授权码"
recver = person_Email#接收方
content = f"""<html>
<html>
<head>
<title></title>
</head>
<body>
<div style="line-height: 1.7; color: rgb(0, 0, 0);">
<p style="text-align:start; text-indent:0px; -webkit-text-stroke-width:0px; margin-top:6px; margin-bottom:6px"><span style="font-size:16px"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="color:#000000"><span style="font-style:normal"><span style="font-variant-ligatures:normal"><span style="font-variant-caps:normal"><span style="font-weight:400"><span style="letter-spacing:normal"><span style="orphans:2"><span style="text-transform:none"><span style="white-space:normal"><span style="widows:2"><span style="word-spacing:0px"><span style="text-decoration-thickness:initial"><span style="text-decoration-style:initial"><span style="text-decoration-color:initial"><span style="font-family:sans-serif"><span style="line-height:24px"><strong style="-webkit-user-drag:none; -webkit-app-region:no-drag"><span style="font-size:14.5pt"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="line-height:29px"><span style="font-family:仿宋">各部门及全体员工:</span></span></span></span></span></strong></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p>
<div style="text-align:start; -webkit-text-stroke-width:0px; text-indent:29pt; margin-top:6px; margin-bottom:6px"><span style="font-size:16px"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="color:#000000"><span style="font-style:normal"><span style="font-variant-ligatures:normal"><span style="font-variant-caps:normal"><span style="font-weight:400"><span style="letter-spacing:normal"><span style="orphans:2"><span style="text-transform:none"><span style="white-space:normal"><span style="widows:2"><span style="word-spacing:0px"><span style="text-decoration-thickness:initial"><span style="text-decoration-style:initial"><span style="text-decoration-color:initial"><span style="font-family:sans-serif"><span style="line-height:24px"><strong style="-webkit-user-drag:none; -webkit-app-region:no-drag"><span style="font-size:14.5pt"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="line-height:29px"><span style="font-family:仿宋"><span style="font-weight:normal">大家好!</span></span></span></span></span></span></strong></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></div>
<div style="text-align:start; -webkit-text-stroke-width:0px; text-indent:29pt; margin-top:6px; margin-bottom:6px"><span style="font-size:16px"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="color:#000000"><span style="font-style:normal"><span style="font-variant-ligatures:normal"><span style="font-variant-caps:normal"><span style="font-weight:400"><span style="letter-spacing:normal"><span style="orphans:2"><span style="text-transform:none"><span style="white-space:normal"><span style="widows:2"><span style="word-spacing:0px"><span style="text-decoration-thickness:initial"><span style="text-decoration-style:initial"><span style="text-decoration-color:initial"><span style="font-family:sans-serif"><span style="line-height:24px"><strong style="-webkit-user-drag:none; -webkit-app-region:no-drag"><span style="font-size:14.5pt"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="line-height:29px"><span style="font-family:仿宋"><span style="font-weight:normal">近期云南等地区持续出现本土新增新冠病毒肺炎确诊病例。临近暑期人员流动变大,为强化疫情防控成果,公司特就疫情防控要求再次进行强调如下:</span></span></span></span></span></span></strong></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></div>
<div style="text-align:start; -webkit-text-stroke-width:0px; text-indent:29pt; margin-top:6px; margin-bottom:6px">
<p style="text-indent:27.75pt; margin-top:6px; margin-bottom:6px"><span style="font-size:16px"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="color:#000000"><span style="font-style:normal"><span style="font-variant-ligatures:normal"><span style="font-variant-caps:normal"><span style="font-weight:400"><span style="letter-spacing:normal"><span style="orphans:2"><span style="text-transform:none"><span style="white-space:normal"><span style="widows:2"><span style="word-spacing:0px"><span style="text-decoration-thickness:initial"><span style="text-decoration-style:initial"><span style="text-decoration-color:initial"><span style="font-family:sans-serif"><span style="line-height:24px"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="line-height:24px"><strong style="-webkit-user-drag:none; -webkit-app-region:no-drag"><span style="font-size:14.5pt"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="line-height:29px"><span style="font-family:仿宋">一、各区域员工应主动关注本地疫苗接种政策,提高疫情防控意识,积极进行新冠疫苗接种。</span></span></span></span></span></strong></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p>
<p style="text-indent:27.75pt; margin-top:6px; margin-bottom:6px"><span style="font-size:16px"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="color:#000000"><span style="font-style:normal"><span style="font-variant-ligatures:normal"><span style="font-variant-caps:normal"><span style="font-weight:400"><span style="letter-spacing:normal"><span style="orphans:2"><span style="text-transform:none"><span style="white-space:normal"><span style="widows:2"><span style="word-spacing:0px"><span style="text-decoration-thickness:initial"><span style="text-decoration-style:initial"><span style="text-decoration-color:initial"><span style="font-family:sans-serif"><span style="line-height:24px"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="line-height:24px"><span style="border:1pt none windowtext; font-size:14.5pt; padding:0cm"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="line-height:29px"><span style="font-family:仿宋">为保障新冠肺炎疫情防控和维护经济社会秩序,快速形成人群免疫屏障,有效阻止新冠肺炎病毒传播,保障我司员工的身体健康和生命安全,按照疫情防控疫苗接种组织协调工作组和疫情防控工作领导小组的整体</span></span></span></span></span><span style="border:1pt none windowtext; font-size:14.5pt; padding:0cm"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="line-height:29px"><span style="font-family:仿宋">规划,</span></span></span></span></span><span style="border:1pt none windowtext; font-size:14.5pt; padding:0cm"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="line-height:29px"><span style="font-family:仿宋"><span style="background-color:#ffff00">现再次统计我司在职员工新冠疫苗注射情况 ,请各位按要求在下面调查问卷上填写接种情况。</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p>
<p style="text-indent:27.75pt; margin-top:6px; margin-bottom:6px"><span style="font-size:16px"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="color:#000000"><span style="font-style:normal"><span style="font-variant-ligatures:normal"><span style="font-variant-caps:normal"><span style="font-weight:400"><span style="letter-spacing:normal"><span style="orphans:2"><span style="text-transform:none"><span style="white-space:normal"><span style="widows:2"><span style="word-spacing:0px"><span style="text-decoration-thickness:initial"><span style="text-decoration-style:initial"><span style="text-decoration-color:initial"><span style="font-family:sans-serif"><span style="line-height:24px"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="line-height:24px"><strong style="-webkit-user-drag:none; -webkit-app-region:no-drag"><span style="font-size:14.5pt"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="line-height:29px"><span style="font-family:仿宋">二、调查问卷</span></span></span></span></span></strong></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p>
<p style="text-indent:27.75pt; margin-top:6px; margin-bottom:6px"><span style="font-size:16px"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="color:#000000"><span style="font-style:normal"><span style="font-variant-ligatures:normal"><span style="font-variant-caps:normal"><span style="font-weight:400"><span style="letter-spacing:normal"><span style="orphans:2"><span style="text-transform:none"><span style="white-space:normal"><span style="widows:2"><span style="word-spacing:0px"><span style="text-decoration-thickness:initial"><span style="text-decoration-style:initial"><span style="text-decoration-color:initial"><span style="font-family:sans-serif"><span style="line-height:24px"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="line-height:24px"><span style="border:1pt none windowtext; font-size:14.5pt; padding:0cm"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="line-height:29px"><span style="font-family:仿宋">请于</span></span></span></span></span><span style="border:1pt none windowtext; font-size:14.5pt; padding:0cm"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="line-height:29px"><span style="font-family:仿宋"><span style="background-color:#fff566">2021年x月x日下午下班前</span></span></span></span></span></span><span style="border:1pt none windowtext; font-size:14.5pt; padding:0cm"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="line-height:29px"><span style="font-family:仿宋">完成问卷填写,谢谢配合。</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p>
<div style="background:#eeeeee;border:1px solid #cccccc;padding:5px 10px;"><a href="http://vps ip:端口?email部门编号={person_Email}"><span style="font-size:16px"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="color:#000000"><span style="font-style:normal"><span style="font-variant-ligatures:normal"><span style="font-variant-caps:normal"><span style="font-weight:400"><span style="letter-spacing:normal"><span style="orphans:2"><span style="text-transform:none"><span style="white-space:normal"><span style="widows:2"><span style="word-spacing:0px"><span style="text-decoration-thickness:initial"><span style="text-decoration-style:initial"><span style="text-decoration-color:initial"><span style="font-family:sans-serif"><span style="line-height:24px"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="line-height:24px"><span style="border:1pt none windowtext; font-size:14.5pt; padding:0cm"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="line-height:29px"><span style="font-family:仿宋"><span style="color:#ff0000"><b style="-webkit-user-drag:none; -webkit-app-region:no-drag">请在此处填写调查问卷</b></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></a></div>
</div>
<div style="text-align:start; -webkit-text-stroke-width:0px; text-indent:29pt; margin-top:6px; margin-bottom:6px"> </div>
<div style="text-align:start; -webkit-text-stroke-width:0px; text-indent:29pt; margin-top:6px; margin-bottom:6px"> </div>
<div style="text-align:start; -webkit-text-stroke-width:0px; text-indent:27.75pt; margin-top:6px; margin-bottom:6px"> </div>
<div style="text-align:start; -webkit-text-stroke-width:0px; text-indent:27.75pt; margin-top:6px; margin-bottom:6px">
<p align="right" style="text-indent:0px; text-align:right; margin-top:6px; margin-bottom:6px"><span style="font-size:16px"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="color:#000000"><span style="font-style:normal"><span style="font-variant-ligatures:normal"><span style="font-variant-caps:normal"><span style="font-weight:400"><span style="letter-spacing:normal"><span style="orphans:2"><span style="text-transform:none"><span style="white-space:normal"><span style="widows:2"><span style="word-spacing:0px"><span style="text-decoration-thickness:initial"><span style="text-decoration-style:initial"><span style="text-decoration-color:initial"><span style="font-family:sans-serif"><span style="line-height:24px"><span style="font-size:14px"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="color:#000000"><span style="font-family:Helvetica, "Microsoft Yahei", verdana"><span style="border:1pt none windowtext; font-size:14.5pt; padding:0cm"><span style="font-size:14.5pt"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="background-image:initial"><span style="background-position:initial"><span style="background-size:initial"><span style="background-repeat:initial"><span style="background-attachment:initial"><span style="background-origin:initial"><span style="background-clip:initial"><span style="line-height:29px"><span style="font-family:仿宋">xxxx人力资源部</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p>
<p align="right" style="text-indent:0px; text-align:right; margin-top:6px; margin-bottom:6px"><span style="font-size:16px"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="color:#000000"><span style="font-style:normal"><span style="font-variant-ligatures:normal"><span style="font-variant-caps:normal"><span style="font-weight:400"><span style="letter-spacing:normal"><span style="orphans:2"><span style="text-transform:none"><span style="white-space:normal"><span style="widows:2"><span style="word-spacing:0px"><span style="text-decoration-thickness:initial"><span style="text-decoration-style:initial"><span style="text-decoration-color:initial"><span style="font-family:sans-serif"><span style="line-height:24px"><span style="font-size:14px"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="color:#000000"><span style="font-family:Helvetica, "Microsoft Yahei", verdana"><span style="border:1pt none windowtext; font-size:14.5pt; padding:0cm"><span style="font-size:14.5pt"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="background-image:initial"><span style="background-position:initial"><span style="background-size:initial"><span style="background-repeat:initial"><span style="background-attachment:initial"><span style="background-origin:initial"><span style="background-clip:initial"><span style="line-height:29px"><span style="font-family:仿宋">2021年x月xx日</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p>
<p style="text-indent:0px"><span style="font-size:16px"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="color:#000000"><span style="font-style:normal"><span style="font-variant-ligatures:normal"><span style="font-variant-caps:normal"><span style="font-weight:400"><span style="letter-spacing:normal"><span style="orphans:2"><span style="text-transform:none"><span style="white-space:normal"><span style="widows:2"><span style="word-spacing:0px"><span style="text-decoration-thickness:initial"><span style="text-decoration-style:initial"><span style="text-decoration-color:initial"><span style="font-family:sans-serif"><span style="line-height:24px"><span style="font-size:14px"><span style="-webkit-user-drag:none"><span style="-webkit-app-region:no-drag"><span style="color:#000000"><span style="font-family:Arial"> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p>
</div>
</div>
</body>
</html>
"""
message = MIMEText(content,"html","utf-8")
#content 发送内容 "plain"文本格式 utf-8 编码格式
message['Subject'] = subject #邮件标题
message['To'] = recver #收件人
message['From'] = "xxxx人力资源部<发件人邮箱>" #发件人
#实例化smtp服务器,我用的163邮箱
smtp = smtplib.SMTP_SSL("smtp.163.com",994)
#发件人登录
smtp.login(sender,password)
#as_string 对 message 的消息进行了封装
smtp.sendmail(sender,recver,message.as_string())
print(f"第{i+1}封邮件:{person_Email}发送完成!")
smtp.close()
上述代码中包含<a href="http://vps ip:端口?email=部门编号{person_Email}">
,用url拼接邮箱账户来统计是否点击链接(可在web访问日志中查看),部门编号方便后续数据统计汇总。
当用户输入并提交数据之后,会直接写入到数据库中,可以定位到员工个人。
统一话术
发起邮件测试后,会收到员工的上报,我们需要统一话术,避免提前露馅,如:“感谢您的反馈,我们先确认下该邮件是否为钓鱼邮件,确认前请不要做任何操作,确认后会第一时间通知您,谢谢。”
追踪与统计
根据xx邮件测试结果,需按部门收集相关信息。
开展培训
对本次xx邮件演练做复盘,展示上一步中的数据,对员工进行信息安全意识培训。介绍常见的钓鱼邮件类型以及该如何防范,收到xx邮件后上报的途径。
重复
定期开展钓鱼邮件测试,避免长时间后员工放低警惕性,对于入职的新员工,可能缺乏相关的信息安全意识培训,通过真实的演练来提高信息安全意识。紧跟流行的xx邮件攻击方式,在每次完成测试后与上一次测试做对比,检验员工的不安全行为是否得到改善。总结每次存在的不足以及需要改进的地方,避免在下一次测试出现同样的问题。
安全问题、事件第一响应处置人员及联系方式
为了安全事件响应处理更有效及时,明确安全事件第一响应处置人及部门负责人,详细信息如下:
联系人:张三
联系电话:11111111111
三、演习不足之处
1、第三方邮箱限制。邮件服务器封禁ip和邮箱账号问题,每日发送邮箱限制,不能同一时间发送完毕,各部门之间消息同步,后面的部门知道消息后提高警惕。可搭建私人邮件服务器。
2、发送模板单一,应根据不同部门工作特性发送不同类型邮件;
3、存在乱输入情况,可收集全公司人员姓名,使用前端模糊匹配选择,避免胡乱输入情况;或写死姓名工号,留是否选择框给选择;
4、发件人邮箱易被识别,可购买公司类似的域名,使邮件更加逼真;