Document NTLMv2+LDAP incompatibility and skip Phase 2.3
Some checks failed
Test / build (push) Has been cancelled
Test / test (push) Has been cancelled

This commit is contained in:
Warren
2026-06-22 04:34:15 +08:00
parent 3c5de4e6a3
commit 9ae0402318
2 changed files with 27 additions and 1 deletions

View File

@@ -4087,9 +4087,35 @@ cargo test -p markbase-core --lib --features smb-server,ldap # 355 passed, 0 fa
---
### NTLMv2 + LDAP 不兼容性分析 ⭐⭐⭐⭐⭐
**根本性协议限制**
| 认证方式 | 特性 | 问题 |
|---------|------|------|
| **NTLMv2** | 不发送密码,只发送 response从密码计算 | Server 需要预先知道 NT hash |
| **LDAP bind** | 只能验证密码是否正确 | 无法返回密码或 NT hash |
**NTLMv2 验证流程MS-NLMP**
```
1. Client: response_key_nt = HMAC_MD5(NT_hash, UPPER(user) + domain)
2. Client: NTProofStr = HMAC_MD5(response_key_nt, server_challenge + client_challenge)
3. Server: 需要 NT_hash 来验证 NTProofStr
```
**结论**
- ❌ Server 无法从 NTLMv2 response 反推密码
- ❌ LDAP bind 无法提供 NT hash
- ✅ SMB server 启动时预同步 LDAP 用户(需要提供密码)
**替代方案**
- 使用 Kerberos/SPNEGOsmb-server 不支持)
- 使用 LDAP password sync 工具(独立 CLI 命令)
---
### 下一步 ⭐⭐⭐⭐⭐
**Phase 2.3**smb-server session_setup LDAP authentication integration修改 session_setup.rs lookup function
**Phase 3**Write/Read Cache (~150 lines)
---

Binary file not shown.