简体   繁体   English

SMBJ 身份验证器支持哪个 NTLM 版本(1 或 2)?

[英]Which NTLM version (1 or 2) does SMBJ authenticator support?

I am developing an application which needs to access a network share using SMB.我正在开发一个需要使用 SMB 访问网络共享的应用程序。 I was told that if security detects an authentication attempt using NTLM v. 1, then the respective firewall rules will be revoked.有人告诉我,如果安全检测到使用 NTLM v. 1 的身份验证尝试,那么相应的防火墙规则将被撤销。

Therefore I need to make sure that SMBJ (which I may use for this) supports NTLM v. 2 and uses it by default.因此,我需要确保SMBJ (我可能会用于此目的)支持 NTLM v. 2 并默认使用它。

Does SMBJ support NTLM v. 2? SMBJ 是否支持 NTLM v. 2? Does it use it by default?它默认使用它吗?

My own attempts at finding out我自己试图找出

In the source code of SMBJ I found following fragment:在 SMBJ 的源代码中,我发现了以下片段:

byte[] serverChallenge = challenge.getServerChallenge();
byte[] responseKeyNT = ntlmFunctions.NTOWFv2(String.valueOf(context.getPassword()), context.getUsername(), context.getDomain());
byte[] ntlmv2ClientChallenge = ntlmFunctions.(challenge.getTargetInfo());
byte[] ntlmv2Response = ntlmFunctions.getNTLMv2Response(responseKeyNT, serverChallenge, ntlmv2ClientChallenge);

The names getNTLMv2ClientChallenge and getNTLMv2Response suggest that NTLM v. 2 may be used.名称getNTLMv2ClientChallengegetNTLMv2Response表明可以使用 NTLM v. 2。

Also, JCIFS homepage claims that SMBJ is a successor project:此外,JCIFS 主页声称SMBJ 是一个后续项目:

Fortunately there are multiple new open source SMB Java projects to try including the following:幸运的是,有多个新的开源 SMB Java 项目可以尝试,包括以下内容:

jcifs-codelibs jcifs-ng smbj jcifs-codelibs jcifs-ng smbj

According to its FAQ , JCIFS has been using NTLM v. 2 since version 1.3.0.根据其常见问题解答,JCIFS 自 1.3.0 版以来一直使用 NTLM v. 2。

If如果

  1. JCIFS supports NTLM v. 2 and uses it by default, JCIFS 支持 NTLM v. 2 并默认使用它,
  2. SMBJ is based on JCIFS, SMBJ 基于 JCIFS,

then SMBJ should support NTLM v. 2 and use it by default.那么 SMBJ 应该支持 NTLM v. 2 并默认使用它。

Yes, SMBJ uses either NTLMv2 or SPNEGO for authentication.是的,SMBJ 使用 NTLMv2 或 SPNEGO 进行身份验证。 You can configure which one you want to use.您可以配置要使用的那个。 It doesn't use NTLMv1.它不使用 NTLMv1。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM