Computer >> Hướng Dẫn Máy Tính >  >> Kết Nối Mạng >> An Ninh Mạng

Cách tìm Network Security Key (Mật khẩu Wi-Fi) trên Windows 8/8.1 bằng Command Prompt (CMD)

Tìm mật khẩu Wi-Fi đã lưu trên Windows 8/8.1 dùng CMD

Windows 8/8.1 không có giao diện "Manage known networks" trực quan như Win 10/11 trong Settings. CMD là cách nhanh nhất, mạnh nhất.

Cách 1: CMD - Liệt kê tất cả Profile & Xem mật khẩu (Khuyên dùng)

  1. Mở **Command Prompt (Admin)**: Nhấn Win+X → Chọn **Command Prompt (Admin)** hoặc **Windows PowerShell (Admin)**. (Win 8.1: Kéo chuột góc dưới trái → Right-click Start → Command Prompt (Admin)).
  2. Liệt kê tất cả profile Wi-Fi đã lưu:
    netsh wlan show profiles
    
  3. Xác định tên chính xác của Profile (SSID) cần xem pass (Cột **User profiles**).
  4. Xem chi tiết profile kèm mật khẩu (Key Content):
    netsh wlan show profile name="TÊN_SSID_CHÍNH_XÁC" key=clear
    
    Lưu ý: Tên SSID có khoảng trắng/ký tự đặc biệt phải đặt trong ngoặc kép " ".
  5. Kết quả: Tìm mục **Security settings** → **Key Content** = **Mật khẩu Wi-Fi (Network Security Key)**.

Cách 2: PowerShell (Hiện đại hơn, output đẹp hơn)

(netsh wlan show profiles) | Select-String "\:(.+)$" | ForEach-Object { $_.Matches[0].Groups[1].Value.Trim() } | ForEach-Object { netsh wlan show profile name="$_" key=clear } | Select-String "Key Content"

Hoặc script gọn:

$profiles = (netsh wlan show profiles) | Select-String "All User Profile\s+:\s+(.+)" | ForEach-Object { $_.Matches[0].Groups[1].Value.Trim() }
foreach ($profile in $profiles) {
    $result = netsh wlan show profile name="$profile" key=clear
    $key = ($result | Select-String "Key Content\s+:\s+(.+)" ).Matches[0].Groups[1].Value.Trim() -replace '^\s+|\s+$', ''
    if ($key) { Write-Host "SSID: $profile | Password: $key" -ForegroundColor Green }
    else { Write-Host "SSID: $profile | Password: (Empty/Open/Not Saved)" -ForegroundColor Yellow }
}

Cách 3: Giao diện đồ họa (GUI) - Windows 8/8.1

  1. Mở **Control Panel** (Win+X → Control Panel).
  2. Chọn **Network and Sharing Center** (Xem theo Category: Network and Internet → Network and Sharing Center).
  3. Click **Change adapter settings** (Bên trái).
  4. Chuột phải adapter **Wi-Fi** (Có biểu tượng sóng) → **Status**.
  5. Click **Wireless Properties** → Tab **Security**.
  6. Tích **Show characters** → **Network security key** hiện ra.

Lưu ý: Cách này chỉ hoạt động nếu bạn **ĐANG KẾT NỐI** hoặc **ĐÃ KẾT NỐI** mạng đó và profile còn lưu. Cách 1 (CMD) xem được tất cả profile đã lưu (kể cả không kết nối).

Cách 4: Tìm trên Modem/Router (Nếu quên sạch)

  • Xem nhãn mặt dưới/mặt sau Router/Modem: **WPA Key / Passphrase / Password / Wireless Password**.
  • Đăng nhập Web UI Router (192.168.x.x) → Wireless → Security → Xem/Đổi Pass.
  • Reset Router (Giữ nút Reset 10-15s) → Dùng pass mặc định trên nhãn → Setup lại.

Phân biệt: Network Security Key vs Password

  • Network Security Key: Tên kỹ thuật của mật khẩu Wi-Fi trong chuẩn 802.11i (WPA/WPA2/WPA3). Dùng trong cấu hình router, CMD, API.
  • Wi-Fi Password / Passphrase: Tên gọi thân thiện cho người dùng. Chính là cùng một thứ.
  • Router Admin Password: Mật khẩu đăng nhập trang quản trị Router (192.168.x.x). KHÁC Network Security Key.

Lưu ý bảo mật khi dùng CMD xem Pass

  • CMD Admin cần quyền Administrator. Lịch sử lệnh (F7, doskey /history) có thể lộ pass. Xóa lịch sử: cls (chỉ xóa màn hình) hoặc đóng cửa sổ CMD.
  • Không chạy script lạ từ internet để dump pass (Có thể là malware).
  • Pass Wi-Fi là nhạy cảm. Không chia sẻ công khai, không chụp màn hình lưu trữ không an toàn.