Pixiwps: Exploiting Weak WPS Implementations with the Pixie Dust Attack

pixiwps: A tool for exploiting weak WPS pins on routers using Pixie Dust attack

The first time I successfully ran a Pixie Dust attack against a test router with a vulnerable WPS chipset, I was genuinely surprised how fast it was — seconds instead of the hours a brute-force PIN attack would take. Pixiwps is the tool that makes this possible, and it’s a great example of how a single implementation flaw can undermine an entire security mechanism. Here’s my complete guide.

What Is Pixiwps?

Pixiwps is a small, focused C-based tool used to perform the Pixie Dust attack against WPS (Wi-Fi Protected Setup) enabled routers with weak random number generation. Rather than brute-forcing all possible WPS PIN combinations online (which can take hours and often gets locked out by the router), Pixiwps recovers the PIN offline by exploiting predictable or weak entropy in certain vulnerable WPS chipsets — most notably older Ralink, Realtek, and Broadcom implementations.

Architecture and Internal Working

WPS’s PIN exchange relies on a cryptographic handshake using values called E-Hash1, E-Hash2, E-Nonce, and PKR/PKE (public keys), which are exchanged between the access point and a client during registration. In a properly implemented WPS stack, the router’s secret nonce (E-S1/E-S2) used to compute these hashes should be generated with strong randomness, making brute-forcing the actual 8-digit PIN the only option.

The Pixie Dust attack, discovered by Dominique Bongard, exploits the fact that many router chipsets generate these nonces using weak or even fully predictable pseudo-random number generators — in some cases seeded with easily guessable values like the current timestamp.

Pixiwps works as follows:

  1. It’s fed the handshake values (E-Hash1, E-Hash2, E-Nonce, PKE, PKR, and the Authkey) which are typically captured using reaver or bully in “offline” mode.
  2. It then attempts to reconstruct the router’s secret nonce values based on known weaknesses in specific chipset PRNGs.
  3. Using the recovered nonce, it re-derives the actual WPS PIN entirely offline — no further packets need to be sent to the router.
  4. The recovered PIN is then used to retrieve the actual WPA/WPA2 passphrase through the standard WPS registration process.

This is why the attack is so much faster than brute-forcing: it’s not guessing the PIN, it’s mathematically deriving it from a flawed random number generator.

Installation

Pixiwps comes pre-installed on Kali Linux, usually alongside reaver. To build from source:

git clone https://github.com/wiire-a/pixiewps.git
cd pixiewps/src
make
sudo make install

Verify installation:

pixiewps --version

Basic Syntax

pixiewps [options]

Practical Command Examples (Your Own Router / Authorized Lab Only)

1. Capturing the required handshake data with reaver first:

sudo reaver -i wlan0mon -b <BSSID> -c <channel> -vv -K 1

This runs reaver in Pixie Dust mode (-K 1), which automatically calls Pixiwps internally once it captures the needed values. Sample output:

[+] WPS PIN: '12345670'
[+] WPA PSK: 'MyHomeNetworkPassword'
[+] AP SSID: 'HomeLab_5G'

2. Running Pixiwps manually with captured values (if you extracted them yourself via Wireshark/airodump-ng):

pixiewps -e <PKE> -r <PKR> -s <E-Hash1> -z <E-Hash2> -a <Authkey> -n <E-Nonce>

Sample output on success:

[+] WPS pin: 12345670

3. Specifying a known vulnerable chipset mode for faster computation:

pixiewps -e <PKE> -r <PKR> -s <E-Hash1> -z <E-Hash2> -a <Authkey> -n <E-Nonce> -m <manufacturer-mode>

4. Using verbose mode for troubleshooting:

pixiewps -e <PKE> -r <PKR> -s <E-Hash1> -z <E-Hash2> -a <Authkey> -n <E-Nonce> -v 3

Key Options

FlagPurpose
-eEnrollee public key (PKE)
-rRegistrar public key (PKR)
-sE-Hash1 value
-zE-Hash2 value
-aAuthkey value
-nE-Nonce value
-mForce a specific chipset/manufacturer mode
-vVerbosity level for debugging
--forceForce computation even without full checksum validation

Real-World Use Cases

  • Wireless penetration testing: Rapidly assessing whether a client’s WPS-enabled access points are vulnerable to offline PIN recovery.
  • Home network security audits: Testing your own router to decide whether to disable WPS entirely (recommended if vulnerable).
  • IoT/embedded security research: Many consumer routers and IoT access points reuse WPS chipsets with known weak PRNGs; Pixiwps helps identify these during hardware assessments.
  • Security awareness demonstrations: Showing how a single flawed random number generator in a router’s firmware can undermine WPA2’s cryptographic guarantees entirely.

