Windows wireless security vulnerabilities – Displaying all saved SSID passwords.

This post is nothing breaking security news, but that does not make it any less frightening for administrators that still use SSID with static passwords to login to their corporate networks. There are no fixes available to prevent displaying your SSID passwords in clear text, but there are methods that administrators can implement to prevent using this old failed method.
Let’s just take a look first at a simple reliable old friend of Windows netsh. Netsh is a swish army knife that many Windows administrators fail to learn or use for anything but the fix that maybe is provided by search for “having trouble with network card.” Netsh has been around forever and still can do most jobs required when it comes to network on the client side and even maybe the server side.
What can you do? Use a method to authenticate users each time they connect, e.g., Radius. Setup a guest network.
My one-liner is a simple for loop in a batch script. I know my website focuses a lot on how great Powershell is, but Powershell does still have a lot of overhead. As a challenge, let’s see if we can still do it with cmd and netsh first!
Here’s the command I hastily put together that can be executed from the run command, it writes all your SSIDs to c:\temp\wireless.txt that will also include a little bit of garbage at the top:

cmd /c for /F “tokens=1,2 delims=:” %a in (‘netsh wlan show profile’) do netsh wlan show profile name=%b key=clear >> c:\temp\wireless.txt