排查解决 Microsoft Defender for Identity 中的已知问题

本文介绍如何排查解决 Microsoft Defender for Identity 中的问题。

传感器故障通信错误

如果收到以下传感器故障错误:

System.Net.Http.HttpRequestException:
An error occurred while sending the request. ---> System.Net.WebException:
Unable to connect to the remote server --->
System.Net.Sockets.SocketException: A connection attempt failed because the
connected party did not properly respond after a period of time, or established
connection failed because connected host has failed to respond...

解决方法:

确保不会阻止 localhost、TCP 端口 444 的通信。 若要了解有关 Microsoft Defender for Identity 先决条件的详细信息,请参阅端口

部署日志位置

Defender for Identity 部署日志位于安装产品的用户的临时目录中。 在默认安装位置中,位置为:C:\Users\Administrator\AppData\Local\Temp(或 %temp% 上方的某个目录)。 有关详细信息,请参阅使用日志对 Defender for Identity 进行故障排除

代理身份验证问题表现为许可错误

如果在传感器安装过程中收到以下错误:由于许可问题,传感器未能注册。

部署日志条目:

[1C60:1AA8][2018-03-24T23:59:13]i000: 2018-03-25 02:59:13.1237 Info InteractiveDeploymentManager ValidateCreateSensorAsync returned [validateCreateSensorResult=LicenseInvalid]] [1C60:1AA8][2018-03-24T23:59:56]i000: 2018-03-25 02:59:56.4856 Info InteractiveDeploymentManager ValidateCreateSensorAsync returned [validateCreateSensorResult=LicenseInvalid]] [1C60:1AA8][2018-03-25T00:27:56]i000: 2018-03-25 03:27:56.7399 Debug SensorBootstrapperApplication Engine.Quit [deploymentResultStatus=1602 isRestartRequired=False]] [1C60:15B8][2018-03-25T00:27:56]i500: Shutting down, exit code: 0x642

原因:

在某些情况下,当通过代理通信时,在身份验证期间,代理可能会向 Defender for Identity 传感器提示错误 401 或 403,而不是错误 407。 Defender for Identity 传感器将错误 401 或 403 解释为许可问题,而不是代理身份验证问题。

解决方法:

确保传感器通过配置的代理,无需进行身份验证,即可浏览 *.atp.azure.com。 有关详细信息,请参阅配置代理以启用通信

代理身份验证问题表现为连接错误

如果在传感器安装过程中收到以下错误:传感器未能连接服务。

原因:

如果缺少 Defender for Identity 所需的受信任根证书颁发机构证书,则可能会导致此问题。

解决方法:

运行以下 PowerShell cmdlet,验证所需证书是否已安装。

在以下示例中,所有客户都使用“DigiCert Baltimore Root”证书。 此外,商业客户使用“DigiCert Global Root G2”证书,或者美国政府 GCC High 客户使用“DigiCert Global Root CA”证书,如下所示。

# Certificate for all customers
Get-ChildItem -Path "Cert:\LocalMachine\Root" | where { $_.Thumbprint -eq "D4DE20D05E66FC53FE1A50882C78DB2852CAE474"} | fl

# Certificate for commercial customers
Get-ChildItem -Path "Cert:\LocalMachine\Root" | where { $_.Thumbprint -eq "df3c24f9bfd666761b268073fe06d1cc8d4f82a4"} | fl

# Certificate for US Government GCC High customers
Get-ChildItem -Path "Cert:\LocalMachine\Root" | where { $_.Thumbprint -eq "a8985d3a65e5e5c4b2d7d66d40c6dd2fb19c5436"} | fl

所有客户的证书输出:

Subject      : CN=Baltimore CyberTrust Root, OU=CyberTrust, O=Baltimore, C=IE
Issuer       : CN=Baltimore CyberTrust Root, OU=CyberTrust, O=Baltimore, C=IE
Thumbprint   : D4DE20D05E66FC53FE1A50882C78DB2852CAE474
FriendlyName : DigiCert Baltimore Root
NotBefore    : 5/12/2000 11:46:00 AM
NotAfter     : 5/12/2025 4:59:00 PM
Extensions   : {System.Security.Cryptography.Oid, System.Security.Cryptography.Oid, System.Security.Cryptography.Oid}

商业客户的证书输出:

