How to Decrypt 802.11

2024-01-25 23:38
文章标签 802.11 decrypt

本文主要是介绍How to Decrypt 802.11,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

转自:How to Decrypt 802.11


Wireshark can decrypt WEP and WPA/WPA2 in pre-shared (or personal) mode. WPA/WPA2 enterprise mode decryption works also since Wireshark 2.0, with some limitations.

You can add decryption keys using Wireshark's 802.11 preferences or by using the wireless toolbar. Up to 64 keys are supported.

Adding Keys: 802.11 Preferences

Go to Edit->Preferences->IEEE 802.11. You should see a window that looks like this:

dot11-wep-wpa.png

Note that the key examples mention WPA, and that each key item is labeled "Key". If your preferences window doesn't mention WPA, like this

dot11-wep-only.png

then your version of Wireshark only supports WEP decryption. This might be the case with older versions of Wireshark, particularly the 64-bit Windows version.

In all versions WEP keys can be specified as a string of hexadecimal numbers, with or without colons:

    a1:b2:c3:d4:e5

    0102030405060708090a0b0c0d

In versions that support WPA decryption you should use a prefix to tell Wireshark what kind of key you're using:

  • wep The key is parsed as a WEP key.

    wep:a1:b2:c3:d4:e5
  • wpa-pwd The password and SSID are used to create a raw pre-shared key.

    wpa-pwd:MyPassword:MySSID
  • wpa-psk The key is parsed as a raw pre-shared key.

    wpa-psk:0102030405060708091011...6061626364

Adding Keys: Wireless Toolbar

If you are using the Windows version of Wireshark and you have an AirPcap adapter you can add decryption keys using the wireless toolbar. If the toolbar isn't visible, you can show it by selecting View->Wireless Toolbar. Click on the Decryption Keys... button on the toolbar:

dot11-wireless-toolbar.png

This will open the decryption key managment window. As shown in the window you can select between three decryption modes: None, Wireshark, and Driver:

dot11-key-management.png

Selecting None disables decryption. Selecting Wireshark uses Wireshark's built-in decryption features. Driver will pass the keys on to the AirPcap adapter so that 802.11 traffic is decrypted before it's passed on to Wireshark. Driver mode only supports WEP keys.

Gotchas

Along with decryption keys there are other preference settings that affect decryption.

  • Make sure Enable decryption is selected.

  • You may have to toggle Assume Packets Have FCS and Ignore the Protection bit depending on how your 802.11 driver delivers frames.

The WPA passphrase and SSID preferences let you encode non-printable or otherwise troublesome characters using URI-style percent escapes, e.g. %20 for a space. As a result you have to escape the percent characters themselves using %25.

WPA and WPA2 use keys derived from an EAPOL handshake, which occurs when a machine joins a Wi-Fi network, to encrypt traffic. Unless all four handshake packets are present for the session you're trying to decrypt, Wireshark won't be able to decrypt the traffic. You can use the display filter eapol to locate EAPOL packets in your capture.

In order to capture the handshake for a machine, you will need to force the machine to (re-)join the network while the capture is in progress. One way to do this is to put the machine to sleep (for smartphones and tablets, "turning off" the machine puts it to sleep) before you start the capture, start the capture, and then wake the machine up. You will need to do this for all machines whose traffic you want to see.

WPA and WPA2 use individual keys for each device. Older versions of Wireshark may only be able to use the most recently calculated session key to decrypt all packets. Therefore, when several devices have attached to the network while the trace was running, the packet overview shows all packets decoded, but in the detailed packet view, only packets of the last device that activated ciphering are properly deciphered. Newer Wireshark versions are able to handle up to 256 associations and should be able to decode any packets all the time. Nevertheless decoding can still fail if there are too many associations. Filtering out only the relevant packets (e.g. with "wlan.addr") and saving into a new file should get decryption working in all cases. Wireshark only frees used associations when editing keys or when it's closed. So you may try that when decoding fails for unknown reasons. This also allows you to decode files without any eapol packets in it, as long as Wireshark did see the eapol packets for this communication in another capture after the last start and key edit. If decoding suddenly stops working make sure the needed eapol packetes are still in it.

Wildcard SSIDs

The "password" key preference has the form wpa-pwd:password:ssid. You can optionally omit the SSID, and Wireshark will try to decrypt packets using the last-seen SSID. This may not work on busy networks, since the last-seen SSID may not be correct. For the key "Induction" and SSID "Coherer", the following key preferences are equivalent:

    wpa-pwd:Induction
    wpa-pwd:Induction:Coherer

WPA/WPA2 Enterprise/Rekeys

As long as you can somehow extract the PMK from either the client or the Radius Server and configure the key (as PSK) all supported Wireshark versions will decode the traffic just fine up to the first eapol rekey.

Eapol rekey is often enabled for WPA/WPA2 enterprise and will change the used encryption key similar to the procedure for the initial connect, but it can also be configured and used for pre-shared (personal) mode. Wireshark 2.0 (v1.99.6rc0-454-g1439eb6 or newer) is needed if you want decode packets after a rekey.

