2022-09-23 22:57:18 +00:00
# T1069.001 - Permission Groups Discovery: Local Groups
2020-06-18 01:57:35 +00:00
2026-02-18 16:46:29 +00:00
## Description from ATT&CK
2025-02-13 22:03:40 +00:00
2026-02-18 16:55:45 +00:00
> 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 <code>net localgroup</code> of the [Net](https://attack.mitre.org/software/S0039) utility, <code>dscl . -list /Groups</code> on macOS, and <code>groups</code> on Linux can list local groups.
2025-02-13 22:03:40 +00:00
2026-02-18 16:46:29 +00:00
[Source ](https://attack.mitre.org/techniques/T1069/001 )
2020-06-18 01:57:35 +00:00
## Atomic Tests
2026-02-18 16:46:29 +00:00
- [Atomic Test #1: Permission Groups Discovery (Local) ](#atomic-test-1-permission-groups-discovery-local )
- [Atomic Test #2: Basic Permission Groups Discovery Windows (Local) ](#atomic-test-2-basic-permission-groups-discovery-windows-local )
- [Atomic Test #3: Permission Groups Discovery PowerShell (Local) ](#atomic-test-3-permission-groups-discovery-powershell-local )
- [Atomic Test #4: SharpHound3 - LocalAdmin ](#atomic-test-4-sharphound3---localadmin )
- [Atomic Test #5: Wmic Group Discovery ](#atomic-test-5-wmic-group-discovery )
- [Atomic Test #6: WMIObject Group Discovery ](#atomic-test-6-wmiobject-group-discovery )
- [Atomic Test #7: Permission Groups Discovery for Containers- Local Groups ](#atomic-test-7-permission-groups-discovery-for-containers--local-groups )
2020-06-18 01:57:35 +00:00
2026-02-18 16:46:29 +00:00
### Atomic Test #1: Permission Groups Discovery (Local)
2020-06-18 01:57:35 +00:00
2021-06-24 15:16:54 +00:00
Permission Groups Discovery
2021-06-24 17:04:33 +00:00
2023-11-06 22:42:54 +00:00
**Supported Platforms: ** Linux, macOS
2020-06-18 01:57:35 +00:00
2026-02-18 16:46:29 +00:00
**auto_generated_guid: ** `952931a4-af0b-4335-bbbe-73c8c5b327ae`
2020-06-18 01:57:35 +00:00
2026-02-18 16:46:29 +00:00
#### Attack Commands: Run with `sh`!
2020-06-18 01:57:35 +00:00
``` sh
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 ;
2021-12-07 17:01:53 +00:00
if [ -x " $( command -v id) " ] ; then id; else echo "id is missing from the machine. skipping..." ; fi ;
if [ -x " $( command -v getent) " ] ; then getent group; else echo "getent is missing from the machine. skipping..." ; fi ;
cat /etc/group
2020-06-18 01:57:35 +00:00
```
2026-02-18 16:46:29 +00:00
### Atomic Test #2: Basic Permission Groups Discovery Windows (Local)
2020-06-18 01:57:35 +00:00
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.
2021-06-24 17:04:33 +00:00
2020-06-18 01:57:35 +00:00
**Supported Platforms: ** Windows
2026-02-18 16:46:29 +00:00
**auto_generated_guid: ** `1f454dd6-e134-44df-bebb-67de70fb6cd8`
2020-06-18 01:57:35 +00:00
2026-02-18 16:46:29 +00:00
#### Attack Commands: Run with `command_prompt`!
2020-06-18 01:57:35 +00:00
``` cmd
net localgroup
net localgroup " Administrators "
```
2026-02-18 16:46:29 +00:00
### Atomic Test #3: Permission Groups Discovery PowerShell (Local)
2020-06-18 01:57:35 +00:00
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.
2021-06-24 17:04:33 +00:00
2020-06-18 01:57:35 +00:00
**Supported Platforms: ** Windows
2026-02-18 16:46:29 +00:00
**auto_generated_guid: ** `a580462d-2c19-4bc7-8b9a-57a41b7d3ba4`
2020-06-18 01:57:35 +00:00
2026-02-18 16:46:29 +00:00
#### Attack Commands: Run with `powershell`!
2020-06-18 01:57:35 +00:00
``` powershell
get-localgroup
Get-LocalGroupMember -Name " Administrators "
```
2026-02-18 16:46:29 +00:00
### Atomic Test #4: SharpHound3 - LocalAdmin
2020-06-18 01:57:35 +00:00
2021-09-10 15:56:41 +00:00
This module runs the Windows executable of SharpHound in order to remotely list members of the local Administrators group (SAMR)
**Supported Platforms: ** Windows
2026-02-18 16:46:29 +00:00
**auto_generated_guid: ** `e03ada14-0980-4107-aff1-7783b2b59bb1`
2021-09-10 15:56:41 +00:00
2026-02-18 16:46:29 +00:00
#### Inputs
2021-09-10 15:56:41 +00:00
| Name | Description | Type | Default Value |
|------|-------------|------|---------------|
2021-12-13 21:10:58 +00:00
| domain | FQDN of the targeted domain | string | $env:UserDnsDomain|
2023-06-15 16:17:12 +00:00
| sharphound_path | SharpHound Windows executable | path | PathToAtomicsFolder\ ;..\ ;ExternalPayloads\ ;SharpHound.exe|
2021-09-10 15:56:41 +00:00
| output_path | Output for SharpHound | path | $env:TEMP\ ;SharpHound\ ;|
2026-02-18 16:46:29 +00:00
#### Attack Commands: Run with `powershell`!
2021-09-10 15:56:41 +00:00
``` powershell
New-Item -Path " #{output_path} " -ItemType Directory > $null
& " #{sharphound_path} " -d " #{domain} " - -CollectionMethod LocalAdmin - -NoSaveCache - -OutputDirectory " #{output_path} "
```
2026-02-18 16:46:29 +00:00
#### Cleanup Commands
2021-09-10 15:56:41 +00:00
``` powershell
2021-12-09 18:42:48 +00:00
Remove-Item -Recurse #{output_path} -ErrorAction Ignore
2021-09-10 15:56:41 +00:00
```
2026-02-18 16:46:29 +00:00
#### Dependencies: Run with `powershell`!
2021-09-10 15:56:41 +00:00
##### Description: SharpHound binary must exist on disk and at specified location (#{sharphound_path}).
And the computer must be domain joined (implicit authentication).
2026-02-18 16:46:29 +00:00
###### Check Prereq Commands
2021-09-10 15:56:41 +00:00
``` powershell
if ( Test-Path " #{sharphound_path} " ) { exit 0 } else { exit 1 }
```
2026-02-18 16:46:29 +00:00
###### Get Prereq Commands
2021-09-10 15:56:41 +00:00
``` powershell
2023-06-15 16:17:12 +00:00
New-Item -Type Directory " PathToAtomicsFolder\..\ExternalPayloads\ " -ErrorAction Ignore -Force | Out-Null
2021-09-10 15:56:41 +00:00
Invoke-WebRequest " https://github.com/BloodHoundAD/BloodHound/blob/e062fe73d73c015dccb37fae5089342d009b84b8/Collectors/SharpHound.exe?raw=true " -OutFile " #{sharphound_path} "
```
2026-02-18 16:46:29 +00:00
### Atomic Test #5: Wmic Group Discovery
2021-09-10 15:56:41 +00:00
2021-09-15 01:29:34 +00:00
Utilizing wmic.exe to enumerate groups on the local system. Upon execution, information will be displayed of local groups on system.
**Supported Platforms: ** Windows
2026-02-18 16:46:29 +00:00
**auto_generated_guid: ** `7413be50-be8e-430f-ad4d-07bf197884b2`
2021-09-15 01:29:34 +00:00
2026-02-18 16:46:29 +00:00
#### Attack Commands: Run with `command_prompt`!
2021-09-15 01:29:34 +00:00
2023-10-10 17:04:13 +00:00
``` cmd
wmic group get name
2021-09-15 01:29:34 +00:00
```
2026-02-18 16:46:29 +00:00
### Atomic Test #6: WMIObject Group Discovery
2021-09-15 01:29:34 +00:00
Utilizing PowerShell cmdlet - get-wmiobject, to enumerate local groups on the endpoint. Upon execution, Upon execution, information will be displayed of local groups on system.
**Supported Platforms: ** Windows
2026-02-18 16:46:29 +00:00
**auto_generated_guid: ** `69119e58-96db-4110-ad27-954e48f3bb13`
2021-09-15 01:29:34 +00:00
2026-02-18 16:46:29 +00:00
#### Attack Commands: Run with `powershell`!
2021-09-15 01:29:34 +00:00
``` powershell
Get-WMIObject Win32_Group
```
2026-02-18 16:46:29 +00:00
### Atomic Test #7: Permission Groups Discovery for Containers- Local Groups
2021-09-15 01:29:34 +00:00
2023-04-13 20:42:55 +00:00
Attackers may try to obtain a list of services that are operating on remote hosts and local network infrastructure devices, in order to identify potential vulnerabilities that can be exploited through remote software attacks. They typically use tools to conduct port and vulnerability scans in order to obtain this information.
**Supported Platforms: ** Containers
2026-02-18 16:46:29 +00:00
**auto_generated_guid: ** `007d7aa4-8c4d-4f55-ba6a-7c965d51219c`
2023-04-13 20:42:55 +00:00
2026-02-18 16:46:29 +00:00
#### Attack Commands: Run with `sh`!
2023-04-13 20:42:55 +00:00
``` sh
docker build -t t1069 $PathtoAtomicsFolder /T1069.001/src/
2024-09-10 14:48:25 +00:00
docker run --name t1069_container --rm -d -t t1069
2023-04-13 20:42:55 +00:00
docker exec t1069_container ./test.sh
```
2026-02-18 16:46:29 +00:00
#### Cleanup Commands
2023-04-13 20:42:55 +00:00
``` sh
docker stop t1069_container
docker rmi -f t1069
```
2026-02-18 16:46:29 +00:00
#### Dependencies: Run with `sh`!
2023-04-13 20:42:55 +00:00
##### Description: Verify docker is installed.
2026-02-18 16:46:29 +00:00
###### Check Prereq Commands
2023-04-13 20:42:55 +00:00
``` sh
which docker
```
2026-02-18 16:46:29 +00:00
###### Get Prereq Commands
2023-04-13 20:42:55 +00:00
``` sh
if [ "" = = "`which docker`" ] ; then echo "Docker Not Found" ; if [ -n "`which apt-get`" ] ; then sudo apt-get -y install docker ; elif [ -n "`which yum`" ] ; then sudo yum -y install docker ; fi ; else echo "Docker installed" ; fi
```
2026-02-18 16:46:29 +00:00
2023-04-13 20:42:55 +00:00
##### Description: Verify docker service is running.
2026-02-18 16:46:29 +00:00
###### Check Prereq Commands
2023-04-13 20:42:55 +00:00
``` sh
sudo systemctl status docker --no-pager
```
2026-02-18 16:46:29 +00:00
###### Get Prereq Commands
2023-04-13 20:42:55 +00:00
``` sh
sudo systemctl start docker
```