skip to content

What is the WPS PIN design flaw behind the 11,000-attempt figure, and why is switching PIN registration off the answer?

level: middleimportance: should knowfreq 30%

answer

  1. eight digits, fewer unknowns
  2. one digit is derived
  3. the PIN is confirmed in two halves
  4. far fewer than 10^8 candidates
  5. slowing guesses is not removing the flaw

basics

~20 s

A WPS PIN has eight digits, but the last is a checksum and the protocol confirms the PIN in two halves, so at most 11,000 attempts cover it. Lock-down only slows that; the answer is to switch WPS PIN registration off.

solid answer

~40 s

The WPS PIN is eight digits, and the eighth is always a checksum of the first seven, so only seven digits are unknown. The protocol also confirms the PIN in **two halves**, so the space is 10^4 + 10^3 = 11,000 attempts at most, not 10^8 (the 2011 analysis by Viehboeck). That is a **design flaw** in the PIN method, not one product's bug. CVE-2011-5053 records a related weakness in the external registrar method, which does not properly inform clients about failed PIN authentication. A **lock-down** period stretches the time but leaves the structure, and a 2014 presentation showed an offline variant where a weak random generator in an implementation undoes the protocol's protection. The operator's answer is to switch the PIN method off; hostapd's `wps_state` is 0 (disabled) by default.

go deeper

for a junior

Recall that WPS PIN is a known weak spot and that the safe answer is to turn the PIN method off.

for a middle

Explain the checksum digit and the two-halves confirmation behind 11,000 attempts, and that lock-down slows but does not fix it.

for a senior

Decide per site whether WPS exists at all, how to find it in an audit, and the compensating settings, such as a locked setup, where it cannot go yet.

for a principal

Set the estate rule that WPS PIN is off everywhere, name the exceptions process, and ask vendors for evidence about their random-number handling.

## What WPS PIN registration is Wi-Fi Protected Setup (WPS) lets a device be added to a WLAN with a short code, so that a user need not type a long passphrase. With the **PIN method**, a Registrar (the party that holds or issues the network credential) and an Enrollee (the device joining) prove that they know the same eight-digit PIN, after which the credential is handed over. The attraction is convenience; the cost is that a short PIN has to protect the whole network credential. ## The design flaw Two properties of the PIN design shrink the search space. The figures below are the published ones from the 2011 analysis of the protocol (Viehboeck) and are quoted with that source. 1. **The eighth digit is always a checksum** of digits one to seven, so only seven digits are unknown. 2. **The protocol confirms the PIN in two halves**, so a wrong first half is distinguishable from a wrong second half. The space is therefore 10^4 for the first half plus 10^3 for the second (the last digit is the checksum), at most **11,000 attempts**, against 10^8 for a PIN confirmed as a whole. This is a flaw of the **design**: any implementation that follows the specification inherits it. A check digit catches typing mistakes and adds no secrecy, which is why it shrinks the unknown part instead of strengthening it. **CVE-2011-5053** is the record for a related weakness: the external registrar method "does not properly inform clients about failed PIN authentication", making it easier to discover the PIN by reading EAP-NACK messages. ## Lock-down, and why it is not the fix The analysis's table lists a lock-down of one minute after three attempts as the requirement for WSC 2.0, and recommends that vendors use sufficiently long lock-down periods and that users deactivate WPS. It also found some firmware that stopped working after repeated failures instead of locking down, and it notes that an AP running for months can still be exposed. Lock-down changes how fast, not whether, the structure can be exercised. ## The offline variant is an implementation failure A 2014 conference presentation described a variant in which an Enrollee draws the secret nonces from a weak random generator. The protocol relies on those values being unpredictable, and a weak generator removes that property. The presentation also quotes about **23 bits of entropy** for a PIN printed on a sticker. The defender's conclusion: this is a flaw in particular implementations, an operator cannot verify the generator inside a device, and that is another reason to switch the PIN method off. ## What the operator does | Setting (hostapd's names) | Effect | |---|---| | `wps_state=0` | WPS disabled; hostapd's default | | `ap_setup_locked=1` | The AP is locked: new Registrars are not accepted, while previously authorised ones keep working | | `ap_pin` | A static AP PIN; hostapd.conf says it is not recommended if the device can display a random PIN | hostapd's ChangeLog (release 2.0) also records that the AP PIN is disabled after 10 consecutive failures in addition to an exponential lockout period. Treat these as mitigations; the clean answer is `wps_state=0`. ## How it is noticed - An audit or scan finding that WPS is enabled: the kind of misconfigured-device or weak-protocol finding that WLAN-specific vulnerability monitoring (NIST SP 800-153 section 3.1.2) is meant to surface. - The WPS attributes that hostapd builds into beacons and probe responses, including the *AP Setup Locked* attribute. - A device inventory that lists which APs and consumer routers still have WPS PIN on. ## Decision checklist 1. Is WPS PIN needed at all? Rarely, on a managed WLAN. 2. If it must stay for a period, is setup locked and is the AP PIN random and displayed? 3. Who verifies that firmware you cannot inspect draws its random values properly? Switching the method off avoids the question.

  • A vendor offers one minute of lock-down after three failed PIN tries; is that enough to leave WPS PIN on?
    No. The 2011 analysis lists that rule as the WSC 2.0 requirement and still recommends sufficiently long lock-down periods and, for users, deactivating WPS, noting that an AP can run for months. Lock-down slows exercising the structure and does not change it.
  • Is the offline variant a design flaw or an implementation flaw, and who must change?
    An implementation flaw: an Enrollee whose random generator is weak. The vendor must fix the firmware, and the operator cannot inspect it, so the practical control is to disable the PIN method. The 11,000-attempt structure is a design property that no firmware fix removes while the method stays as specified.
  • How would you find WPS PIN still enabled across an estate?
    Use the audit scan findings for misconfigured devices and weak protocols, look for the WPS attributes in beacons and probe responses, and check configuration where you control it, such as hostapd's wps_state. Consumer routers added by staff appear as rogue-AP findings first.

A check digit on a card number catches typing slips but is not secret, so it removes one unknown digit instead of adding strength: the PIN's last digit works the same way.

  • Thinks the WPS PIN is a random 8-digit secret with 100 million possibilities
  • Believes lock-down periods make a WPS PIN safe to leave enabled
  • Says a long WPA2 passphrase keeps the network safe while WPS PIN is on
  • Treats the PIN flaw as one vendor's bug instead of a protocol-design property
  • Assumes hostapd ships with WPS enabled by default