Computer status logfile
The computer status logfile, namedcompstatus.csv contains information about the collection results for each system in the collection’s scope.
-
SharpHound Enterprise: Generates one
compstatus.csvper local collection job (Sessions and/or Local Groups) and stores it within thelog_archivedirectory on the SharpHound Enterprise server. The default location for this is%APPDATA%\\Roaming\\BloodHound Enterprise- that is, App Data for the service account running the SharpHound Enterprise service. However, you may override this location withinsettings.json, see SharpHound Enterprise Local Configuration. -
SharpHound Community Edition: Will generate
compstatus.csvwhen run with theDumpComputerStatusflag.
Analyzing compstatus.csv
The first step in troubleshooting local collection issues is by identifying and understanding errors incompstatus.csv.
BloodHound Enterprise customers can reach out to their Technical Account Manager (TAM) for support in this analysis.
Alternatively, you may do your own troubleshooting by utilizing the below example PowerShell commands and the process described below the code block.
Domain computer enumeration
First, SharpHound queries a Domain Controller to list every enabled computer object in the domain. Every enumerated system will be represented by one or more lines incompstatus.csv.
ComputerAvailability
Next, SharpHound performs theComputerAvailability check, which filters out inactive computers, so that SharpHound only connects to active computers to collect Local Groups and Sessions later on in the process.
Each active computer object is checked to see whether it is a Windows OS. Local collection is not supported for any OS besides Windows.
If the system is not a Windows OS, SharpHound will not perform additional checks on the system.
-
If a system fails this check,
compstatus.csvwill contain a line for the system with the resultTask = ComputerAvailabilityandStatus = NonWindowsOS. -
If a Windows system is incorrectly marked with
NonWindowsOS; ensure that the system’s AD computer object attribute[operatingSystem](https://learn.microsoft.com/en-us/windows/win32/adschema/a-operatingsystem)is set to a string representing a Windows OS.
- Check if the system has changed it’s password within the duration set for
ComputerPasswordResetWindowin SharpHound’ssettings.json.- If a system fails this check,
compstatus.csvwill contain a line for the system with the resultTask = ComputerAvailabilityandStatus = PwdLastSetOutOfRange. - If an active system is incorrectly marked with
PwdLastSetOutOfRange, try one of the following:- Ensure that the
ComputerPasswordResetWindowkey in SharpHound’ssettings.jsonhas a value corresponding to the computer’s security policy[Domain member: Maximum machine account password age](https://learn.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/domain-member-maximum-machine-account-password-age). By default this value is 60 days. A description of theComputerPasswordResetWindowvalue is found the article SharpHound Enterprise Local Configuration. - Ensure that the system’s password is changing as expected: Confirm that the system’s AD computer object attribute
[pwdLastSet](https://learn.microsoft.com/en-us/windows/win32/adschema/a-pwdlastset)has been changed within the period defined in the computer’s security policyDomain member: Maximum machine account password age
- Ensure that the
- If a system fails this check,
- Check if the system has TCP port 445 (SMB) open.
- If a system fails this check,
compstatus.csvwill contain a line for the system with the resultTask = ComputerAvailabilityandStatus = PortNotOpen. - If an active system is incorrectly marked with
PortNotOpen, try one of the following:- Ensure that the system running SharpHound can reach the system checked on TCP port 445. From the SharpHound system, run:
- If a system fails this check,
<HOST> with the system’s DNS name as seen in compstatus.csv).
- Ensure that the system running SharpHound can reach the system checked on TCP port 445 within 500ms. From the SharpHound system, run:
<HOST> with the system’s DNS name as seen in compstatus.csv).
- Ensure that the system’s DNS name found in
compstatus.csvcan be resolved, and matches the system’s DNS name in Active Directory. From the SharpHound system, check the name can be resolved by running:
<HOST> with the system’s DNS name as seen in compstatus.csv).
- Ensure that a network layer above TCP (e.g., SMB) is not being blocked by a security solution, such as an IDPS.
compstatus.csv will contain a line for it with the result Task = ComputerAvailability and Status = Success.
Next, SharpHound will start the actual collection of Sessions and/or Local Groups.
Local Groups
This collection gathers two types of data points:- Local group memberships
- User Rights Assignment
SamConnect.
- If unsuccessful,
compstatus.csvwill contain a line for the system with the resultTask = SamConnectand a status depending on the error type.Status = -1073610725means SharpHound account is not in the system’s local administrators group.Status = StatusRpcServerUnavailablemeans SharpHound cannot access RPC or SMB on the system. Ensure that the system running SharpHound can reach the system checked on SMB.
- If successful, SharpHound continues with the method
GetMembersInAliasas detailed below.
GetMembersInAlias.
- If unsuccessful,
compstatus.csvwill contain a line for the system with the resultTask = GetMembersInAliasand a status depending on the error type. - If successful
compstatus.csvwill contain one line per computer in system with the resultTask = GetMembersInAlias - <LOCAL GROUP NAME>and “Status = Success’
LSAOpenPolicy.
- If unsuccessful,
compstatus.csvwill contain a line for the system with the resultTask = LSAOpenPolicyand a status depending on the error type.Status = StatusRpcServerUnavailablemeans SharpHound cannot access RPC or SMB on the system. Ensure that the system running SharpHound can reach the system via SMB.Status = StatusAccessDeniedmeans SharpHound account is not in the system’s local administrators group.
- If successful, SharpHound continues with the method
LSAEnumerateAccountsWithUserRightas detailed below.
LSAEnumerateAccountsWithUserRight.
- If unsuccessful,
compstatus.csvwill contain a line for the system with the resultTask = LSAEnumerateAccountsWithUserRightand a status depending on the error type.Status = StatusAccessDeniedmeans SharpHound account is not in the Local Administrators group.
- If successful,
compstatus.csvwill contain one line per local group in system with the resultTask = LSAEnumerateAccountsWithUserRightand “Status = Success’
Sessions
This collection gathers logon sessions via RPC withNetWkstaUserEnum.
- If unsuccessful,
compstatus.csvwill contain a line for the system with the resultTask = NetWkstaUserEnumand a status depending on the error type.Status = ErrorAccessDeniedmeans SharpHound account is not in the Local Administrators group.Status = 53means SharpHound cannot access RPC or SMB on the system. Ensure that the system running SharpHound can reach the system via SMB.
- If successful
compstatus.csvwill contain one line per local group with the resultTask = NetWkstaUserEnumand “Status = Success’