Netlogon Secure Channel と Schannel
Windows の資料に出てくる secure channel は、文脈によって別の仕組みを指します。特に、Active Directory の Netlogon secure channel と、TLS を実装する Secure Channel Security Support Provider (Schannel SSP) は名前が似ていますが、目的も credential も protocol も異なります。
| 用語 | 主な目的 | 相手 | 主な trust material |
|---|---|---|---|
| Netlogon secure channel | Domain member / domain 間の信頼を確認し、Netlogon RPC を保護する | Domain member と Domain Controller (DC)、または trust 関係の DC 間 | Computer account password / trust password から導出した session key |
| Secure Channel / Schannel SSP | TLS / DTLS handshake と record protection | TLS client と TLS server | X.509 certificate、TLS key exchange で得た key |
| SSPI security context | SSP が確立した認証・message protection の状態 | Application の client / server peer | 選択した SSP に依存 |
| CredSSP の TLS channel | Credential delegation を運ぶ暗号化 channel | CredSSP client と target server | TLS server certificate と TLS session key |
「Secure Channel が壊れた」という Windows domain の error は通常 Netlogon を指し、「Schannel event」や TLS handshake error は Schannel SSP を指します。
Netlogon Secure Channel
Section titled “Netlogon Secure Channel”Domain join した computer は、Active Directory (AD) 内の computer account と、それに対応する machine account password を持ちます。Local computer と AD の双方が対応する secret を保持し、Netlogon Remote Protocol (MS-NRPC) がこの共有情報を基に DC との secure channel を確立・維持します。
Microsoft の MS-NRPC 仕様では、client と DC が Netlogon credential を相互検証し、双方が同じ password information を共有していることを確認した後、session key を導出します。この session key は後続の RPC communication の signing / encryption に使われます。
sequenceDiagram
participant M as Domain member / Netlogon
participant D as Domain Controller / Netlogon
Note over M,D: AD と local LSA が対応する machine secret を保持
M->>D: DC Locator 後に Netlogon RPC 接続
M->>D: Challenge / Netlogon credential
D->>M: Server credential / capability negotiation
Note over M,D: Mutual verification と session key derivation
M->>D: Signed / sealed Netlogon RPC
D-->>M: Protected response
何に使われるか
Section titled “何に使われるか”Netlogon secure channel の主な役割は次のとおりです。
- Domain member と DC の machine trust を確認する。
- Member server が受けた NTLM network logon の検証情報を account authority / DC へ安全に運ぶ。
- Domain trust に関係する DC 間の secure channel を提供する。
- Computer account password や trust password の維持に関する Netlogon operation を保護する。
- Netlogon RPC message に integrity、sequence detection、必要な confidentiality を提供する。
これは「Domain member の全通信を DC まで暗号化する VPN」ではありません。また、user の Kerberos AS-REQ / TGS-REQ がすべて Netlogon secure channel 内を流れるわけでもありません。Kerberos client は KDC と Kerberos protocol を行い、Netlogon service は DC Locator など別の役割も担います。
Secure Channel の種類
Section titled “Secure Channel の種類”MS-NRPC には複数の NETLOGON_SECURE_CHANNEL_TYPE が定義されています。
| Type | 意味 |
|---|---|
WorkstationSecureChannel | Domain member から DC への channel。 |
TrustedDnsDomainSecureChannel / TrustedDomainSecureChannel | Domain trust で接続された DC 間の channel。 |
ServerSecureChannel | Backup Domain Controller (BDC) から Primary Domain Controller (PDC) への channel として定義された type。 |
CdcServerSecureChannel | Read-Only Domain Controller (RODC) から writable DC への channel。 |
実務で workstation / member server の「trust relationship」が問題になる場合は、通常 WorkstationSecureChannel と computer account secret の整合性を調べます。
Secure Channel が壊れた場合
Section titled “Secure Channel が壊れた場合”Microsoft の troubleshooting 文書は、broken secure channel の代表原因を次の2つに整理しています。
- Local computer と DC 間の network / port 到達性の問題。
- Local に保存された machine password と AD の computer account password の不一致。
典型的な症状には、domain logon failure、The trust relationship between this workstation and the primary domain failed、no logon servers available、Netlogon event ID 5719、5722、5723 などがあります。ただし、同じ error でも DNS、DC Locator、firewall、replication、snapshot rollback、duplicate computer object など原因は複数あり得ます。
# Member computer と domain の trust relationship を確認Test-ComputerSecureChannel -Verbose
# Netlogon secure channel の状態を確認nltest /sc_query:corp.example.com
# DC Locator と到達先を確認nltest /dsgetdc:corp.example.comTest-ComputerSecureChannel は domain member computer 用です。Microsoft は DC 上では false positive error を返すことがあるため、DC の確認・reset には netdom.exe または nltest.exe を使うよう説明しています。
nltest /sc_query は最後に利用した secure channel の状態を報告します。一方、nltest /sc_verify:<DomainName> は検証に失敗すると既存 channel を削除して再構築する動作を含むため、純粋な read-only command ではありません。変更管理下で使用します。
修復する前に原因を確認する
Section titled “修復する前に原因を確認する”Member computer では Test-ComputerSecureChannel -Repair や Reset-ComputerMachinePassword、状況により nltest を利用できます。しかし、repair は local / AD の trust state を変更します。次を確認せず、最初から domain rejoin や password reset を行うと、根本原因や調査 evidence を失う場合があります。
- DNS と DC Locator が正しい DC を返すか。
- Kerberos、LDAP、SMB、RPC endpoint mapper と dynamic RPC など必要 port が到達可能か。
- Local と DC の時刻が許容範囲か。
- AD replication が正常で、操作対象 DC が最新の computer account password を持つか。
- VM snapshot restore、computer clone、同名再作成など password mismatch の原因がないか。
- Member computer か DC かを区別し、対象 role に対応した Microsoft 手順を選んでいるか。
Schannel SSP と TLS
Section titled “Schannel SSP と TLS”Secure Channel (Schannel) SSP は Windows の TLS / DTLS 実装です。Server certificate による server authentication、任意の client certificate authentication、TLS key exchange、record encryption / integrity を提供します。Application は Schannel も SSPI API 経由で利用できます。Server が client certificate を要求する構成では、certificate の検証や account mapping について application / server 側が担う処理もあります。
Application -> SSPI: Schannel package を選択 -> InitializeSecurityContext / AcceptSecurityContext -> TLS handshake token を transport で交換 -> Certificate validation と key establishment -> EncryptMessage / DecryptMessage などで TLS record を保護Schannel は Kerberos / NTLM を選択する Negotiate SSP とは別 package です。ただし同じ application stack 内で重ねて使えます。
HTTPS + Integrated Windows Authentication
TCP└─ TLS / Schannel # Server certificate と transport protection └─ HTTP └─ Negotiate / SPNEGO # Kerberos または NTLM を選択 └─ Application identityCredSSP も先に TLS channel を確立し、その内側で SPNEGO authentication と credential delegation を行います。このため、「TLS server authentication」「Windows user authentication」「credential delegation」は別々に評価する必要があります。
セキュリティ上の要点
Section titled “セキュリティ上の要点”- Netlogon secure channel の異常を、単なる user password error として扱わない。Machine trust、network、DC Locator、replication を確認する。
- Domain member の machine account credential も security principal の credential として保護する。
- Netlogon RPC の security enforcement を弱めず、client / DC を support 中の patch level に保つ。
- Schannel では support 中の TLS version / cipher suite、certificate chain、name validation、revocation policy を管理する。
- HTTPS を使っていても、内側の HTTP Negotiate が NTLM を選択する可能性は残る。TLS と authentication mechanism の両方を観測する。
- 「channel が暗号化されている」ことと、「接続相手に credential を委任してよい」ことを分けて判断する。
Microsoft の公式資料
Section titled “Microsoft の公式資料”- MS-NRPC: Netlogon Common Authentication Details: Secure channel の mutual credential verification と session key。
- MS-NRPC: Applicability Statement: Netlogon secure channel、RPC protection、NTLM validation transport。
- MS-NRPC: NETLOGON_SECURE_CHANNEL_TYPE: Domain member、trust、RODC などの channel type。
- Secure channel problems detected: Network failure、machine password mismatch、関連 event と修復の考え方。
- Test-ComputerSecureChannel: Member computer の channel test / repair と DC での制約。
- Nltest:
/sc_query、/sc_verify、/sc_resetの動作差。 - Security Support Provider Interface Architecture: Schannel、Negotiate、CredSSP を含む SSP architecture。
- Performing Authentication Using Schannel: TLS server certificate と optional client authentication。