Subject      : CN=DigiCert Global Root G2, OU=www.digicert.com, O=DigiCert Inc, C=US
Issuer       : CN=DigiCert Global Root G2, OU=www.digicert.com, O=DigiCert Inc, C=US
Thumbprint   : DF3C24F9BFD666761B268073FE06D1CC8D4F82A4
FriendlyName : DigiCert Global Root G2
NotBefore    : 01/08/2013 15:00:00
NotAfter     : 15/01/2038 14:00:00
Extensions   : {System.Security.Cryptography.Oid, System.Security.Cryptography.Oid, System.Security.Cryptography.Oid}

美国政府 GCC High 客户的证书输出:

Subject      : CN=DigiCert Global Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US
Issuer       : CN=DigiCert Global Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US
Thumbprint   : A8985D3A65E5E5C4B2D7D66D40C6DD2FB19C5436
FriendlyName : DigiCert
NotBefore    : 11/9/2006 4:00:00 PM
NotAfter     : 11/9/2031 4:00:00 PM
Extensions   : {System.Security.Cryptography.Oid, System.Security.Cryptography.Oid, System.Security.Cryptography.Oid, System.Security.Cryptography.Oid}

如果未看到预期的输出,请使用以下步骤:

  1. 将以下证书下载到服务器核心计算机。 对于所有客户,请下载 Baltimore CyberTrust 根证书。

    此外:

  2. 运行以下 PowerShell cmdlet 安装该证书。

    # For all customers, install certificate
    Import-Certificate -FilePath "<PATH_TO_CERTIFICATE_FILE>\bc2025.crt" -CertStoreLocation Cert:\LocalMachine\Root
    
    # For commercial customers, install certificate
    Import-Certificate -FilePath "<PATH_TO_CERTIFICATE_FILE>\DigiCertGlobalRootG2.crt" -CertStoreLocation Cert:\LocalMachine\Root
    
    # For US Government GCC High customers, install certificate
    Import-Certificate -FilePath "<PATH_TO_CERTIFICATE_FILE>\DigiCertGlobalRootCA.crt" -CertStoreLocation Cert:\LocalMachine\Root
    

尝试使用 PowerShell 时出现无提示安装错误

如果在无提示传感器安装期间尝试使用 PowerShell 并收到以下错误:

"Azure ATP sensor Setup.exe" "/quiet" NetFrameworkCommandLineArguments="/q" Acce ... Unexpected token '"/quiet"' in expression or statement."

原因:

在使用 PowerShell 时,未能包含安装所需的 ./ 前缀会导致此错误。

解决方法:

使用完整命令即可成功安装。

./"Azure ATP sensor Setup.exe" /quiet NetFrameworkCommandLineArguments="/q" AccessKey="<Access Key>"

Defender for Identity 传感器 NIC 组合问题

如果在配置有 NIC 组合适配器和 Winpcap 驱动程序的计算机上安装 Defender for Identity 传感器,则会收到一条安装错误。 如果要在配置了 NIC 组合的计算机上安装 Defender for Identity 传感器,请确保按照 此处的说明将 Winpcap 驱动程序替换为 Npcap。

多处理器组模式

对于 Windows 操作系统 2008R2 和 2012,不支持处于多处理器组模式下的 Defender for Identity 传感器。

建议的可能解决方法:

  • 如果超线程处于打开状态,请将其关闭。 这可以减少逻辑核心的数量,从而避免需要在多处理器组模式下运行。

  • 如果计算机的逻辑核心少于 64 个,并且在 HP 主机上运行,则可以将 NUMA 组大小优化 BIOS 设置从默认的群集更改为扁平

VMware 虚拟机传感器问题

如果 VMware 虚拟机上安装了 Defender for Identity 传感器,则可能会收到运行状况警报某些网络流量未分析。 出现这种情况的原因可能是 VMware 中的配置不匹配。

若要解决问题,请执行以下操作:

在来宾 OS 上,在虚拟机的 NIC 配置中将以下内容设置为禁用IIPv4 TSO Offload

VMware sensor issue.

使用以下命令检查是否已启用或禁用“Large Send Offload (LSO) (LSO)”:

Get-NetAdapterAdvancedProperty | Where-Object DisplayName -Match "^Large*"

Check LSO status.

如果已启用 LSO,请使用以下命令禁用它:

