Repository navigation
[New Rule] macOS Guest Account or Guest Access Enabled & Local Account Creation via Sysadminctl - #7193
Open
litemars wants to merge 7 commits into
Open
[New Rule] macOS Guest Account or Guest Access Enabled & Local Account Creation via Sysadminctl#7193litemars wants to merge 7 commits into
litemars wants to merge 7 commits into
Conversation
|
Starting the rule tests ... |
litemars
requested review from
Aegrah,
Samirbous,
bryans3c and
terrancedejesus
November 24, 2026 13:33
|
Starting the rule tests ... |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The defaults branch can generate false guest-access alerts for unrelated application preferences because its keys are not restricted to the relevant system preference domains or plist paths.
1 open issue
What changed in this PR
Adds two macOS persistence detections using Elastic Defend process events, extending account-abuse coverage beyond the existing dscl and dseditgroup rule.
Changes:
- Detects local account creation through
sysadminctl -addUser. - Detects Guest account and SMB/AFP guest-access enablement through
sysadminctlordefaults. - Includes management-agent exclusions, investigation guides, setup instructions, and MITRE ATT&CK mappings.
| File | Description |
|---|---|
rules/macos/persistence_local_account_creation_via_sysadminctl.toml |
Adds detection and investigation guidance for local account creation. |
rules/macos/persistence_guest_account_enabled_via_command_line.toml |
Adds detection and investigation guidance for Guest account and guest-sharing enablement. |
Review effort: Balanced
bryans3c
reviewed
Dec 1, 2026
Co-authored-by: Bryan Porras <bryan.porras@elastic.co>
Co-authored-by: Bryan Porras <bryan.porras@elastic.co>
|
Starting the rule tests ... |
|
Starting the rule tests ... |
Co-authored-by: Bryan Porras <bryan.porras@elastic.co>
|
Starting the rule tests ... |
|
Starting the rule tests ... |
|
Starting the rule tests ... |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary - What I changed
Adds two new macOS detection rules covering local and default account abuse for persistence. The existing macOS SIEM rule
Potential Admin Group Account Additiononly coversdscl/dseditgroup, notsysadminctl.1. Local Account Creation via Sysadminctl
Detects creation of a local user account via
sysadminctl -addUser. Adversaries use this to create a backdoor account, often with-admin(admin group membership) and a clear-text-password.Emulating activity
2. macOS Guest Account or Guest Access Enabled
Detects enabling of the passwordless built-in Guest account, or unauthenticated SMB/AFP guest file sharing, via
sysadminctlordefaults.Emulating activity