I'm starting a research project related to WiFi, which requires me to analyze the exchange of frames in between a WiFi client and AP during connection setup.
Experimental setup: I have a laptop M, capturing WiFi traffic with Wireshark on monitor mode, a device A (running Linux) connecting to a WiFi network via 802.1x authentication, specifically using the EAP-PEAP protocol.
I only control the laptop M and device A, but not the APs nor the network (which includes the RADIUS servers).
Objective: I'd like to decode the WiFi data frames captured by Wireshark on laptop M. According to this Wireshark how to, I would need to somehow extract the PMK (Pairwise Master Key) exchanged between the network and device A.
Since I only control device A, I would need to extract the PMK from it.
Problem: I don't know how to extract that PMK from device A (assuming a Linux operating system), specially considering we're talking about a EAP-PEAP session, and I haven't been able to find any conclusive hints while searching on the Web.
I could find this discussion, which implies the PMK is stored directly at the WiFi NIC or the driver.
Questions:
- Is it even possible to extract the PMKs, e.g. in a Linux system, without a major modification on the client system (e.g. modifying the code of the wireless drivers, etc.)? I would imagine that to be very hard, given how serious such a 'security breach' would be.
- Are the PMKs stored in some way (e.g. in Linux)? Following from the above, I would not expect that to be the case.
- What code would I need to modify (let's assume a Linux operating system) to extract the PMKs?
P.S.: I'd like to note that I don't consider this to be a 'hacking' question (and thus not at odds with the policies of stackoverflow.com), since I control the client device (not only the monitoring device).