Accounts Discovery- DNA: DNAPR242I Cannot detect OS version for remote machine <machine>

Accounts Discovery- DNA: DNAPR242I Cannot detect OS version for remote machine <machine>

147
Created On 11/10/26 10:55 AM - Last Modified 11/10/26 15:57 PM


Symptom


When performing a DNA scan of Windows systems using the DNA Tool or Accounts Discovery, the machine scan of the target system may complete with the following error while trying to detect the OS of the target system:
DNAPR242I Cannot detect OS version for remote machine <machine address or IP>.

Along with the the above error, there is no other error to indicate any type of failure in connection or access to the target system.


Environment


9.10;10.0;10.1;10.2;10.3;10.4;10.5;10.6;10.7;10.8;10.9;10.10;11.1;11;11.2;11.3;11.4;11.5;11.6;11.7;12.0 This behavior has been seen when attempting to scan standalone systems using a scan account local to the target system, or domain joined systems that are also using a scan account that is local to the target system.

Cause


The behavior has been seen to be caused by restrictions enforced by Microsoft's UAC (User Access Control) feature on local accounts that are establishing remote sessions.

For more information how how UAC behaves with local account for remote sessions vs domain accounts see reference to Microsoft support materials:
(https://docs.microsoft.com/en-us/troubleshoot/windows-server/windows-security/user-account-control-and-remote-restriction)

DNA attempts to detect the OS by making a call to the target system and evaluating the return data.  In the case where the scan account is a local account, and UAC is enforced for remote connections, access is denied to the Services Manager, so the returned data from the call does not include any Service data.  While it includes no service data, it may include user and group data resulting in a situation where the connection did not fail; however, the needed information to make an OS determination is not available.

This behavior can be seen using the following PowerShell
$ErrorActionPreference = "Stop"
$target = Read-Host -Prompt "Enter FQDN or IP of target system"
$cred = Get-Credential
if (-Not $outpath) {$outpath = "c:\temp"}
$DirectoryEntry = New-Object System.DirectoryServices.DirectoryEntry ("WinNT://$target", $cred.UserName, $cred.GetNetworkCredential().Password)
$DirectoryEntry | Select-Object *
[pscustomobject]@{
    Users = $DirectoryEntry.Children | Where-Object {$_.SchemaClassName -eq "User"} | Measure | Select-Object -ExpandProperty Count
    Groups = $DirectoryEntry.Children | Where-Object {$_.SchemaClassName -eq "Group"} | Measure | Select-Object -ExpandProperty Count
    Services = $DirectoryEntry.Children | Where-Object {$_.SchemaClassName -eq "Service"} | Measure | Select-Object -ExpandProperty Count
}
Example Results:
OperatingSystem        : {Windows NT}
OperatingSystemVersion : {10.0}
Owner                  : {Windows User}
Division               : {}
ProcessorCount         : {Multiprocessor Free}
Processor              : {Intel64 Family 6 Model 63 Stepping 0}
Name                   : {<hostname/FQDN/IP>}
AuthenticationType     : Secure
Children               : {Administrator, DefaultAccount, Guest...}
Guid                   : {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
ObjectSecurity         :
NativeGuid             : {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
NativeObject           : System.__ComObject
Parent                 : WinNT://WORKGROUP
Password               :
Path                   : WinNT://<hostname/FQDN/IP>
Properties             : {OperatingSystem, OperatingSystemVersion, Owner, Division...}
SchemaClassName        : Computer
SchemaEntry            : System.DirectoryServices.DirectoryEntry
UsePropertyCache       : True
Username               : <username>
Options                :
Site                   :
Container              : 
Users    : 4
Groups   : 24
Services : 0
Note in the above sample output Users and Groups are returned, but no Services are returned.

Performing a Network Trace during the running of the script, it can be seen that an access denied is returned attempting to open the Services Manager.
262    12:27:01.566682    <source ip>    <dest ip>   SVCCTL    254    0x840a (33802)    OpenSCManagerW request, <dest ip>
263    12:27:01.566992    <source ip>    <dest ip>    SVCCTL    218    0x7fe1 (32737)    OpenSCManagerW response, Access denied
This access denied is happening because by default UAC prevents administrative privileges from being granted to "local" accounts accessing the target system through a remote session.  Since administrative privileges are required to access the Services Manager, this is being denied.


Resolution


There are a few ways to address this depending on the environment where the issue is experienced.
  1. If the target system is a Domain joined system, then a domain account can be used to perform the scan operations.  UAC does not filter out administrative privileges for Domain Accounts that are members of the local administrator group.
  2. If the target is Domain joined, but it is required to use a local account, or the target is not Domain joined, UAC policy can be set to allow administrative privileges for remote sessions of local accounts, or UAC can be disabled.  UAC is an important security feature of Microsoft Windows, so it is not recommended to completely disable UAC.
    1. To Allow administrative privileges for remote sessions of local accounts, see the below Microsoft article on utilizing the "LocalAccountTokenFilterPolicy" setting
    2. In Local Security Policy, disable UAC (not recommended): Set "User Account Control: Run all administrators in Admin Approval Mode" to Disabled
For more information how how UAC behaves with local account for remote sessions vs domain accounts see reference to Microsoft support materials:
(https://docs.microsoft.com/en-us/troubleshoot/windows-server/windows-security/user-account-control-and-remote-restriction)


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj00000013S7CAI&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail