Jan 28, 2017 07:03 AM
(This post was last modified: Feb 1, 2017 04:41 PM by ra1d.)
How to extract passwords from WiFi's you've connected to on Windows
Open up CMD or Windows PowerShell with Administration permissions.
#step1
We want to list the wireless networks that the computer has connected to.
We can do that by going into netsh, type netsh in the terminal.
Then type the following
#step2
Now we want to export the profile that we are interested in.
NOTE: If the WiFi name contains spaces then make sure to write the profile name in quotation marks.
Now you when you've exported the profile you will see that the password is encrypted if you open it in a text editor.
Let's fix this by adding key=clear to the end of that command.
So it will look like this:
#step3
Use the following command to import the profile on new computers.
#step4
You've now acquired the password to your WiFi, it will be located inside the .xml file that is exported.
It can be found under <keyMaterial>passwordHere</keyMaterial>
Save your wireless network profiles and setup your new computer in no time with a quick Batch script, or whatever you decide to write a script in.
Very useful for IT technicians, operations, etc...
Simple but very neat to have.
Also it doesn't work for all WiFi's, some have different authentication methods.
Open up CMD or Windows PowerShell with Administration permissions.
#step1
We want to list the wireless networks that the computer has connected to.
We can do that by going into netsh, type netsh in the terminal.
Then type the following
Code
wlan show profiles#step2
Now we want to export the profile that we are interested in.
NOTE: If the WiFi name contains spaces then make sure to write the profile name in quotation marks.
Code
wlan export profile %ProfileName% folder=c:\sampleDirectoryNow you when you've exported the profile you will see that the password is encrypted if you open it in a text editor.
Let's fix this by adding key=clear to the end of that command.
So it will look like this:
Code
wlan export profile %ProfileName% folder=c:\sampleDirectory key=clear#step3
Use the following command to import the profile on new computers.
Code
wlan add profile filename="%PathAndFileName%" user=all#step4
You've now acquired the password to your WiFi, it will be located inside the .xml file that is exported.
It can be found under <keyMaterial>passwordHere</keyMaterial>
Save your wireless network profiles and setup your new computer in no time with a quick Batch script, or whatever you decide to write a script in.
Very useful for IT technicians, operations, etc...
Simple but very neat to have.
Also it doesn't work for all WiFi's, some have different authentication methods.



![[Image: wFo440p.png]](https://i.imgur.com/wFo440p.png)

![[Image: QkRQvjn.png]](https://i.imgur.com/QkRQvjn.png)