Find and Display All Your Wi-Fi Passwords in Windows

If you have been to one of my Wireshark or Wi-Fi classes then you know I often criticize Microsoft Windows for some of its – well – inexplicable approaches to usage and security.  Here is yet another example.

Windows stores several important pieces of information in Wi-Fi profiles to facilitate automatic connections to known networks and manage network preferences. Each Wi-Fi profile contains:

  1. SSID (Service Set Identifier): The name of the Wi-Fi network, which helps Windows identify and connect to the correct network.
  2. Security Type: Specifies the security protocol used by the network, such as WEP, WPA, WPA2, or WPA3. This determines how your device authenticates to the network and ensures secure communication.
  3. Encryption Type: Alongside the security type, the encryption type (like TKIP or AES) is also stored, detailing how data is encrypted over the network for protection against eavesdropping.
  4. Network Security Key: If the network is secured (which most are), the profile includes the network security key or password. This key is encrypted and stored securely by Windows to automate connections.
  5. Connection Mode: Indicates whether the connection to the network is automatic (the device connects whenever the network is in range) or manual (requires user intervention to connect).
  6. AutoConnect: A setting that determines if Windows should automatically connect to this network when it’s in range, provided the network profile indicates it’s safe to do so.
  7. Profile Name: A unique identifier for the profile, typically the same as the SSID, but it can be customized in certain scenarios, such as when managing profiles via command line or scripts.
  8. Network Type: Specifies whether the network is for public or private use. This setting can affect firewall rules and sharing settings on your device.
  9. MAC Randomization Setting: Some profiles may contain information on whether MAC address randomization is used. This feature enhances privacy by using a random MAC address for each connection to a network.

By storing this information in profiles, Windows can manage wireless network connections efficiently, ensuring that the user can automatically reconnect to familiar networks without needing to enter the configuration details each time. This system simplifies the management of wireless networks, although it’s essential to manage these profiles and ensure they are up-to-date and secure.

Let’s say someone has a Rubber Ducky, or some Arduino device, that they want to plug into your system and get your Wi-Fi passwords.

Can they do it?


Let me show you how to do this manually from your Command prompt.

Let’s start by being logged into your Windows computer/laptop. You must be logged in. You do not need administrator privileges.

Open a command prompt Window (Windows-R > cmd  or Start> Run> cmd)

Change to the temporary directory for your user:

cd %temp%

This should look something like the following:

C:\Users\amwal>cd %temp%

Now lets export the Wi-Fi profiles with the wi-fi passwords:

netsh wlan export profile key=clear

This command will write an xml file for every profile on the machine. Truthfully this could take a while, especially if there are dozens of Wi-Fi profiles on the system.

Here you can see my system exported 7 profiles:

2022 07 07 07 25 41

There may be a bunch of different files in this directory, but if we enter the following command, we should see the xml files:

dir *.xml

2022 07 07 07 32 09

As you can see there is one .xml file for every Wi-Fi profile on my system.

If you open one of these files in notepad or Wordpad or Notepad++ (I used Notepadd++ so I get the colorization), it will look something like this:

2022 07 07 07 37 53

We can see that the WPA2 passphrase is right there in clear text!

Now some systems have no password, like this one:

2022 07 07 07 36 33

We can perform one more clever step to put all the passwords from these .xml files into one file:

powershell Select-String -Path Wi-Fi*.xml -Pattern 'keyMaterial' > Wi-Fi-Passwords

This will add a file called Wi-Fi-Passwords to the directory:

2022 07 07 07 44 59

OK, not let’s look at that file in Notepad or Wordpad or Notepad++:

2022 07 07 07 47 34

Now I have blurred the passwords on the screenshot above (except the one I revealed for some La Quinta Inn), but you will see on your machine, we have a nice little list of the Systems and their passwords!!

You could now copy this file onto a thumb drive or send it to a web capture portal or who knows what!!

Alright, let’s get rid of this stuff and clean up.

  1. Close any test editors and files you have open.
  2. In the command prompt, delete the Wi-Fi*.* files:
  3. 2022 07 07 07 54 11


I hope you find this article and its content helpful.

If you would like to see more articles like this, please support us by clicking the patron link where you will receive free bonus access to courses and more, or simply buying us a cup of coffee!

Leave a Comment

Contact Us Here

Please verify.
Validation complete :)
Validation failed :(
Your contact request has been received. We usually respond within an hour, but please be patient. We will get back to you very soon.
Scroll to Top