PhEmail:基于Python的开源网络钓鱼攻击工具

简介:

PhEmail简介

PhEmail是一款采用Python编程语言开发的开源网络钓鱼邮件工具,它可以帮助研究人员在进行社会工程学测试的过程中自动化地给目标发送网络钓鱼邮件。PhEmail不仅可以同时向多个目标用户发送钓鱼邮件并识别出哪些用户点击了邮件,而且还可以在不利用任何浏览器漏洞或邮件客户端漏洞的前提下尽可能多地收集信息。PhEmail自带的引擎可以通过LinkedIN来收集电子邮箱地址,这些数据可以帮助测试人员完成信息采集阶段的一部分工作。

PhEmail:基于Python的开源网络钓鱼攻击工具

除此之外,PhEmail还支持Gmail身份验证,这一功能在目标站点屏蔽了邮件源或IP地址的情况下会非常有用。值得一提的是,该工具还可以克隆目标组织或企业的门户网站登录界面,测试人员可以用这些伪造的页面来窃取目标用户的登录凭证。

PhEmail:基于Python的开源网络钓鱼攻击工具

使用样例

一般来说,第一步是收集目标企业的邮箱地址。PhEmail的搜索引擎在收集到了企业邮箱地址之后,会将它们保存在一个文件中,演示代码如下:


 
 
  1. # phemail.py -g1@example.com 
  2. Gathering emails from domain: example.com100%  
  3. Completed! 
  4. test@example.com 
  5. test2@example.com […] emails.txt updated 

得到了企业邮箱地址之后,接下来就要创建钓鱼邮件模板了。模板中的每一个URL必须要包含一个字符串”{0}”,因为脚本会自动将这个字符串替换成正确的URL地址。一次真实的测试场景截图如下:

PhEmail:基于Python的开源网络钓鱼攻击工具

接下来,我们需要在Web服务器上安装php环境并将php文件”index.php”复制到Web服务器的根目录下。这个文件中包含的JavaScript代码会收集浏览器信息并将其保存到/tmp目录下的日志文件中。演示实例如下:


 
 
  1. # phemail.py -e test-emails.txt -f"Fast Holiday " -r "Fast Holiday " -s "Last MinuteHoliday" -b body.txt -w http://YOUR-WEBSITE.com 
  2. SMTP server: mail.example.com  
  3. Sent to test@example.com 
  4. Error: sending tonotExist-email@example.com  
  5. Phishing URLs point to http://YOUR-WEBSITE.com 
  6. Phemail.py log file saved: phemail-log-12-07-2012_15-42.txt 

接下来,你只需要等待目标用户点击钓鱼邮件,然后你就能够收集到目标用户的某些浏览器信息了:


 
 
  1. Email: test@example.com 
  2. Date: Thu 12/07/2012 11:00:13  
  3. IP: 192.168.0.123  
  4. User Agent: Mozilla/5.0 (Windows NT 6.1;WOW64; rv:13.0) Gecko/20100101 Firefox/13.0.1 appCodeName: Mozilla appName:Netscape appVersion: 5.0 (Windows) appMinorVersion: undefined product: GeckocookieEnabled: true cpuClass: undefined onLine: true opsProfile: undefineduserProfile: undefined language: en-US platform: Win32 systemLanguage:undefined userLanguage: undefined flash: Enabled Plugins: Google UpdateShockwave Flash 11.3 r300 Google Talk Plugin Video Acceleratorversion:0.1.44.16 Version 3.1.4.8140 5.1.10411.0 Adobe PDF Plug-In For Firefoxand Netscape 10.1.3 NPRuntime Script Plug-in Library for Java™ Deploy VmwareRemote Console and Client Integration Plug-in BlackBerry WebSL Browser Plug-InBing Bar The plug-in allows you to open and edit files using Microsoft Officeapplications Office Authorization plug-in for NPAPI browsers 

PhEmail项目主页

【 GitHub传送门 】

工具下载

你可以直接通过克隆PhEmail的GitHub代码库来完成工具的下载:


 
 
  1. git clone https://github.com/Dionach/PhEmail 

