如何确定 SMB 客户端是否已与我的 Windows Server 2012 建立签名 SMB 通信?

pra*_*esh 7 network-share server-message-block windows-server-2012

有没有办法从我的 Windows 2012 Server 中查找客户端是否已建立签名通信

Net Session提供了基本细节,但没有提及任何有关签名的信息。

C:\>net session \\a.b.c.d
User name       Administrator
Computer        a.b.c.d
Guest logon     No
Client type
Sess time       00:08:02
Idle time       00:07:50

Share name     Type     # Opens

--------------------------------------
test           Disk     0
The command completed successfully.
Run Code Online (Sandbox Code Playgroud)

是否有任何Powershell cmdlet或任何管理工具或命令可以提供此类信息?提前致谢。

编辑1:我也尝试了以下方法。应在客户端上执行Get-SmbConnection以查找客户端已建立连接的服务器。

PS C:\Users\Administrator> Get-SmbConnection | Select-Object -Property *
ContinuouslyAvailable : False
Credential            : domain\administrator
Dialect               : 3.00
Encrypted             : False
NumOpens              : 3
ServerName            : server1
ShareName             : test
UserName              : SERVER1\Administrator
PSComputerName        :
CimClass              : ROOT/Microsoft/Windows/SMB:MSFT_SmbConnection
CimInstanceProperties : {ContinuouslyAvailable, Credential, Dialect, Encrypted...}
CimSystemProperties   : Microsoft.Management.Infrastructure.CimSystemProperties
Run Code Online (Sandbox Code Playgroud)

Rya*_*ies 5

截至撰写本文时,真正了解这一点的唯一方法是观察通过 Wireshark 或网络监视器协商的网络连接。

目前,没有任何东西可以通过 API、WMI 类等公开这些数据。

Powershell Get-SMBConnectioncmdlet将来为您提供此信息,但现在不会。

该 cmdlet 只是MSFT_SmbConnectionWMI 类的包装器。

Get-WmiObject -Namespace 'Root\Microsoft\Windows\SMB' MSFT_SmbConnection
Run Code Online (Sandbox Code Playgroud)

返回完全相同的信息。如果您阅读该 WMI 类的MSDN 文档,您将看到该文档Signed除了Encrypted您今天看到的属性之外还列出了一个属性。

class MSFT_SmbConnection
{
  string  ServerName;
  string  ShareName;
  string  UserName;
  uint32  SmbInstance;
  string  Credential;
  uint64  NumOpens;
  string  Dialect;
  boolean ContinuouslyAvailable;
  boolean Encrypted;
  boolean EnableLoadBalanceScaleOut;
  boolean Signed;  // ^_^ *trollface*
};
Run Code Online (Sandbox Code Playgroud)

该文档接着说:

数据类型:布尔值

访问类型:只读

待定。(待定)

Windows Server 2012 R2、Windows 8.1、Windows Server 2012、Windows 8:Windows Server Technical Preview 和 Windows 10 Technical Preview 之前不支持此属性。

Windows 10 预览版首次出现。所以你有它。