6 ms·
How to Find the Wi-Fi Password of Your Current Network
- fideloper 11y agoPasswords on Mac are saved and retrievable from the Keychain app.
- colinbartlett 11y agoI use this a lot. Often times in response to "Hey do you know the wifi password here?" at random coffee. I only wish there was a way to view this on iOS...
- sigjuice 11y agoIf you use iCloud Keychain, then all saved password information should also be available on your Mac.
- CardenB 11y agoYes but you can't look it up on your iOS device
- wingerlang 11y agoYou can jailbreak and use the "WiFi Passwords" app.
- droopyEyelids 11y agoIn case anyone is wondering, the method in the blog post requires elevating your permission, just the same as checking through keychain.app
- kylebgorman 11y agoDoesn't work on my vanilla Mac.
- ericabiz 11y agoIt is working for me. OS X Yosemite on a late 2013 Retina MBP. myuser@[~]$ security find-generic-password -ga MySSID | grep password password: "password" "desc"<blob>="AirPort network password" (Obviously I've changed the values here, but this is what it outputs for me.)
- nacs 11y agoAn easier way on Mac is to start the built-in Keychain app and search for your Wifi name there.
- Jun8 11y agoSame here, I get: oathkeeper:~ user$ security find-generic-password -ga labnol | grep password security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
- cgati 11y ago"labnol" should be replaced with the SSID you're connected to.
- Gys 11y agoThe SSID is case sensitive. Makes sense, but that was my mistake at first. To find your current SSID: /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -I | grep " SSID"
- heavymark 11y agoJust open keychain app on your mac (any version and you can get the password for any wifi network you have connected to). Requires your computers username/pass just like if you do the terminal way. This tip in the article is just showing how to do something that's always been possible via the gui, but via terminal makes it look/feel cooler doing it.
- rlongstaff 11y agoDon't suppose anyone has an equivalent for Linux?
- aselzer 11y agosudo cat /etc/netctl/wlp3s0-wlas (though it's the hashed key only, except if you'd used wifi-menu without -o to generate the file) depends on the type of linux :) EDIT: if it has to be the current network, something like this horrible bash oneliner: sudo vim /etc/netctl/$(ifconfig | grep UP | grep RUNNING | grep BROADCAST | cut -d: -f1)-$(iwconfig 2>/dev/null | grep ESSID | cut -d: -f2 | sed -e 's/"//g')
- tshadwell 11y agoDepends on what is controlling your WiFi, with netctl, most all the profiles have plain passwords in them, unless you configured otherwise. These profiles are located in /etc/netctl, so cat-ing the correct file under sudo will give you it. This will be a concat-d list of all profiles in a pager: `sudo cat /etc/netctl/* | less`.
- adynatos 11y agoif using wpa_supplicant, traditionally there was main config at /etc/wpa_supplicant.conf, where passwords to all networks could be held. file would be readable by root and the binary, obviously
- samuellb 11y agoIf you use NetworkManager, you can right click its icon, choose Edit Connections. Then select the desired network, and choose "WiFi Security" and then "Show password". Connection configuration, including plain text passwords, are stored in /etc/NetworkManager/system-connections/ for connections that are available to all users. They are readable by root only, obviously. Otherwise the password is stored in your keyring (e.g. Gnome Keyring under Gnome).
- AvImd 11y agoFor the lazy ones: sudo grep psk= /etc/NetworkManager/system-connections/*
- psuter 11y agoIf anyone knows how to do that reliably on Android (not CyanogenMod), I'm all ears.
- foodstances 11y agohttps://play.google.com/store/apps/details?id=com.ngothieuquang.passwifiviewer https://play.google.com/store/apps/details?id=com.ngothieuqu...
- everyone 11y agoYou can get this easily on Windows 7 anyway without any command line stuff. Right click on network connection / status / wireless properties
- akerl_ 11y agoI'm surprised the first step wasn't "Download a copy of Windows 10"
- SunboX 11y agoJust set up a PC as Wifi hotspot with the same name as the target network and grep the credentials from the devices that try to automatically connect to your PC. ;) PS: should work with any SSID and password auth
- semenko 11y agoNo, it shouldn't. WPA2's 4-way handshake allows client/supplicant & access point to prove they both know the PMK without directly disclosing it: https://en.wikipedia.org/wiki/IEEE_802.11i-2004#The_Four-Way_Handshake https://en.wikipedia.org/wiki/IEEE_802.11i-2004#The_Four-Way...
- SunboX 11y agoOh, ok. Didn't know about that, it's some time I tried it. Thanks for teaching me!
- duskwuff 11y agoI suspect you've never tried it. This technique didn't work with WEP either: open system WEP simply encrypts every packet with a key derived from the password, and shared key WEP has the client encrypt a challenge from the AP using that key and send it back. In neither case is the password ever sent over the network in any recoverable form.
- nly 11y agoThe AP doesn't prove any such thing to the client in PSK mode. If I scan your house, and write down your AP SSID and BSSID, I can later follow you to a coffee shop, spoof your home AP, get your device to connect, and then glean enough key derived material to go away and bruteforce your password. What you can't do, afaik, is the opposite (coax an AP to give up key derived material)... of course many APs have their own problems. By modern standards the authentication protocol used in WPA2-PSK is dire. You should use long random keys (something like 9oc46NLMbq7ujAEgXcQU), anything dictionary based puts you at real risk.
- h4waii 11y ago
- aaronbrager 11y agoA simple Mac command line approach is `security find-generic-password -wa {SSID}`. (Using -w instead of -g prints just the password, so no need to grep the output.)
- avbor 11y agoThe GUI way of doing this on Windows (if you're currently connected to said network) is to do the following: 1. Go to Network Connections. 2. Right click the WiFi connection and click status. 3. Click Wireless Properties 4. Click on the Security Tab, and then click Show Characters.
- Numberwang 11y agoWow, I can't believe that worked... This doesn't feel very secure at all.
- thaumasiotes 11y agoSecure? You're revealing a password that you already know.
- deleted 11y ago[deleted]
- dpcan 11y agoThis worries me at home. Say I have a party and the neighbor comes over. A few seconds on my unattended computer and they can use my Internet.
- thaumasiotes 11y agoWhere exactly do you think the insecurity is coming from here? Your guests could do anything at all with a few seconds on your computer. Learning the network password is the least of your worries.
- beagle3 11y agoThey could run a rootkit/keylogger/download contraband to your computer in the same time. A lot more to worry about than just learning your wifi password.
- keithpeter 11y ago
- mofle 11y agoYou can use this command-line tool to get the wifi password cross-platform: $ npm i -g wifi-password && wifi-password https://github.com/kevva/wifi-password#cli https://github.com/kevva/wifi-password#cli
- heavymark 11y agoOn a Mac you have always been able to do this easily by simple opening the Keychain app, double click on your network name, and after entering your computer's username and pass it reveals the wifi's password. You can do that for any wifi account you have previously connected to. Both this method and the terminal method require you to enter in the current users username and pass so no security issue here.