SMBJ认证器支持NTLM版本(1或2)?

huangapple go评论71阅读模式
英文:

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

问题

我正在开发一个需要使用SMB访问网络共享的应用程序。有人告诉我,如果安全性检测到使用NTLM v. 1的认证尝试,相应的防火墙规则将被撤销。

因此,我需要确保SMBJ(我可能会用于此)支持NTLM v. 2,并默认使用它。

SMBJ支持NTLM v. 2吗?它会默认使用吗?

我自己的尝试

在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);

getNTLMv2ClientChallengegetNTLMv2Response这些名称表明可能使用了NTLM v. 2。

此外,JCIFS首页声称 SMBJ 是一个继任项目:

> 幸运的是,有多个新的开源SMB Java项目可供尝试,包括以下项目:
>
> jcifs-codelibs
> jcifs-ng
> smbj

根据其常见问题,自版本1.3.0起,JCIFS一直在使用NTLM v. 2。

如果:

  1. JCIFS支持并默认使用NTLM v. 2,
  2. SMBJ基于JCIFS,

那么SMBJ应该支持NTLM v. 2并默认使用它。

英文:

I am developing an application which needs to access a network share using SMB. I was told that if security detects an authentication attempt using NTLM v. 1, then the respective firewall rules will be revoked.

Therefore I need to make sure that SMBJ (which I may use for this) supports NTLM v. 2 and uses it by default.

Does SMBJ support 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:

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.

Also, JCIFS homepage claims that SMBJ is a successor project:

> Fortunately there are multiple new open source SMB Java projects to try including the following:
>
> jcifs-codelibs
> jcifs-ng
> smbj

According to its FAQ, JCIFS has been using NTLM v. 2 since version 1.3.0.

If

  1. JCIFS supports NTLM v. 2 and uses it by default,
  2. SMBJ is based on JCIFS,

then SMBJ should support NTLM v. 2 and use it by default.

答案1

得分: 2

是的,SMBJ使用NTLMv2或SPNEGO进行身份验证。您可以配置要使用的身份验证方式。它不使用NTLMv1。

英文:

Yes, SMBJ uses either NTLMv2 or SPNEGO for authentication. You can configure which one you want to use. It doesn't use NTLMv1.

huangapple
  • 本文由 发表于 2020年9月23日 21:16:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/64028859.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定