Networking/Computing Tips/Tricks

Rate this content:
5 of 5 - 4 votes
Thank you for rating this article.

If you have been to one of my Wireshark of 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 of 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%

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



2 months ago
Right IT Solutions You have explained the product in such good, understandable and easy-to-read ways. Thank you for your help.
Like Like Quote

Add comment


Did you learn something?
Did I save you time? 

Buy me a coffeeBuy me a coffee!

Find by Tag

5G Networks 6LoWLAN 6LoWPAN 802.11 802.11ah 802.11ax 802.11ay 802.11az ACL Addressing Analysis Ansible Architecture ARP Assessment AToM Backup Bandwidth BGP Bibliography Biography Briefings CBRS CellStream Cellular Central Office Cheat Sheet Chrome Cisco Clock Cloud Computer Consulting CPI Data Center Data Networking Decryption DHCPv4 DHCPv6 Display Filter DNS Documentation ECMP EIGRP Ethernet Flipping the Certification Model Follow Me Fragmentation Git GNS3 Google GQUIC Hands-On History Home Network HTTPS ICMP ICMPv6 IEEE 802.11p IEEE 802.15.4 In A Day Internet IOS Classic IoT IPv4 IPv6 L2 Switch L2VPN L3VPN LDP Learning Services Linux LLN Logging LoL M-BGP MAC MAC OSx Macro Microsoft mininet Monitoring Monitor Mode MPLS Multicast Name Resolution Netflow NetMon netsh Networking Network Science nmap Npcap nslookup Online Learning Online School OpenFlow OSPF OSPFv2 OSPFv3 OSX Parrot Passwords pcap pcap-ng PIM Ping Policy Port Mirror POTS POTS to Pipes PPP Profile Profiles Programming Project Management Python QoS QUIC Requirements RFC RIP Routing RPL RSVP SAS SDN Security Self Certification Service Provider Small Business Smartport SONET Span Port SSH SSL Subnetting T-Shark TCP TCP/IP Telco Telecom 101 Telecommunications Telnet Terminal TLS Tools Traceroute Traffic Analysis Traffic Engineering Training Travel Troubleshooting Tunnel Utility Video Virtualbox Virtualization Voice VoIP VXLAN Webex Wi-Fi Wi-Fi 4 Wi-Fi 5 Wi-Fi 6 Wi-Fi 6/6E Windows Wireless Wireless 5G Wireshark Wireshark Tip WLAN ZigBee Zoom

Twitter Feed