博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
probe wifi traffic in the air
阅读量:6147 次
发布时间:2019-06-21

本文共 3038 字,大约阅读时间需要 10 分钟。

hot3.png

use python to probe 802.11 wifi traffic in the air

first set the wireless network card to moniter mode

root@kali:~/dc# iwconfiglo        no wireless extensions.wlan0     IEEE 802.11  ESSID:"zeta"            Mode:Managed  Frequency:2.462 GHz  Access Point: 00:6B:8E:C8:BA:B4             Bit Rate=72.2 Mb/s   Tx-Power=22 dBm             Retry short limit:7   RTS thr:off   Fragment thr:off          Encryption key:off          Power Management:on          Link Quality=70/70  Signal level=-32 dBm            Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0          Tx excessive retries:0  Invalid misc:16   Missed beacon:0eth0      no wireless extensions.root@kali:~/dc# airmon-ng start wlan0Found 3 processes that could cause trouble.If airodump-ng, aireplay-ng or airtun-ng stops working aftera short period of time, you may want to run 'airmon-ng check kill'  PID Name  521 NetworkManager  716 wpa_supplicant 1735 dhclientPHY	Interface	Driver		Chipsetphy0	wlan0		iwlwifi		Intel Corporation Wireless 3160 (rev 83)		(mac80211 monitor mode vif enabled for [phy0]wlan0 on [phy0]wlan0mon)		(mac80211 station mode vif disabled for [phy0]wlan0)root@kali:~/dc# iwconfiglo        no wireless extensions.wlan0mon  IEEE 802.11  Mode:Monitor  Frequency:2.457 GHz  Tx-Power=0 dBm             Retry short limit:7   RTS thr:off   Fragment thr:off          Power Management:on          eth0      no wireless extensions.
from scapy.all import *def pktPrint(pkt):    if pkt.haslayer(Dot11Beacon):        print '[+] Detedted 802.11 Beacon Frame'    elif pkt.haslayer(Dot11ProbeReq):        print '[+] Detected 802.11 Probe Request Frame'    elif pkt.haslayer(TCP):        print '[+] Detected a TCP Packet'    elif pkt.haslayer(DNS):        print '[+] Dected a DNS Packet'    conf.iface = 'wlan0mon'sniff(prn=pktPrint)

notice to set conf.iface to wlan0mon.

finally it will print out the infomation in the air.

like this:

[+] Detected 802.11 Probe Request Frame[+] Detected 802.11 Probe Request Frame[+] Detedted 802.11 Beacon Frame[+] Detedted 802.11 Beacon Frame[+] Detedted 802.11 Beacon Frame[+] Detedted 802.11 Beacon Frame

after that do not forget to stop the moniter mode of the wireless card.

root@kali:~/dc# airmon-ng stop wlan0monPHY	Interface	Driver		Chipsetphy0	wlan0mon	iwlwifi		Intel Corporation Wireless 3160 (rev 83)		(mac80211 station mode vif enabled on [phy0]wlan0)		(mac80211 monitor mode vif disabled for [phy0]wlan0mon)root@kali:~/dc# iwconfiglo        no wireless extensions.wlan0     IEEE 802.11  ESSID:"zeta"            Mode:Managed  Frequency:2.462 GHz  Access Point: 00:6B:8E:C8:BA:B4             Bit Rate=72.2 Mb/s   Tx-Power=22 dBm             Retry short limit:7   RTS thr:off   Fragment thr:off          Encryption key:off          Power Management:on          Link Quality=70/70  Signal level=-36 dBm            Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0          Tx excessive retries:0  Invalid misc:1   Missed beacon:0eth0      no wireless extensions.

 

转载于:https://my.oschina.net/donngchao/blog/1554601

你可能感兴趣的文章
跨域-学习笔记
查看>>
the assignment of reading paper
查看>>
android apk 逆向中常用工具一览
查看>>
MyEclipse 报错 Errors running builder 'JavaScript Validator' on project......
查看>>
Skip List——跳表,一个高效的索引技术
查看>>
Yii2单元测试初探
查看>>
五、字典
查看>>
前端js之JavaScript
查看>>
Log4J日志配置详解
查看>>
实验7 BindService模拟通信
查看>>
scanf
查看>>
Socket编程注意接收缓冲区大小
查看>>
SpringMVC初写(五)拦截器
查看>>
检测oracle数据库坏块的方法
查看>>
SQL server 安装教程
查看>>
Linux下ftp和ssh详解
查看>>
跨站脚本功攻击,xss,一个简单的例子让你知道什么是xss攻击
查看>>
js时间和时间戳之间如何转换(汇总)
查看>>
js插件---图片懒加载echo.js结合 Amaze UI ScrollSpy 使用
查看>>
java中string和int的相互转换
查看>>