How can wpa_cli distinguish between WEP-Shared and WEP-Open?

1

If I setup an access point as WEP-Shared or WEP-Open it shows up as:

wpa_cli scan
Selected interface 'wlan0'
OK
wpa_cli scan_results
Selected interface 'wlan0'
bssid / frequency / signal level / flags / ssid
6c:e8:73:eb:59:f2       2462    -33     [WEP][ESS]      OpenWrt

Is there any way of distinguishing between the two via wpa_cli?

parsley72

Posted 2015-01-15T17:51:25.643

Reputation: 940

1I know this is completely unrelated to the question, but WEP has been known to be broken for a long time now and really shouldn't be used, you might at as well just leave the AP open with no encryption. – heavyd – 2015-01-15T18:07:41.000

Yes, but we still have customers who are using it. – parsley72 – 2015-01-15T18:09:43.380

1The last devices that could only support WEP were built c. 2003. Do you really have customers that have decade-old gear they can't upgrade? Or are they just using WEP for no good reason? Do them a favor and tell them to enable WPA2. – Spiff – 2015-01-15T18:23:58.383

Answers

2

The IEEE 802.11 standard does not provide a way to know ahead of time which of the two WEP authentication methods are available. A client would have to attempt an authentication using each method, and hope that the AP's implementation is good enough to return the right reason codes.

From my experience back in 1999-2002 when WEP was all we had, a lot of APs have crappy implementations of WEP authentication methods, and often send the wrong reason code (or fail to respond at all), so you really can't reliably differentiate between "bad key" and "algorithm not supported".

Although I don't have any personal experience with wpa_cli, I would be surprised if it has any mechanism to preflight which WEP algorithms are supported, since such a feature would be highly unreliable due to poor AP implementations, and would end up just frustrating everyone with incorrect or inconclusive results.

Spiff

Posted 2015-01-15T17:51:25.643

Reputation: 84 656

Actually the connection works fine for either - I just use "wpa_cli set_network 0 wep_key0 XXXXXXXX" for both. I just wanted to display the correct one to the user. – parsley72 – 2015-01-15T18:29:55.933