Adversaries may attempt to find local system groups and permission settings. The knowledge of local system permission groups can help adversaries determine which groups exist and which users belong to a particular group. Adversaries may use this information to determine which users have elevated permissions, such as the users found within the local administrators group.Commands such as
net localgroup
of the Net utility,dscl . -list /Groups
on macOS, andgroups
on Linux can list local groups.
-
Atomic Test #2 - Basic Permission Groups Discovery Windows (Local)
-
Atomic Test #3 - Permission Groups Discovery PowerShell (Local)
Permission Groups Discovery
Supported Platforms: macOS, Linux
if [ -x "$(command -v dscacheutil)" ]; then dscacheutil -q group; else echo "dscacheutil is missing from the machine. skipping..."; fi;
if [ -x "$(command -v dscl)" ]; then dscl . -list /Groups; else echo "dscl is missing from the machine. skipping..."; fi;
if [ -x "$(command -v groups)" ]; then groups; else echo "groups is missing from the machine. skipping..."; fi;
Basic Permission Groups Discovery for Windows. This test will display some errors if run on a computer not connected to a domain. Upon execution, domain information will be displayed.
Supported Platforms: Windows
net localgroup
net localgroup "Administrators"
Permission Groups Discovery utilizing PowerShell. This test will display some errors if run on a computer not connected to a domain. Upon execution, domain information will be displayed.
Supported Platforms: Windows
get-localgroup
Get-LocalGroupMember -Name "Administrators"