工具使用


 
 
  1. PHishing EMAIL tool v0.13 
  2. Usage: phemail.py [-e <emails>] [-m<mail_server>] [-f <from_address>] [-r <replay_address>] [-s<subject>] [-b <body>] 
  3.          -e    emails: File containing list of emails(Default: emails.txt) 
  4.          -f    from_address: Source emailaddress displayed in FROM field of the email (DefaultName Surname<name_surname@example.com>) 
  5.          -r    reply_address: Actual emailaddress used to send the emails in case that people reply to the email(DefaultName Surname <name_surname@example.com>) 
  6.          -s    subject: Subject of theemail (Default: Newsletter) 
  7.          -b    body: Body of the email(Default: body.txt) 
  8.          -p    pages: Specifies number ofresults pages searched (Default: 10 pages) 
  9.          -v    verbose: Verbose Mode(Defaultfalse
  10.          -l    layout: Send email with noembedded pictures  
  11.          -B    BeEF: Add the hook for BeEF 
  12.          -m    mail_server: SMTP mailserver to connect to 
  13.          -g    Google: Use a google accountusername:password 
  14.          -t    Time delay: Add deleaybetween each email (Default: 3 sec) 
  15.          -R    Bunch of emails per time(Default: 10 emails) 
  16.          -L    webserverLog: Customise thename of the webserver log file (DefaultDate time in format"%d_%m_%Y_%H_%M"
  17.          -S    Search: query on Google 
  18.          -d    domain: of email addresses 
  19.          -n    number: of emails perconnection (Default: 10 emails) 
  20.           -c   clone: Clone a web page 
  21.          -w    website: where the phishingemail link points to 
  22.          -o    save output in a file 
  23.          -F    Format (Default: 0):  
  24.                 0- firstname surname 
  25.                 1- firstname.surname@example.com 
  26.                 2- firstnamesurname@example.com 
  27.                 3- f.surname@example.com 
  28.                 4- firstname.s@example.com 
  29.                 5-surname.firstname@example.com 
  30.                 6- s.firstname@example.com 
  31.                 7- surname.f@example.com 
  32.                 8- surnamefirstname@example.com 
  33.                 9- firstname_ 

免责声明

请不要在没有得到目标用户事先同意的情况下实用PhEmail来进行测试,由使用者自身使用不当所带来的问题开发人员不承担任何责任,同时我们也对PhEmail所带来的损失概不负责,请大家妥善使用。

作者:佚名
来源:51CTO

相关文章
|
7月前
|
安全 Linux 网络安全
Kali 渗透测试:基于结构化异常处理的渗透-使用Python编写渗透模块(一)
Kali 渗透测试:基于结构化异常处理的渗透-使用Python编写渗透模块(一)
127 2
|
7月前
|
Python Windows 网络安全
Kali 渗透测试:基于结构化异常处理的渗透-使用Python编写渗透模块(二)
Kali 渗透测试:基于结构化异常处理的渗透-使用Python编写渗透模块(二)
150 2
|
7月前
|
安全 网络安全 数据安全/隐私保护
Python渗透测试之流量分析:流量嗅探工具编程
Python渗透测试之流量分析:流量嗅探工具编程
100 0
|
11月前
|
监控 安全 虚拟化
深入浅出Python沙箱越狱:原理、方法与防范
今天我们来聊一个有趣的话题 - Python沙箱越狱。在我们开始之前,先来搞清楚什么是Python沙箱吧。 简单来,Python沙箱就像是一个虚拟的"游乐场"。在这个游乐场里,你可以尽情地玩耍(运行Python代码),但是不能伤害到外面的世界(不能访问系统资源或执行危险操作)。这个"游乐场"有围栏(限制),有规则(安全策略),目的就是让你玩得开心,又不会搞出什么大乱子。
|
SQL 存储 安全
Python安全编程面试:常见安全漏洞与防范措施
【4月更文挑战第19天】本文介绍了Python安全编程面试中的关键点,包括SQL注入、XSS攻击、命令注入、认证授权问题和密码安全。强调了理解安全漏洞原理、识别易受攻击的代码及采取防范措施的重要性。例如,使用参数化查询防止SQL注入,对用户输入进行HTML转义以防御XSS,通过列表形式传递命令参数避免命令注入,妥善管理认证凭据和采用强密码哈希策略。掌握这些知识能提升面试者的安全编程能力。
172 2
|
安全 JavaScript 前端开发
Python 的安全性和测试:解释什么是 XSS 和 CSRF 攻击?在 Python 中如何防范这些攻击?
Python 的安全性和测试:解释什么是 XSS 和 CSRF 攻击?在 Python 中如何防范这些攻击?
177 2
|
Python
【python学习小案例】提升兴趣之模拟系统入侵
【python学习小案例】提升兴趣之模拟系统入侵
【python学习小案例】提升兴趣之模拟系统入侵
|
Python
python服务器拒绝服务器攻击
# -*- coding: cp936 -*-from scapy.all import *from threading import Thread,activeCountfrom random import randintclass Loop(Thread):    def __init__(self,remoteAddr):        Thread.
949 0
|
Web App开发 数据采集 JavaScript
【Python3爬虫】常见反爬虫措施及解决办法(三)
【Python3爬虫】常见反爬虫措施及解决办法(三) 上一篇博客的末尾说到全网代理IP的端口号是经过加密混淆的,而这一篇博客就将告诉你如何破解!如果觉得有用的话,不妨点个推荐哦~   一、全网代理IP的JS混淆 首先进入全网代理IP,打开开发者工具,点击查看端口号,看起来貌似没有什么问题: 如果你已经爬取过这个网站的代理,你就会知道事情并非这么简单。
1495 0