← Privacy & toolsyour pc // knows every wifi password

your pc // knows every wifi password

$netsh wlan show profile name="HomeNet" key=clear | findstr Key
no download link on purpose. this reveals wi-fi passwords already saved on your own machine. handy for recovery, and a reminder that anyone with your unlocked laptop can read them too.

your laptop is basically a diary of every wifi you've ever joined

every network you've connected to, home, coffee shop, your cousin's house during thanksgiving, is sitting in your computer's memory right now. and the password for each one isn't hashed or scrambled, it's stored in a way that windows and mac can hand right back to you in plaintext with one command. that's convenient when you forgot your own router password. it's a problem if that laptop ends up in the wrong hands.

the windows command, broken down

netsh wlan show profile name="YourWiFi" key=clear

netsh is windows' built in tool for managing network settings. wlan tells it you want wireless stuff specifically. show profile pulls up the saved settings for a network you've connected to before, swap "YourWiFi" for the actual network name. key=clear is the part that matters, it tells windows to stop hiding the password and just show it in plain text under "key content."

if you want to see every network your machine remembers before picking one, run this first:

netsh wlan show profiles

the mac command, broken down

security find-generic-password -ga "YourWiFi"

security is the command line tool that talks to mac's keychain, which is where every saved password on the system lives, wifi included. find-generic-password searches the keychain for a match. -g tells it to display the password itself instead of just metadata. -a specifies you're searching by account/network name. you'll get prompted for your mac login password before it hands over the wifi key, since keychain gates it behind that.

why this matters more than it sounds like

this isn't some hidden exploit, it's a documented feature in both operating systems. the point of a blog post about it isn't "look what you can do to someone else's laptop," it's "understand what your own laptop is holding onto." if your device gets stolen, lost, borrowed by a repair shop, or accessed by anyone with an unlocked login screen, every wifi password you've ever saved is one terminal command away from being read. that includes your home network, your workplace, and possibly networks tied to people you visited once and never thought about again.

the risk isn't abstract. someone with brief physical access to an unlocked machine doesn't need to guess your wifi password, they can just ask windows or mac to print it out.

how to actually check and clean up your own exposure

run the "show profiles" command above on your own windows machine and see how many networks are sitting there. on mac, open keychain access, search "airport" or the network name, and see what's stored. for anything you no longer use, old apartments, hotels, a friend's house, remove the saved profile:

netsh wlan delete profile name="OldNetworkName"

on mac, find the entry in keychain access and delete it directly. this shrinks the list of networks your device would happily hand over if someone ran these commands on it.

lock the door these commands walk through

the actual fix isn't hiding the commands, it's making sure nobody can run them on your machine without your permission. set a real login password, not a four digit pin you use everywhere else. turn on full disk encryption, bitlocker on windows, filevault on mac, so even if someone pulls the drive they're not reading anything. set your screen to lock automatically after a short idle period. and if you're handing off an old laptop, wipe it properly instead of trusting a factory reset alone to clear saved credentials.

the takeaway

your computer remembering your wifi passwords is a convenience feature, not a vulnerability by itself. the vulnerability shows up when that convenience is paired with an unlocked, unencrypted machine anyone can sit down at. run these commands on your own device, see what's stored, clean out what you don't need, and make sure the login screen is actually doing its job. that's the whole defense.

watch the reel ↗
the weekly drop

one command a week that makes you harder to hack.

a single tool, explained in plain english, every week. straight to your inbox.

no spam. one email a week. unsubscribe anytime.