On a WEP SSID, why does enabling 802.11 shared-key authentication weaken the network compared with open-system authentication?
answer
- two authentication algorithms
- challenge sent in the clear
- same challenge, encrypted
- a known plaintext and ciphertext pair
- authenticates the device, not the user
basics
~20 sShared-key authentication sends a challenge in the clear and receives it back encrypted under the WEP key, so an observer holds a matching plaintext and ciphertext pair for that IV. It adds no access control beyond the key and leaks keystream.
solid answer
~40 s802.11 defines two authentication algorithms: open system (value 0) and shared key (value 1). In shared-key authentication the access point sends a challenge text in the clear, the station returns it encrypted with the WEP key, and the access point checks the result. Anyone who saw both messages holds a plaintext and ciphertext pair for that IV, which exposes keystream. It also proves only that a device holds the key, not who the user is. NIST SP 800-97 notes open system is mandatory, shared key optional, and that some organisations prefer open system because shared key gives eavesdroppers so much about the WEP key. In hostapd, `auth_algs` is a bit field where bit 1 enables shared key and the sample file sets `auth_algs=3`, so a copied sample enables both.
code
ini · 7 lines# hostapd.conf fragment (hostapd's setting names)
ssid=legacy-example
# bit 0 = Open System Authentication
# bit 1 = Shared Key Authentication (requires WEP)
auth_algs=3
wep_default_key=0
wep_key0="example-key-1"go deeper
Know that WEP networks can offer open-system or shared-key authentication, and that shared key is the one to turn off.
Describe the cleartext challenge and its encrypted reply, and why that pair exposes keystream and still does not identify a user.
Read auth_algs in a configuration, state the compatibility cost of clearing bit 1, and treat it as containment while WEP is retired.
Use it as an example of a feature that adds a check and subtracts security, and require evidence that any added mechanism is not a new leak.
## Two algorithms, and what each one does The original 802.11 standard defines two authentication algorithms for joining a network; the algorithm numbers appear in the Linux header as `WLAN_AUTH_OPEN` (0) and `WLAN_AUTH_SHARED_KEY` (1). NIST SP 800-97 section 3.2.1 describes them: - **Open system** is "effectively a null authentication mechanism". A station is authenticated simply by asking. Implementations must support it. On a WEP network the access control still comes from the key, because data frames are encrypted with it, so a device without the key may associate but cannot exchange usable data. - **Shared key** is optional to implement. It is a challenge-response exchange that proves knowledge of the WEP key. Where the open-system step sits in the join sequence is covered with scanning and association; this question is about what shared key adds. ## The exchange and what it puts on the air 1. The access point sends a **challenge text** in the clear. 2. The station encrypts it with the WEP key, so with RC4 under an IV, and sends it back. 3. The access point decrypts, compares, and admits the station if the text matches. The challenge text appears twice: once as plaintext and once as ciphertext. NIST SP 800-97 states the consequence: an observer who captures both holds a pair from which the key stream for that exchange can be determined, and the guide says shared-key authentication "provides so much information to eavesdroppers about the WEP key that it jeopardizes the confidentiality and integrity" WEP is meant to provide. The standard is the source of the exchange; the exact message formats are not repeated here, and nothing further is needed to see why it is a finding. ## What shared key does not give you - **No user identity.** It authenticates a device that holds the key, not a person; anyone who gets the key from one device can use it on another (NIST SP 800-97). - **No accountability.** All devices hold the same key or a small set of keys, so a compromise cannot be traced to a device. - **No gain over the key.** Open system with WEP already requires the key to exchange data, so the extra exchange adds exposure without adding control. ## The configuration view hostapd.conf describes `auth_algs` as a bit field: ```ini # hostapd.conf fragment (hostapd's setting names) ssid=legacy-example # bit 0 = Open System Authentication # bit 1 = Shared Key Authentication (requires WEP) auth_algs=3 wep_default_key=0 wep_key0="example-key-1" ``` Here `auth_algs=3` turns on both bits, and the 13-character `wep_key0` makes a WEP-104 key. hostapd's sample file ships with `auth_algs=3`, so a configuration copied from it offers both algorithms. hostapd.conf also says open system authentication should be used with IEEE 802.1X, and its multi-BSS examples with WPA2 and SAE set `auth_algs=1`. ## What an auditor does with it - **Finding:** shared-key authentication enabled, evidenced by `auth_algs` including bit 1 on the access point, or the authentication algorithm seen in a monitoring system's report. - **Remedy:** clear bit 1 (`auth_algs=1`), then retire WEP itself. The compatibility cost is small, because open system is mandatory in implementations, but a device configured for shared key only will fail to authenticate, so test the device class first. - **Residual risk:** turning shared key off removes one leak and leaves WEP's other flaws, so it is a containment step on the way to retirement, not a fix. ## How it is noticed The exchange leaves no error in a log: it succeeds as designed. Shared-key authentication is found by reading the access point's configuration (`auth_algs` including bit 1 in hostapd) or in a wireless IDPS or scanner report that lists the authentication algorithm and the WEP security type of an SSID. A monitoring system can report that the setting is enabled; it cannot tell from the exchange alone whether anyone has made use of what it exposes. ## Common slips - "Challenge-response is stronger than open system": here it is weaker, because the response is made with the same key whose stream is being exposed. - "Open system means anyone can use the network": on WEP the data is encrypted under the key either way. - Reading `auth_algs=3` as a request for "algorithm 3": it is two bits set, and algorithm number 3 in the standard is SAE, an unrelated mechanism.
- If shared-key authentication is off, can a device without the WEP key still use the SSID?It can complete open-system authentication, but WEP encrypts data frames under the key, so without it the device cannot send frames the access point accepts or read the traffic. On WEP the key, not the authentication algorithm, is what gates data. That is why shared key adds exposure without adding control.
- Which authentication algorithm does hostapd.conf say to use with IEEE 802.1X?Open system. The comment on `auth_algs` says open system authentication should be used with IEEE 802.1X, because the credential check happens in the EAP exchange and the key material comes from it. Shared key needs WEP, which is the reason a WPA2 or later SSID should not offer it.
- Why does it matter for an audit that shared key is optional in the standard?Implementations must support open system, so disabling shared key does not break interoperability with a conforming device. The residual risk is a legacy client set to shared key only, which should be identified first. This is a cheap, low-risk change that closes one leak while WEP is still in service.
- Shared-key authentication is the secure mode because it proves knowledge of the key.
- With open-system authentication a WEP network accepts anyone's traffic.
- A challenge-response exchange cannot leak anything about the key.
- Shared-key authentication identifies the user.
- `auth_algs=3` means authentication algorithm number 3.