分类 路由器 下的文章

[读书笔记] 无线局域网 初级基本概念

当我们讨论局域网的时候, 一般指的是链路层和物理层, 较上2层: TCP/IP 传输层/网络层 来说, 链路层和物理层有不同的介质, 组网方式, 协议. TCP/IP 相对比较固定.

IEEE 802 一系列协议就是处理 链路层和物理层的一些协议, 如:
802.3 Ethernet协议、802.5 Token Ring协议、802.3z 100BASE-T快速以太网协议, 802.11 WLAN 协议.

802.11 里面又包括很多协议: 如 802.11a/b/g/n, 802.11i, 802.11e 基于WLAN的QoS协议

无线网络有2种模式: Infrastructure 模式和 Ad-Hoc 模式.

  1. Infrastructure 模式所有的无线连接端连接到同一个访问点(AP), 就是我们现在家里常用的路由器模式.
  2. Ad-Hoc 模式: 即点对点模式, Ad Hoc源自于拉丁语,意思是“for this”引申为“for this purpose
    only”,即“为某种目的设置的,特别的”意思,即Ad hoc网络是一种有特殊用途的网络。

WIFI, 802.11 和 无线局域网

  • Wireless LAN is a general term used for short-range, high-speed radio
    networks. Wi-Fi is one kind of wireless LAN.
  • IEEE 802.11 is the formal technical standard that defines how Wi-Fi
    systems operate.
  • Wi-Fi is the industry standard for products based on IEEE 802.11 as
    defined by the Wi-Fi Alliance. Wi-Fi products are tested for
    compatibility among different manufacturers.

在无线客户端连接到一个访问点之前, 一般有2步: authentication -> association.

Wired Equivalent Privacy: 最开始的想法是: 像有线设备一样保障隐私.
Wi-Fi Protected Access(WPA) 实现了 802.11i的一个子集, WIFI 联盟对于完全实现802.11i的协议称之为 WPA2, 也被称为 RSN (Robust Security Network).

WPA2 使用 AES (Advanced Encryption Standard) 块加密算法, WPA 和 WEP 是使用 RC4 流式加密算法.

Unlike 802.11a, b and g specifications, all of which define physical layer issues, 802.11i defines a security mechanism that operates between the Media Access Control (MAC) sublayer and the Network layer.

在802.11i制定的漫长过程中, WPA 作为一种过渡方案而出现.

参考:
http://www.windowsecurity.com/articles-tutorials/Wireless_Security/80211i-WPA-RSN-Wi-Fi-Security.html
https://en.wikipedia.org/wiki/IEEE_802.11i-2004
http://techbus.safaribooksonline.com/book/networking/wireless/0321136209/firstchapter

无线局域网知识列表

http://techbus.safaribooksonline.com/book/-/9781849517386
http://techbus.safaribooksonline.com/book/networking/security/9780071760942
确实如其书名说写: beginner's book

http://techbus.safaribooksonline.com/book/networking/wireless/9781785280856
http://techbus.safaribooksonline.com/book/networking/wireless/9781849515580
http://techbus.safaribooksonline.com/book/networking/security/9780071760942
http://techbus.safaribooksonline.com/book/networking/wireless/9781597491174

http://techbus.safaribooksonline.com/book/networking/intrusion-detection/9781782164067
这个完全不值得看

http://techbus.safaribooksonline.com/book/networking/intrusion-detection/9780124116443
http://etutorials.org/Networking/802.11+security.+wi-fi+protected+access+and+802.11i/
这个不错, 可惜是2003年出版的, 所以..

http://www.aircrack-ng.org/doku.php?id=links#technique_papers

SOCKS 协议转化为 HTTP, HTTPS 协议

SOCKS 代理协议是和 HTTP, HTTP, FTP 代理协议不同的代理协议,尽管你有了 SOCKS 代理服务器,你可以在 chrome 设置 SOCKS 代理服务器就可以上网,但是, 如果你在命令行, 或者其他 app 里面想使用代理, 却不能做到. 有没有一种方法可以让 SOCKS 协议转换成 HTTP, HTTPS 协议呢?