Integration with Other Tools

  • reaver: The most common pairing — reaver captures the WPS handshake and calls Pixiwps automatically with -K 1.
  • bully: An alternative WPS attack tool that can also feed captured values to Pixiwps.
  • Wireshark: Useful for manually inspecting WPS EAP packets if you need to extract E-Hash1/E-Hash2/nonce values by hand for edge cases where reaver’s automation fails.
  • Wifite: Wraps both reaver and Pixiwps together into its guided --wps attack mode, described in the Wifite section of my toolkit series.

Performance Optimization

  • Ensure a strong, stable wireless signal to the target — weak signal causes packet loss during handshake capture, which can corrupt the values Pixiwps needs.
  • Use -m to specify the manufacturer mode directly if you already know the chipset, skipping unnecessary brute-force attempts across PRNG models.
  • Run reaver with --no-nacks on chipsets known to mishandle certain response codes, improving handshake capture reliability before handing off to Pixiwps.

Troubleshooting

  • Pixiwps fails to compute a PIN: The target router’s WPS chipset may not be vulnerable to Pixie Dust — this attack only works against specific weak PRNG implementations, not all WPS routers.
  • Captured hash values look incomplete: Re-run the handshake capture with reaver; a partial or corrupted capture is a common cause of failure.
  • PIN found but WPA passphrase retrieval fails: Some routers rate-limit or lock out repeated WPS registration attempts even after the correct PIN is known — wait for the lockout timer to reset.

Best Practices

  • Only test WPS on routers you own or have explicit written authorization to assess.
  • If your own router is found vulnerable, disable WPS in the router admin panel immediately — most consumer routers offer this toggle.
  • Document the exact chipset/firmware version of vulnerable devices found during authorized assessments, since Pixie Dust vulnerability is chipset-specific, not universal.

Common Mistakes

  1. Assuming every WPS-enabled router is vulnerable — Pixie Dust only works against specific PRNG weaknesses in certain chipsets.
  2. Running reaver/Pixiwps against networks without authorization — this is illegal in most jurisdictions.
  3. Not disabling WPS after confirming vulnerability on your own equipment, leaving the weakness exposed.
  4. Manually mistyping long hex values (PKE, PKR, hashes) when running Pixiwps standalone instead of letting reaver automate the handoff.

FAQ

Does Pixiwps work on every router? No — it only succeeds against access points using specific, known-weak WPS chipset implementations. Modern routers with properly seeded random number generators are not vulnerable to this attack.

Is Pixie Dust the same as WPS PIN brute-forcing? No — brute-forcing tries all ~11,000 possible PIN combinations online (slow, often rate-limited). Pixie Dust mathematically derives the PIN offline in seconds by exploiting weak randomness, once the handshake is captured.

Can Pixiwps recover a WPA2 passphrase directly? Not directly — it recovers the WPS PIN. That PIN is then used through the standard WPS registration protocol (typically via reaver) to retrieve the actual WPA/WPA2 passphrase.

How do I protect my own router from this attack? Disable WPS entirely in your router’s settings. If disabling isn’t possible, update your router’s firmware, as many vendors patched their PRNG implementations after Pixie Dust was disclosed.

Lab Example

  1. Use an older router model known to have a vulnerable WPS chipset (many early Ralink/Realtek-based consumer routers) as your own isolated test device.
  2. Enable WPS on the test router.
  3. From a Kali machine with a monitor-mode-capable adapter, run: sudo reaver -i wlan0mon -b <BSSID> -c <channel> -vv -K 1
  4. Observe reaver capturing the handshake and automatically invoking Pixiwps to recover the PIN and WPA passphrase.
  5. Disable WPS on the test router afterward and repeat the test to confirm the attack no longer succeeds.

Summary

Pixiwps is a focused, highly effective tool for demonstrating just how damaging a weak random number generator can be to an otherwise cryptographically sound protocol. By exploiting predictable nonce generation in vulnerable WPS chipsets, it turns what should be a brute-force-resistant PIN exchange into a near-instant offline calculation. For defenders, the takeaway is simple: disable WPS unless you specifically need it, and keep router firmware updated.

References

  • GitHub repository: https://github.com/wiire-a/pixiewps
  • Pixie Dust attack research (Dominique Bongard): https://forums.kali.org/showthread.php?24286-Pixie-Dust-attack-WPS
  • Kali Linux tool page: https://www.kali.org/tools/pixiewps/
Total
0
Shares

Leave a Reply

Previous Post
kismet: A wireless network detector, sniffer, and intrusion detection system

kismet: A wireless network detector, sniffer, and intrusion detection system

Next Post
wifite: Automated tool for cracking WEP and WPA wireless networks using various attacks

wifite: Automated tool for cracking WEP and WPA wireless networks using various attacks

Related Posts