Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบเครือข่าย >> ความปลอดภัยเครือข่าย

Windows 10: Network Security Keys (รหัส Wi-Fi) จัดเก็บอยู่ที่ไหน?

Windows 10/11 จัดเก็บ Wi-Fi Profiles (รวม Password) ที่ไหน?

1. ระบบไฟล์ (System Files) - ต้องมีสิทธิ์ SYSTEM

Path: C:\ProgramData\Microsoft\Wlansvc\Profiles\Interfaces\{GUID}\{SSID}.xml

  • แต่ละ Interface (Wi-Fi Adapter) มี GUID แยกกัน
  • ไฟล์ XML มี KeyMaterial = Encrypted Password (DPAPI)
  • อ่านได้เฉพาะ SYSTEM Account (หรือ Admin ด้วย Tool)

2. Windows Credential Manager (User Context)

  • Control Panel > Credential Manager > Windows Credentials
  • ส่วนบางกรณีเก็บ Wi-Fi Password ไว้ที่นี่ (ขึ้นกับ Version/Join Domain)

3. Registry (Encrypted)

HKLM\SOFTWARE\Microsoft\WlanSvc\Profiles\... (Encrypted with DPAPI)

วิธีดู Wi-Fi Password ที่ Windows จัดเก็บ (ง่ายที่สุด)

วิธี GUI (Settings)

  1. Settings > Network & Internet > Wi-Fi > Manage known networks
  2. คลิกเครือข่าย > Properties (หรือ View) > ดู Network security key

วิธี Control Panel (Classic - รายละเอียดเต็ม)

  1. Win + R > ncpa.cpl > Enter
  2. คลิกขวา Wi-Fi > Status > Wireless Properties
  3. แท็บ Security > ติ๊ก Show characters

วิธี Command Line (PowerShell / CMD) - สำหรับ Admin/Automation

PowerShell (Admin):

# แสดงทุก Profile และ Password
netsh wlan show profiles
netsh wlan show profile name="SSID_NAME" key=clear
# ดูที่ "Key Content"

PowerShell One-liner (All Profiles):

(netsh wlan show profiles) | Select-String "All User Profile" | ForEach-Object {
    $ssid = $_.Line.Split(":")[1].Trim()
    $result = netsh wlan show profile name="$ssid" key=clear
    $pass = ($result | Select-String "Key Content").Line.Split(":")[1].Trim()
    [PSCustomObject]@{SSID=$ssid; Password=$pass}
} | Format-Table -AutoSize

เปลี่ยน Network Security Key (Wi-Fi Password) บน Windows 10

Windows ไม่สามารถเปลี่ยนรหัสผ่านบนเราเตอร์ได้โดยตรง ต้องไปตั้งที่เราเตอร์ แล้ว Windows จะขอรหัสใหม่ตอนเชื่อมต่อ

  1. ล็อกอินเราเตอร์ (https://192.168.1.1 เป็นต้น)
  2. Wireless > Wireless Security > เปลี่ยน Passphrase
  3. Save > Reboot Router
  4. Windows จะ Popup ขอรหัสใหม่ → ใส่รหัสใหม่ → Connect
  5. หรือ: Settings > Manage known networks > Forget → Connect ใหม่ด้วยรหัสใหม่

Backup / Export Wi-Fi Profiles (รวม Password)

Export (ต้อง Admin):

netsh wlan export profile folder="C:\WiFiBackup" key=clear
# สร้างไฟล์ XML แต่ละ SSID มี Password แบบ Plaintext ใน 

Import:

netsh wlan add profile filename="C:\WiFiBackup\Wi-Fi-SSID.xml" user=all

⚠️ ระวัง: ไฟล์ XML มี Password แบบ Plaintext ต้องเก็บปลอดภัย/ลบหลังใช้

Network Security Key = Wi-Fi Password?

ใช่ Network Security Key, WPA Key, Passphrase, Wireless Password, Wi-Fi Password = รหัสเดียวกัน

หา Default Key บนเราเตอร์ (ถ้าลืมหมด)

  • สติ๊กเกอร์ด้านล่าง/หลังเราเตอร์: WPA Key / Password / PIN
  • Default IP: 192.168.1.1 / 192.168.0.1 / 192.168.1.254
  • Default Login: admin/admin, admin/password, admin/1234

Reset Windows Network Stack (ถ้าเจอปัญหาเชื่อมต่อซ้ำซ้อน)

PowerShell (Admin):

netsh winsock reset
netsh int ip reset
netsh advfirewall reset
# Restart Computer

Best Practice: จัดการ Wi-Fi Password ให้ปลอดภัย

  • ใช้ Password Manager (Bitwarden, 1Password, KeePass, Apple/Google Password Manager)
  • ไม่ส่งรหัสผ่านทาง Email/Chat/Line
  • ใช้ QR Code Sharing (Windows 11 / Android / iOS) แทนการพิมพ์/อ่าน
  • เปลี่ยนรหัส 6-12 เดือน / เมื่อมีคนออกจากองค์กร/บ้าน
  • Enterprise: ใช้ WPA3-Enterprise (802.1X) + RADIUS + Certificates (ไม่ใช้ PSK แบบแชร์)