Disable-NetAdapterLso -Name {name of adapter}

Disable LSO status.

注意

  • 根据配置,这些操作可能会导致网络连接短暂中断。
  • 可能需要重启计算机才能使这些更改生效。
  • 这些步骤可能因 VMWare 版本而异。 有关如何为 VMWare 版本禁用 LSO/TSO 的信息,请查看 VMWare 文档。

传感器未能检索组托管服务帐户 (gMSA) 凭据

如果收到以下运行状况警报:目录服务用户凭据不正确

传感器日志条目:

2020-02-17 14:01:36.5315 Info ImpersonationManager CreateImpersonatorAsync started [UserName=account_name Domain=domain1.test.local IsGroupManagedServiceAccount=True] 2020-02-17 14:01:36.5750 Info ImpersonationManager CreateImpersonatorAsync finished [UserName=account_name Domain=domain1.test.local IsSuccess=False]

传感器更新程序日志条目:

2020-02-17 14:02:19.6258 Warn GroupManagedServiceAccountImpersonationHelper GetGroupManagedServiceAccountAccessTokenAsync failed GMSA password could not be retrieved [errorCode=AccessDenied AccountName=account_name DomainDnsName=domain1.test.local]

传感器未能检索 gMSA 帐户的密码。

原因 1

域控制器尚未获得检索 gMSA 帐户密码的权限。

解决方法 1:

验证运行传感器的计算机是否已获得检索 gMSA 帐户密码的权限。 有关详细信息,请参阅授予检索 gMSA 帐户密码的权限

原因 2

传感器服务作为 LocalService 运行,并执行目录服务帐户的模拟。

如果为此域控制器配置了用户权限分配策略“登录即服务”,除非 gMSA 帐户被授予了“登录即服务”权限,否则模拟将失败。

解决方法 2:

如果受影响的域控制器上配置了用户权限分配策略“登录即服务”,则为 gMSA 帐户配置“登录即服务”。 有关详细信息,请参阅验证 gMSA 帐户是否具有所需的权限

原因 3

如果域控制器 Kerberos 票证是在域控制器添加到具有适当权限的安全组之前签发的,则该组不会成为 Kerberos 票证的一部分。 因此,它无法检索 gMSA 帐户的密码。

解决方法 3:

请执行以下任一操作解决此问题:

  • 重启域控制器。

  • 清除 Kerberos 票证,强制域控制器请求新的 Kerberos 票证。 通过管理员命令提示符运行以下命令:

    klist -li 0x3e7 purge

  • 将检索 gMSA 密码的权限分配给域控制器已加入的组,例如域控制器组。

传感器服务无法启动

传感器日志条目:

Warn DirectoryServicesClient CreateLdapConnectionAsync failed to retrieve group managed service account password. [DomainControllerDnsName=DC1.CONTOSO.LOCAL Domain=contoso.local UserName=AATP_gMSA]

原因:

域控制器尚未获得访问 gMSA 帐户密码的权限。

解决方法:

验证域控制器是否已获得访问密码的权限。 应在 Active Directory 中建立一个安全组,其中包含域控制器、AD FS/AD CS 服务器和独立传感器计算机帐户。 如果没有安全组,建议创建一个。

可以使用以下命令检查是否在参数中添加了计算机帐户或安全组。 将 mdiSvc01 替换为你创建的名称。

Get-ADServiceAccount mdiSvc01 -Properties PrincipalsAllowedToRetrieveManagedPassword

结果应如下所示:

Powershell results.

在此示例中,可以看到已添加名为 mdiSvc01Group 的组。 如果尚未添加域控制器或安全组,可以使用以下命令进行添加。 将 mdiSvc01 替换为 gMSA 的名称,并将 DC1 替换为域控制器的名称,或者将 mdiSvc01Group 替换为安全组的名称。

# To set the specific domain controller only:
$specificDC = Get-ADComputer -Identity DC1
Set-ADServiceAccount mdiSvc01 -PrincipalsAllowedToRetrieveManagedPassword $specificDC


# To set a security group that contains the relevant computer accounts:
$group = Get-ADGroup -Identity mdiSvc01Group
Set-ADServiceAccount mdiSvc01 -PrincipalsAllowedToRetrieveManagedPassword $group

如果已添加域控制器或安全组,但仍看到错误,可以尝试以下步骤:

  • 选项 1:重新启动服务器以同步最近的更改
  • 选项 2:
    1. AATPSensorAATPSensorUpdater 服务设置为“禁用”
    2. 停止 AATPSensorAATPSensorUpdater 服务
    3. 使用以下命令将服务帐户缓存到服务器:Install-ADServiceAccount gMSA_AccountName
    4. AATPSensorAATPSensorUpdater 服务设置为“自动”
    5. 启动 AATPSensorUpdater 服务

拒绝访问注册表项“全局”

传感器服务未能启动,传感器日志中包含类似以下的条目:

2021-01-19 03:45:00.0000 Error RegistryKey System.UnauthorizedAccessException: Access to the registry key 'Global' is denied.

原因:

为此域控制器或 AD FS/AD CS 服务器配置的 gMSA 无权限访问性能计数器的注册表项。

解决方法:

将 gMSA 添加到服务器上的性能监视器用户组。

报表下载不能包含超过 300,000 个条目

Defender for Identity 不支持下载每个报表包含超过 300,000 个条目。 如果超过 300,000 个条目,则报表呈现为不完整。

原因:

这是一个设计上的限制。

解决方法:

没有已知的解决方法。

传感器未能枚举事件日志

虽然在 Defender for Identity 控制台中发现安全事件警报或逻辑活动数量有限或缺乏,但并没有触发运行状况问题。

传感器日志条目:

Error EventLogException System.Diagnostics.Eventing.Reader.EventLogException: The handle is invalid at void System.Diagnostics.Eventing.Reader.EventLogException.Throw(int errorCode) at object System.Diagnostics.Eventing.Reader.NativeWrapper.EvtGetEventInfo(EventLogHandle handle, EvtEventPropertyId enumType) at string System.Diagnostics.Eventing.Reader.EventLogRecord.get_ContainerLog()

原因:

自定义访问控制列表限制了本地服务帐户对所需事件日志的访问。

解决方法:

确保自定义访问控制列表 (DACL) 包含以下条目(这是 AATPSensor 服务的 SID)。

(A;;0x1;;;S-1-5-80-818380073-2995186456-1411405591-3990468014-3617507088)

检查是否通过 GPO 配置了安全事件日志的 DACL:

Policies > Administrative Templates > Windows Components > Event Log Service > Security > Configure log access

将上面的条目追加到现有策略。 之后运行 C:\Windows\System32\wevtutil.exe gl security 以验证是否已添加条目。

本地 Defender for Identity 日志现在应显示:

Info WindowsEventLogReader EnableEventLogWatchers EventLogWatcher enabled [name=Security]

ApplyInternal 未能通过双向 SSL 连接到服务的错误

如果在传感器安装过程中收到以下错误:ApplyInternal 未能通过双向 SSL 连接到服务,并且传感器日志包含类似于以下内容的条目:

2021-01-19 03:45:00.0000 Error CommunicationWebClient+\<SendWithRetryAsync\>d__9`1 ApplyInternal 未能通过双向 SSL 连接到服务。 此问题可能是由启用了 SSL 检查的代理引起的。 [_workspaceApplicationSensorApiEndpoint=Unspecified/contoso.atp.azure.com:443 Thumbprint=7C039DA47E81E51F3DA3DF3DA7B5E1899B5B4AD0]`

原因:

SystemDefaultTlsVersionsSchUseStrongCrypto 注册表值未设置为默认值 1 时,可能会导致此问题。

解决方法:

验证 SchUseStrongCryptoSystemDefaultTlsVersions 注册表项是否设置为 1:


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319] 
"SystemDefaultTlsVersions"=dword:00000001
"SchUseStrongCrypto"=dword:00000001
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319]
 
"SystemDefaultTlsVersions"=dword:00000001
"SchUseStrongCrypto"=dword:00000001

在安装了 KB5009557 的 Windows Server 2019 或具有强化 EventLog 权限的服务器上安装传感器时出现的问题

安装传感器可能会失败并显示错误消息:

System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.

解决方法:

这个问题有两种可能的解决方法:

  1. 使用 PSExec 安装传感器:

    psexec -s -i "C:\MDI\Azure ATP Sensor Setup.exe"
    
  2. 安装传感器时,将计划任务配置为作为 LocalSystem 运行。 要使用的命令行语法在 Defender for Identity传感器无提示安装中有所提及。

由于证书管理客户端的原因,传感器安装失败

如果传感器安装失败,并且 Microsoft.Tri.Sensor.Deployment.Deployer.log 文件包含类似于以下内容的条目:

2022-07-15 03:45:00.0000 Error IX509CertificateRequestCertificate2 Deployer failed [arguments=128Ve980dtms0035h6u3Bg==] System.Runtime.InteropServices.COMException (0x80090008): CertEnroll::CX509CertificateRequestCertificate::Encode: Invalid algorithm specified. 0x80090008 (-2146893816 NTE_BAD_ALGID)

原因:

当证书管理客户端(如 Entrust Entelligence 安全提供程序 (EESP))阻止传感器安装在计算机上创建自签名证书时,可能会导致该问题。

解决方法:

卸载证书管理客户端,安装 Defender for Identity 传感器,然后重新安装证书管理客户端。

注意

自签名证书每 2 年续订一次,如果证书管理客户端阻止创建自签名证书,则自动续订过程可能会失败。 这将导致传感器停止与后端通信,需要使用上述解决方法重新安装传感器。

由于网络连接问题,传感器安装失败

如果传感器安装失败时出现错误代码 0x80070643,并且安装日志文件包含类似于以下内容的条目:

[22B8:27F0][2016-06-09T17:21:03]e000: Error 0x80070643: Failed to install MSI package.

原因:

当安装过程无法访问 Defender for Identity 云服务来注册传感器时,可能会导致此问题。

解决方法:

确保传感器可以直接或通过配置的代理浏览 *.atp.azure.com。 如果需要,请使用命令行为安装设置代理服务器:

"Azure ATP sensor Setup.exe" [ProxyUrl="http://proxy.internal.com"] [ProxyUserName="domain\proxyuser"] [ProxyUserPassword="ProxyPassword"]

有关详细信息,请参阅使用代理配置运行无提示安装

传感器服务无法运行,仍处于“启动”状态

事件查看器系统日志中将显示以下错误:

  • DLL "C:\Windows\system32\mscoree.dll" 中的服务."NETFramework" 的打开过程失败,错误代码为“拒绝访问”。 此服务的性能数据将不可用。
  • DLL "C:\Windows\System32\Secur32.dll" 中的服务."Lsa" 的打开过程失败,错误代码为“拒绝访问”。 此服务的性能数据将不可用。
  • DLL "C:\Windows\system32\wbem\wmiaprpl.dll" 中服务 "WmiApRpl" 的打开过程失败,错误代码为“设备未就绪”。 此服务的性能数据将不可用。

Microsoft.TriSensorError.log 将包含类似于以下内容的错误:

Microsoft.Tri.Sensor.DirectoryServicesClient.TryCreateLdapConnectionAsync(DomainControllerConnectionData domainControllerConnectionData, bool isGlobalCatalog, bool isTraversing) 2021-07-13 14:56:20.2976 Error DirectoryServicesClient Microsoft.Tri.Infrastructure.ExtendedException: Failed to communicate with configured domain controllers at new Microsoft.Tri.Sensor.DirectoryServicesClient(IConfigurationManager

原因:

NT Service\All Services 无权作为服务登录。

解决方法:

添加登录即服务的域控制器策略。 有关详细信息,请参阅验证 gMSA 帐户是否具有所需的权限

未创建工作区,因为 Microsoft Entra ID 中已存在具有相同名称的安全组

原因:

当 Defender for Identity 工作区许可证过期且在保留期结束时被删除,但 Microsoft Entra 组未删除时,可能会出现此问题。

解决方法:

  1. 转到 Azure 门户 - >Microsoft Entra ID ->
  2. 通过添加一个“ - old”后缀重命名以下三个组(其中 workspaceName 是工作区的名称):
    • “Azure ATP workspaceName 管理员”- >“Azure ATP workspaceName 管理员 - old”
    • “Azure ATP workspaceName 查看者”->“Azure ATP workspaceName 查看者 - old”
    • “Azure ATP workspaceName 用户”- >“Azure ATP workspaceName 用户 - old”
  3. 然后,在 Microsoft Defender 门户中,转到“设置 - >标识”部分,为 Defender for Identity 创建新工作区。

后续步骤