- 阅读剩余部分 -

[读书笔记] WPA/WPA2 介绍

WPA/WPA2 是由 WIFI 联盟制定的, 用来替换 WEP 安全协议的新协议, 它又有2个版本, 分别是WPA 和 WPA2.
WPA 在2003年发布, 2004年即被新版本 WPA2 替换 (802.11i标准中).
WPA 和 WPA2 都支持2种认证模式: WPA-Personal 和 WPA-Enterprise.

在 WPA-Personal 认证模式中, 认证通过一个preshared key (PSK) 认证码来实现, 无需认证服务器. PSK 是一个由8~63位可打印的ASCII码字符组成的字符串(所以不能是中文).
WPA-Enterprise 则需要一个认证服务器, 认证服务器通过RADIUS协议与访问点(AP)通信, 无线连接端通过Extensible Authentication Protocol (EAP) 协议认证.

4次握手包详解: http://www.aircrack-ng.org/doku.php?id=wpa_capture
一本极好的在线书: 802.11 security. wi-fi protected access and 802.11i
wiki: https://en.wikipedia.org/wiki/IEEE_802.11i-2004

[读书笔记] 无线局域网扫描

以无线连接端的角度去看,有2种无线访问点(AP)扫描(scanning)方式: Active & Passive
Active: 无线连接端主动广播发送探测请求包, 并且等待访问点(AP)的探测回应包, 并记录回应的访问点(AP). 这是用来探测周围无线访问点的标准方式. 但是, 无线访问点可以配置主动忽略这种探测请求包, 并且在信标包里面不标明自己的SSID, 即隐藏WIFI名字. 这种情况下, Active 扫描就无法探测到该无线访问点.
Passive: 不发送广播探测请求, 而是把无线适配器(无线网卡)改为监听模式, 于是就能嗅探到WIFI频谱范围内所有信道的数据. 通过对捕获数据的分析, 就能够知道有哪些访问点在发送数据, 他们的 SSID 是什么, 有什么无线连接端连在访问点上面. 这种方式下,即使隐藏的访问点也能被找到. 通常的无线扫描器都是用这种方式.

Aircrack-ng 套件包含很多工具, 常用的有:

  1. airmon-ng: 将网卡设定为监听模式
  2. airodump-ng: 数据包嗅探
  3. aireplay-ng: 数据包注入工具
  4. airdecap-ng: 通过已知密钥来解密WEP或WPA嗅探数据
  5. aircrack-ng: 破解WEP以及WPA(字典攻击)密钥

列出网卡: ifconfig -a 或者 iwconfig

改成监听模式 (wlan0 是我们要使用的无线网卡)
airmon-ng start wlan0 #监听所有channel
airmon-ng start wlan0 #监听特定 channel

执行以上命令的时候, 可能会有些警告信息, 说某些进程可能有干扰,一般情况下都没问题, 若是真有问题, 可以这样解决:
airmon-ng check kill

关闭监听模式:
airmon-ng stop mon0

监听并dump数据:
airodump-ng mon0
开启监听后, 会列出无线访问点和已经连接在上面的客户端, 其中访问点会显示这些数据:

  • The BSSID (MAC address)
  • The Power Level (PWR) and the Receive Quality (RXQ) of the signal
  • The number of beacons sent and the number of captured data packets
  • The channel (CH)
  • The maximum speed supported (MB)
  • The encryption algorithm (ENC), the cipher (CIPHER), and the
    authentication protocol (AUTH) used
  • The wireless network name or SSID (ESSID)

通过 -w 或 --write 参数, 可以将捕获的数据写到文件, 文件格式可以是: pcap, ivs, csv, gps, kismet, 或 netxml类型, 以用来被不同工具分析.