Expand description
Windows Wi-Fi (Wlansvc) WPA/WPA2 PSK decoder.
WLAN profiles live at
%PROGRAMDATA%\Microsoft\Wlansvc\Profiles\Interfaces\<GUID>\<GUID>.xml. A
protected profile stores the pre-shared key in <keyMaterial> as the
hex-encoded bytes of a DPAPI blob, protected by the SYSTEM (Wlansvc)
master key. Decrypting it yields the PSK as a UTF-8 string terminated with a
NUL.
This module owns the hex-decode + PSK extraction; the DPAPI decrypt reuses
crate::decrypt::decrypt_dpapi_blob (RustCrypto, no hand-rolled crypto). A
thin extract_key_material helper pulls the <keyMaterial> text out of the
profile XML so callers need no XML parser, but the PSK decode is the core and
takes the hex directly.
Functions§
- decrypt_
wlan_ key_ material - Decrypt a WLAN
<keyMaterial>hex string into the plaintext PSK. - extract_
key_ material - Extract the
<keyMaterial>hex text from a WLAN profile XML, if present.