SV-271305r1109239_rule
V-271305
SRG-APP-000148-DB-000103
SQLI-22-007800
CAT II
10
Remove all shared accounts and computer accounts.
To remove users, run the following command for each user:
DROP USER [ IF EXISTS ] <user_name>;
Obtain the list of authorized SQL Server accounts in the system documentation.
Determine if any accounts are shared. A shared account is defined as a username and password that are used by multiple individuals to log in to SQL Server. Active Directory groups are not shared accounts as the group itself does not have a password.
Run the following query to return all server-level principals:
SELECT name
FROM sys.server_principals
WHERE type in ('U','S','E')
AND name NOT LIKE '%$'
If any of the returned accounts are shared, determine if individuals are first individually authenticated.
If individuals are not individually authenticated before using the shared account (e.g., by the operating system or possibly by an application making calls to the database), this is a finding.
The key is individual accountability. If this can be traced, this is not a finding.
If accounts are shared, determine if they are directly accessible to end users. If so, this is a finding.
Review contents of audit logs and data tables to confirm that the identity of the individual user performing the action is captured.
If shared identifiers are found and not accompanied by individual identifiers, this is a finding.
Execute the following query:
SELECT name
FROM sys.server_principals
WHERE type in ('U','S','E')
AND name LIKE '%$'
If users are returned, determine whether each user is a computer account.
Launch PowerShell.
Execute the following code:
Note: <name> represents the username portion of the user. For example, if the user is "CONTOSO\user1$", the username is "user1".
([ADSISearcher]"(&(ObjectCategory=Computer)(Name=<name>))").FindAll()
If no account information is returned, this is not a finding.
If account information is returned, this is a finding.
V-271305
False
SQLI-22-007800
Obtain the list of authorized SQL Server accounts in the system documentation.
Determine if any accounts are shared. A shared account is defined as a username and password that are used by multiple individuals to log in to SQL Server. Active Directory groups are not shared accounts as the group itself does not have a password.
Run the following query to return all server-level principals:
SELECT name
FROM sys.server_principals
WHERE type in ('U','S','E')
AND name NOT LIKE '%$'
If any of the returned accounts are shared, determine if individuals are first individually authenticated.
If individuals are not individually authenticated before using the shared account (e.g., by the operating system or possibly by an application making calls to the database), this is a finding.
The key is individual accountability. If this can be traced, this is not a finding.
If accounts are shared, determine if they are directly accessible to end users. If so, this is a finding.
Review contents of audit logs and data tables to confirm that the identity of the individual user performing the action is captured.
If shared identifiers are found and not accompanied by individual identifiers, this is a finding.
Execute the following query:
SELECT name
FROM sys.server_principals
WHERE type in ('U','S','E')
AND name LIKE '%$'
If users are returned, determine whether each user is a computer account.
Launch PowerShell.
Execute the following code:
Note: <name> represents the username portion of the user. For example, if the user is "CONTOSO\user1$", the username is "user1".
([ADSISearcher]"(&(ObjectCategory=Computer)(Name=<name>))").FindAll()
If no account information is returned, this is not a finding.
If account information is returned, this is a finding.
M
5677