Detectionmediumtest

User Added To Admin Group Via Sysadminctl

Detects attempts to create and add an account to the admin group via "sysadminctl"

Open in Detection LabConvert ruleBuild Package
Sohan G (D4rkCiph3r)Created 2023-03-19652c098d-dc11-4ba6-8566-c20e89042f2bmacos
Log Source
macOSProcess Creation
ProductmacOS← raw: macos
CategoryProcess Creation← raw: process_creation

Events generated when a new process is spawned on the system. Covers command-line arguments, parent/child relationships, and process metadata.

Detection Logic
Detection Logic1 selector
detection:
    selection:
        # Creates and adds new user to admin group
        Image|endswith: '/sysadminctl'
        CommandLine|contains|all:
            - ' -addUser '
            - ' -admin '
    condition: selection
False Positives

Legitimate administration activities

Related Rules
Similar

0c1ffcf9-efa9-436e-ab68-23a9496ebf5b

Rule not found
Rule Metadata
Rule ID
652c098d-dc11-4ba6-8566-c20e89042f2b
Status
test
Level
medium
Type
Detection
Created
2023-03-19
Path
rules/macos/process_creation/proc_creation_macos_sysadminctl_add_user_to_admin_group.yml
Raw Tags
attack.persistenceattack.initial-accessattack.privilege-escalationattack.stealthattack.t1078.003
View on GitHub