5 ms·
> When using this tool, it is good practice to hash the password for the wireless network before storing it in the configuration file (encrypt it in a way that
by AshamedCaptain 4y ago
> When using this tool, it is good practice to hash the password for the wireless network before storing it in the configuration file (encrypt it in a way that cannot be reversed). This can be done with one simple command (wpa_passphrase),
Huh? Anyone who has that hash can still connect to your Wi-Fi network, which kind of defeats what is being claimed. At that point you can also bruteforce the plaintext password (offline, at your leisure), or worse...
- Dragon863 4y agoSorry about that! I misunderstood how hashing works, and I've updated the page with a correction at the bottom
- deleted 4y ago[deleted]
- badkitty99 4y agoBut don't you need the preimage of the hash to generate it in authentication?
- overthrow 4y agoOn Linux you can auth using the hash instead of the password. Other OSs probably have something similar. https://unix.stackexchange.com/questions/40/use-wpa-supplicant-without-plain-text-passwords https://unix.stackexchange.com/questions/40/use-wpa-supplica...
- lxgr 4y agoYes, but I suppose GPs question was "is that enough to authenticate?" – and given that as you say Linux and iOS/macOS (for Wi-Fi "password" sharing with nearby devices) do support that, and my other comment, the answer is "yes".
- lxgr 4y agoNot for WPA-PSK. The PSK is used to derive the PMK from (simplified) something like PMK = Hash(PSK, SSID). This key is static and never changes for the lifetime of a particular SSID, and is also shared across all devices in WPA-PSK. From the PMK, all other per-connection keys are then derived at association time, but everybody that captures that conversation can derive all further keys since that exchange uses only symmetric functions with all secret inputs derived from the PMK, not something like Diffie-Hellman. It's unfortunately not easy to do anything more resistant against compromised clients without storage on the APs (or at least a stable encryption key available to all access points of an SSID), so WPA-PSK doesn't – for anything more robust than that, you need WPA-EAP. (Some networks support a per-station/MAC address PSK as a proprietary feature, but that's only possible because they do have some management plane that allows the APs to share the required state.)
- deleted 4y ago[deleted]
- _Nat_ 4y agoIt wouldn't matter if the preimage of the hash were needed for authentication. Because, if a device has all of the information needed to connect to a network on it, then.. well, it has all of the information needed to connect to a network on it. Could be passwords, hashes, or whatever -- doesn't really matter.
- lxgr 4y agoExactly, and you can also derive all other devices' pairwise session keys from the password hash as well, i.e. intercept their traffic. The only thing you can't get from the hash (without reversing it) is the password itself, so if you use the same high-entropy one for a different SSID or non-WPA-PSK purpose (but why would you?), it helps a bit in that specific scenario. Apple has annoyingly decided to share the password hash using the "share Wi-Fi password with nearby devices" at least in some versions, which makes it impossible to actually manually copy-paste over a password received in such a way. I consider that pretty poor security-by-obscurity as well. If you need your network to be resilient against such attacks, you need WPA-EAP ("enterprise"). PSK was never designed for that threat model. That said, it's a shame WPA-EAP is as complicated to set up and poorly supported by most routers as it is.
- est31 4y ago> you can also derive all other devices' pairwise session keys from the password hash as well, i.e. intercept their traffic. Note that deriving keys in a passive fashion only works with WPA2. With WPA3 SAE you must do an active Man in the Middle attack, which means also that you need to possess the key at the time of the handshake. With WPA2 you can decrypt any historic traffic you have recorded.
- lostlogin 4y ago> share Wi-Fi password with nearby devices You dislike this feature? It’s pretty amazing compared to explaining which letters are uppercase and what an ‘&’ is called.
- johnwalkr 4y agoApple password sharing is definitely annoying. I mainly use Apple stuff including iCloud for password management. Surprisingly, it even works well enough on chrome for windows. It doesn’t work for the 10 game launchers I’m forced to use, but it’s not a huge inconvenience, I can just grab those from my iPhone. But I cannot grab wifi passwords from my iPhone, that can only done in keychain in MacOS.
- lxgr 4y ago
- geokon 4y agoI always thought this aspect of Wifi password security was a weird annoyance. It just makes thing inconvenient without providing any real security - and it's leaked into Android and taken to new extremes. For instance you can get and share Wifi with goofy QR codes - but syncing the whole wifi password list between devices? Impossible without rooting your device They then up the goofyness in that it doesn't provide any mechanism in the UI to actually see the password, but you can screenshot the "share QR" code, read the QR in an app, and finally extract the password phrase that way (at least in all the Android versions I've tried). I have to do this dance regularly b/c scanning a QR code from a laptop is a pain Loosing all my wifi passwords when I get a new phone always kinda sucks...
- lxgr 4y agoCouldn't have said it better. Apple used to play that security-by-obscurity game too in their implementation of password sharing with nearby devices, and by not allowing users to view passwords in the Wi-Fi settings (even passwords they hand-entered themselves, as if they can't also make a copy of that in a much less secure place at that point). Fortunately, they've come around in the newer iOS versions. But which Android feature are you referring to? On my Pixel, I can share the PSK as a QR code – not just the hash as far as I can tell.
- bombolo 4y agoHe wants to share it as a string, since humans aren't too well versed into reading qr codes.