Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

Windows XP 實現多使用者同時遠端登入(終端服務破解)

編輯:XP 系統基礎知識

⚠️ 法律與安全警示

本文技術涉及修改系統核心檔案與註冊表,屬於破解微軟授權機制,僅供技術研究參考。生產環境請購買正規 Windows Server CAL 授權。修改錯誤可能導致系統無法開機,操作前請完整備份。

傳統作法(需重開機、較繁瑣)

  1. 安裝 XP SP2 正式版。
  2. 取得 SP2 Build 2055 版 TermSrv.dll(較早版本未封鎖多用戶)。
  3. 安全模式或其他系統啟動,備份並覆蓋所有 TermSrv.dll(通常在 system32 與 dllcache)。
  4. 正常開機,拒絕檔案保護還原提示。
  5. 執行批次檔修改註冊表啟用並發授權:
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Licensing Core" /v EnableConcurrentSessions /t REG_DWORD /d 1 /f

免重開機批次腳本(進階技術)

原理:停止 TermService → 修改註冊表 → 替換 termsrvhack.dll(修改版終端服務 DLL) → 重啟服務。需取得目標主機 Shell 權限並上傳 termsrvhack.dll 與批次檔。

@echo off
net stop sharedaccess
ntsd -c q -p "TermService_PID"  // 需用 tasklist/svc 取得 PID
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v KeepRASConnections /t REG_SZ /d 1 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Licensing Core" /v EnableConcurrentSessions /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Services\TermService\Parameters" /v ServiceDll /t REG_EXPAND_SZ /d "%SystemRoot%\system32\termsrvhack.dll" /f
copy termsrvhack.dll %windir%\system32\dllcache\termsrvhack.dll
attrib +h +s +r %windir%\system32\dllcache\termsrvhack.dll
copy termsrvhack.dll %windir%\system32\termsrvhack.dll
attrib +h +s +r %windir%\system32\termsrvhack.dll
shutdown -a
del termsrvhack.dll
net start termservice

執行成功後,以遠端桌面連線(預設 3389 埠)即可多用戶同時登入,互不干擾。

核心檔案說明

  • termsrvhack.dll:經修改的 TermSrv.dll,移除並發連線限制。
  • ntsd -c q -p PID:強制終止 TermService 進程以釋放檔案鎖定。
  • shutdown -a:取消系統可能觸發的重開機倒數。

風險提醒

  • 系統更新可能覆蓋修改檔案,導致功能失效。
  • 暴露 3389 埠於公網極易遭暴力破解,務必配合防火牆限制來源 IP 或使用 VPN。
  • 違反微軟 EULA,企業環境嚴禁使用。
Copyright © Windows教程網 All Rights Reserved