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.  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?

Absolutely.

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%
C:\Users\amwal\AppData\Local\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

Done!

I hope you find this article and its content helpful.  Comments are welcomed below.  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!, and all comments are welcome!

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