บทนำ
แม้ Windows XP จะหมด Support มา 4 ปีแล้ว แต่องค์กรหลายแห่งยังคงใช้ OS นี้ และดูเหมือนไม่มีการเปลี่ยนแปลงรุนแรงในอนาคตใกล้ๆ 近期พบปัญหา: Windows XP RDP Clients ไม่สามารถเชื่อมต่อผ่าน Remote Desktop ไปยัง RDS Farm ใหม่บน Windows Server 2012 R2 ปัญหาเดียวกันเกิดเมื่อ RDP จาก Windows XP ไป Windows 10 1803
ข้อผิดพลาดการเชื่อมต่อ RDP จาก Windows XP
Windows XP Users รายงาน RDP Client Errors ดังนี้:
- Because of a security error, the client could not connect to the remote computer. Verify that you are logged on to the network, and then try reconnecting again
- The remote session was disconnected because the remote computer received an invalid licensing message from this computer
- The remote computer requires Network Level Authentication, which your computer does not support. For assistance, contact your system administrator or technical support.
การแก้ไข: ติดตั้ง RDP Client ล่าสุดบน Windows XP
ตรวจสอบว่า RDP Client Version ล่าสุดติดตั้งบน Windows XP แล้วหรือยัง ปัจจุบัน Max RDP Client Version ที่ติดตั้งบน Windows XP ได้คือ RDP 7.0 (KB969084 – https://blogs.msdn.microsoft.com/scstr/2012/03/16/download-remote-desktop-client-rdc-7-0-or-7-1-download-remote-desktop-protocol-rdp-7-0-or-7-1/) ติดตั้ง Update นี้ได้เฉพาะ Windows XP SP3 การติดตั้ง RDP Client Version 8.0 ขึ้นไป ไม่รองรับบน Windows XP ปัญหาแก้ไขได้สำหรับครึ่งหนึ่งของ XP Clients อีกครึ่งยังคงปัญหา...
การปิดใช้งาน RDP Network Level Authentication (NLA) บน RDS Windows Server 2016/2012 R2
จากการศึกษาปัญหา RDS Server บน Windows 2012 R2 พบว่า Windows Server 2012 (และใหม่กว่า) ต้องการ NLA (Network Level Authentication) แบบ Mandatory หาก Client ไม่รองรับ NLA จะเชื่อมต่อ RDS Server ไม่ได้ เหมือนกัน NLA Enabled By Default เมื่อเปิด Remote Desktop ใน Windows 10
สรุป 2 วิธีให้ WinXP Clients ที่เหลือเชื่อมต่อ RDS Farm บน Windows Server 2016/2012 R2 หรือ Windows 10 ผ่าน RDP:
- Disable NLA Check บน Servers ของ RDS Farm 2012 R2/2016 หรือใน Windows 10 Workstation
- หรือ Enable NLA Support บน Windows XP Clients
ปิด NLA บน Windows Server 2012 R2 RDS
- เปิด Server Manager Console → Remote Desktop Services → Collections → QuickSessionCollection
- Tasks → Edit Properties → Security
- Uncheck Allow connections only from computers running Remote Desktop with Network Level Authentication
ปิด NLA บน Windows 10
System Properties → Remote Settings → Uncheck "Allow connections only from computers running Remote Desktop with Network Level Authentication (recommended)"
คำเตือน: การปิด NLA ระดับ Server ลดความปลอดภัยของระบบ และโดยทั่วไปไม่แนะนำ วิธีที่ 2 (Enable NLA บน XP) ดีกว่า
การเปิดใช้งาน NLA บน Windows XP SP3 Clients
ต้องมี Service Pack 3 บน Windows XP เพื่อทำงานเป็น RDP Client ได้ถูกต้อง หากยังไม่มี ต้อง Download และ Install Update นี้ SP3 เป็นข้อกำหนดบังคับสำหรับ Upgrade RDP Client จาก Version 6.1 เป็น 7.0 และรองรับ Components ทั้งหมด รวมถึง Credential Security Service Provider (CredSSP)
โดยไม่มี CredSSP และ NLA Support สำหรับ RDP Connection จาก Windows XP ไป Windows รุ่นใหม่ จะเกิด Error:
An authentication error has occurred, 0x80090327
NLA Support ปรากฏใน Windows XP ตั้งแต่ SP3 แต่ Disabled By Default เปิดใช้งาน NLA และ CredSSP Authentication Support ได้เฉพาะผ่าน Registry:
- ใน Registry Key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders แก้ค่า Attribute SecurityProviders โดยเพิ่ม credssp.dll ท้ายสุด (คั่นจากค่าเดิมด้วย Comma)
- ใน Key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa เพิ่มบรรทัด tspkg เข้าไปในค่า Attribute Security Packages
- Restart Computer หลังแก้ไข
หลังทำขั้นตอนเหล่านี้ Windows XP SP3 ควรเชื่อมต่อ Terminal Farm บน Windows Server 2016 / 2012 หรือ Windows ผ่าน Remote Desktop ได้แล้ว อย่างไรก็ตาม ไม่สามารถ Save Password สำหรับ RDP Connection บน Windows XP Client ได้ (ต้องกรอก Password ทุกครั้งที่ Connect)
Tip: พร้อมกับนั้น ปัญหา Printing ผ่าน Easy Print ก็เกิดขึ้น เพื่อให้ Windows XP Computers บน RDS 2012 Print ด้วย Easy Print ได้ Clients ต้องมี:
- OS – Windows XP SP3 หรือใหม่กว่า
- RDP Client Version – 6.1 หรือใหม่กว่า
- .NET Framework 3.5
Error: CredSSP Encryption Oracle Remediation
ในปี 2018 พบ Vulnerability ร้ายแรงใน CredSSP Protocol (CVE-2018-0886 Bulletin) ซึ่งแก้ไขใน Microsoft Security Updates ในเดือนพฤษภาคม 2018 Microsoft ออก Update เพิ่มเติมที่ห้าม Clients เชื่อมต่อ RDP ไป Computers/Servers ที่มี Vulnerable CredSSP Version (ดูบทความ: https://woshub.com/unable-connect-rdp-credssp-encryption-oracle-remediation/) หลัง Install Update นี้ เวลา RDP ไป Remote Computers ที่ไม่มี Update นี้ จะได้ Error: An authentication error has occurred. The function requested is not supported.
เนื่องจาก Microsoft ไม่ Release Security Updates สำหรับ Windows XP และ Windows Server 2003 แล้ว จึงไม่สามารถเชื่อมต่อไป Supported Windows Versions จาก OS เหล่านี้ได้
เพื่อ Enable RDP Connections จาก Windows XP ไป Windows 10/8.1/7 และ Windows Server 2012/2012 R2/2012/2008 R2 ที่ Updated แล้ว ต้อง Enable Policy Encryption Oracle Remediation ฝั่ง RDP Server (Computer Configuration → Administrative Templates → System → Credentials Delegation) เปลี่ยนค่า Policy เป็น Mitigated (ไม่ปลอดภัย ตามที่เข้าใจ)
Tip: สำหรับ Windows XP (Supported Version ชื่อ Windows Embedded POSReady 2009) มี Update แยกสำหรับ CredSSP Remote Code Execution Vulnerability – https://support.microsoft.com/en-us/help/4056564/security-update-for-vulnerabilities-in-windows-server-2008 (WindowsXP-KB4056564-x86-Embedded-ENU.exe) และทฤษฎีแล้วสามารถติดตั้ง Updates สำหรับ Embedded POSReady บน Windows XP x86 ธรรมดา และ Windows Server 2003 ได้