Document NTLMv2+LDAP incompatibility and skip Phase 2.3
This commit is contained in:
28
AGENTS.md
28
AGENTS.md
@@ -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/SPNEGO(smb-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)
|
||||
|
||||
---
|
||||
|
||||
BIN
data/auth.sqlite
BIN
data/auth.sqlite
Binary file not shown.
Reference in New Issue
Block a user