802.11无线网络

802.11 无线网络

802.11 无线网络就是广泛应用的wifi。

问题

  1. 802.11 网络中的基本设备
    station 和 AP
  2. 操作wifi 网络节点的工具
    wpa_supplicant 和 hostapd
  3. wifi 跳频物理层和扩频物理层还都在用吗?
    跳频物理层是802.11老版本的物理层标准,现在用的设备都是扩频物理层,是选中一个channel进行通信。
  4. wifi 的验证方式有几种?
    wep 有限等效加密, wpa, wpa2
  5. wifi验证方式中wpa什么意思?
    wpa(wifi protected access: wifi 保护访问), wpa包含了802.1X的身份认证和加密,分为两种:WPA Personal (WPA PSK) 和WPA Enterprise, wpa第一版的协议是TKIP(temporal key intergrity protocol 临时秘钥完整性协议), wpa 第二版是CCMP(Counter mode with CBC-MAC protocol)
    支持WPA的AP工作需要在开放系统认证方式下,STA以WPA模式与AP建立关联之后,如果网络中有RADIUS服务器作为认证服务器,那么 STA就使用802.1x方式进行认证;如果网络中没有
    RADIUS,STA与AP就会采用预共享密钥(PSK,Pre-Shared Key)的方式。

接入方式

在这里插入图片描述

过程状态

在这里插入图片描述现在用的802.11i
在这里插入图片描述WPA中验证过程所在的位置
在这里插入图片描述

身份认证

WPA-Personal

WPA-PSK (pre-shared key) 预先分配好的password. 手动的通过某种方式分配好密码,就是平时我们使用wifi时从网络管理员处询问到wifi密码这种方式。

WPA-Enterprise

使用802.1x framework, 需要radius server进行身份认证,然后分配秘钥。生活中用到的如windows里边企业管理用户接入时用的domain域控制。要连入网络需要输入用户名和密码进行认证。

Wi-Fi Protected Setup (WPS)

WPS的目的是自动创建一个安全的无线网络,这个协议不需要用户了解什么是SSID,或者WEP, WPA WPA2和其相关的加密方式的区别。通过wpa_supplicant 使用WPS参考:
https://download.csdn.net/download/dongkun152/11688176

加密协议

TKIP

WEP不够安全,TKIP是在WEP硬件的基础上添加了若干改良措施制定的临时秘钥完整性协议。

CCMP

WPA

在这里插入图片描述在这里插入图片描述在这里插入图片描述

WPA2

在这里插入图片描述在这里插入图片描述在这里插入图片描述
RSN(robust security network) 强健安全网络

管理操作(802.11i)

扫描

扫描分为主动扫描和被动扫描。
主动扫描时,由终端机发送probe request 帧 来请求某个特定网络予以响应。接收到request帧的AP会发出probe response帧 作为回复。
被动扫描时,AP以一定的间隔在所有信道上广播Beacon帧,终端机可以获得beacon帧中的网络信息。

关联

终端机获得要加入网络的信息后,向AP发出Association request 帧,请求加入网络。网络AP会以一个Association response帧回应,关联网络网络成功后就可以进行下面数据传输。
重关联过程终端机向AP发送Reassociation request帧

802.11i身份验证

以最常用的WPA-PSK为例,输入密码开始连接的过程就是正在进行身份验证,身份验证的过程就是PMK(成对主秘钥)生成PTK(成对临时秘钥),GMK(组秘钥)生成GTK的过程。
这个过程通过802.11i的四次握手,两次握手来交换秘钥。
PTK的生成以及4次握手的理解

使用wireshark抓wifi空气包

在ubuntu中用wireshak可以比较容易的使用便宜的wifi卡抓空气包, 这里要用到网卡的monitor 模式。我用的是rtl8192eu,从google上找一个驱动,在makefile中打开CONFIG_WIFI_MONITOR配置选项。
编译安装驱动。
然后执行下面的命令, 命令的作用是使得网卡运行在monitor模式中。

sudo ifconfig wlan0 down 
sudo iwconfig wlan0 mode monitor 
sudo ifconfig wlan0 up

打开wireshark, 选中网卡节点就可以抓包了。
可以使用下面的规则过滤空气包。

wlan type mgt - capture only management frames
wlan type ctl - capture only control frames
wlan type data  - capture only data frames
wlan type mgt subtype beacon - capture only beacon frames
wlan type mgt subtype deauth - capture only deauth frames
wlan type mgt subtype prob-req - capture only probe requests
not wlan mgt - do not capture management frame (i.e. capture data & control frames)
not wlan mgt subtype beacon - capture all frames except beacon frames
wlan type mgt and (subtype beacon or subtype prob-req) - capture only beacon  and probe request frames 
wlan type mgt and (subtype deauth or subtype disassoc) - capture on deauthentication and disassocation frames
(wlan type data) or (wlan type ctl and (subtype rts or subtype cts)) - capture only data frames and RTS/CTS control frames

参考资料:
https://download.csdn.net/download/dongkun152/11686204

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值