Examples

The file SampleCaptures/wpa-Induction.pcap has WPA traffic encrypted using the password "Induction" and SSID "Coherer".

The file SampleCaptures/wpa-eap-tls.pcap.gz has a EAP-TLS handshake and rekeys included. The PMK's you can use as PSK's to decode it are: a5001e18e0b3f792278825bc3abff72d7021d7c157b600470ef730e2490835d4 79258f6ceeecedd3482b92deaabdb675f09bcb4003ef5074f5ddb10a94ebe00a 23a9ee58c7810546ae3e7509fda9f97435778d689e53a54891c56d02f18ca162

CategoryHowTo

这篇关于How to Decrypt 802.11的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/645000

相关文章

802.11报文类型在wireshark的过滤条件

– Common Filters for wireshark sniffer: #地址过滤 wlan.addr == wlan.sa eq 00:09:5b:e8:c4:03 and wlan.bssid ne ff:ff:ff:ff:ff:ff wlan.bssid eq 00:11:92:6e:cf:00 wlan.sa eq 00:09:5b:e8:c4:03 #802.11报文类型过滤

java.lang.IllegalArgumentException: Failed to decrypt问题解决

接盘一个老项目,修改完各种配置之后启动,提示此错误,翻译了一下说解密失败。 搜了一下原因是数据库连接配置设置了加密。 应该会有一个地方设置了config.decrypt=true 很多配置文件懒得找就全局搜索了一下,找到地方了 直接true变false,再次启动不飘红了,问题解决。 具体为什么要配置这个我也不太清楚,以后用得到再更吧

802.11ax(Wi-Fi 6)技术如何测试?

1. 802.11ax关键技术简介 802.11ax协议(也称Wi-Fi 6,Wi-Fi 5指802.11ac)是为了满足高密度场景下用户速率和体验需求而提出的。类似于3GPP 5G NR中的eMBB应用场景,其目的是提升高密集场景的用户速率,从而获得更好的用户峰值数据体验。2013年3月TG(Task Group)工作组成立,2014年开始研究802.11ax标准,2016年提出802.11a

802.11中的各种帧

在无线网络中,802.11协议定义了三种类型的帧:管理帧(Management Frames)、控制帧(Control Frames)和数据帧(Data Frames)。每种类型的帧都有其特定的功能,帮助维护和管理无线网络。下面是管理帧和控制帧的详细介绍: 管理帧(Management Frames) 管理帧用于建立和维护无线网络中的连接。它们帮助设备发现网络、加入或离开网络,并保持连接的状态

OFDM 802.11a的FPGA实现(二十一)发射主控模块MCU(含代码)

目录 1.前言 2.主控逻辑 3.Matlab 4.verilog 5.ModelSim 6.ModelSim仿真结构与Matlab自动化对比 完整工程链接(含verilog和Matlab代码): https://mp.weixin.qq.com/mp/appmsgalbum?__biz=MzkxNjM0NDk2Nw==&action=getalbum&album_id=340

IEEE 802.11标准

在IEEE 802.11标准中使用了扩频通信技术,主要作用是使得抗干扰性更强。 IEEE 802.11在MAC层采用了CSMA/CA协议。 IEEE 802.1x是一种基于端口认证协议。

802.11g组帧方式以及物理层收发过程简介

文章来源http://blog.csdn.net/CTO_51/article/details/8426771 从网络逻辑结构上来看,802.11g只定义了物理层及介质访问控制(MAC)子层。MAC层提供对共享无线介质的竞争使用和无竞争使用,具有无线介质访问、网络连接、数据验证和保密等功能。         物理层为数据链路层提供物理连接,实现比特流的透明传输,所传数据单位为比特

802.11之WEP

1、相关背景     WEP是一种可选的链路层安全机制,用来提供访问控制、数据加密和安全性检验等。其使用了RC4加密算法进行加解密,CRC进行校验。但随着技术的进步,WEP协议的缺陷逐渐暴露,出现了多种针对该协议的分析方法,FMS是重要的攻击方法之一。     起初,WEP标准被视为无线安全的解决方案。不过在802.11问世的前4年(1997年问世),研究人员发现WEP并不安全。但因为有时某

802.11 MAC层帧解析

注1:本文STA为station简称,AP为access piont简称。     注2:本文属于个人理解,存在错误望见谅和指正。 1.MAC帧格式 对应的数据结构如下: typedef struct _rtw_ieee80211_hdr_qos { __le16 frame_ctl; __le16 duration_id; u8 addr1[ETH_ALEN]; u

802.11无线网络权威——(二十、使用802.11接入点)

接入点是扮演无线与有线世界之间的桥梁。接入点至少具备两个网络接口: 1、其中无线接口通晓802.11相关细节。 2、另一个接口连接至有线网络。 所有无线接口都必须支持802.11信道访问的基本规则。 词汇: DHCP、网络地址转换(Network Address translation,NAT)、用户身份验证、Wi-Fi保护访问(Wi-Fi Protected Acces