Repository navigation
Conversation
|
Starting the rule tests ... |
There was a problem hiding this comment.
🟡 Changes recommended
Generic path exclusions allow unsigned, attacker-controlled executables to unload security tools without alerting, creating a critical detection bypass.
1 open issue
What changed in this PR
Adds a macOS Elastic Defend detection rule for attempts to stop or disable third-party security software, addressing an Atomic Red Team coverage gap.
Changes:
- Detects security-agent unloads through
launchctland tampering throughmdatp,falconctl, andsentinelctl. - Adds parent-process exclusions to reduce maintenance-related alerts.
- Includes investigation and setup guidance with MITRE ATT&CK T1562.001 mapping.
| File | Description |
|---|---|
rules/macos/defense_evasion_security_software_unload_via_launchctl.toml |
Adds the EQL detection, exclusions, rule metadata, and investigation guide. |
Review effort: Balanced
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
Starting the rule tests ... |
|
Starting the rule tests ... |
| language = "eql" | ||
| license = "Elastic License v2" | ||
| name = "Third-Party Security Software Unload or Tamper via Launchctl" | ||
| note = """## Triage and analysis |
There was a problem hiding this comment.
The description and investigation guide say several things are excluded that the query doesn't exclude.
| process.parent.code_signature.trusted == true | ||
| ) and | ||
| not process.parent.executable like~ "/usr/local/jamf/bin/jamf" and | ||
| not process.Ext.effective_parent.executable like~ ( |
There was a problem hiding this comment.
Align MDM exclusions with other recent rules
There was a problem hiding this comment.
I would do an alignment of all the MDM solution a bit later this year, also for all the old rules
| process where host.os.type == "macos" and event.type == "start" and | ||
| ( | ||
| ( | ||
| process.name == "launchctl" and | ||
| process.args in ("unload", "bootout", "remove", "disable") and | ||
| process.command_line like~ ( | ||
| "*com.crowdstrike.*", "*com.carbonblack.*", "*com.vmware.carbonblack.*", "*com.microsoft.fresno*", | ||
| "*com.microsoft.wdav*", "*com.sentinelone.*", "*com.jamf.protect*", "*com.paloaltonetworks.cortex*", | ||
| "*com.trendmicro.*", "*com.sophos.*", "*com.eset.*", "*com.kaspersky.*", "*com.bitdefender.*", | ||
| "*com.malwarebytes.*", "*com.cylance.*", "*com.mcafee.*", "*com.trellix.*", "*com.symantec.*", | ||
| "*com.fortinet.fortiedr*", "*com.checkpoint.*", "*com.cybereason.*", "*com.huntress.*", | ||
| "*com.withsecure.*", "*com.f-secure.*", "*com.avast.*", "*com.avg.*", "*com.norton.*", | ||
| "*com.webroot.*", "*com.objective-see.*", "*com.facebook.osquery*", "*io.kolide.*", | ||
| "*com.fleetdm.*", "*com.absolute.*", "*at.obdev.*", "*com.opendns.*" | ||
| ) | ||
| ) or | ||
| (process.name == "mdatp" and process.args == "config" and process.args == "real-time-protection" and process.args == "disabled") or | ||
| (process.name == "falconctl" and process.args in ("unload", "uninstall")) or | ||
| (process.name == "sentinelctl" and process.args in ("unload", "unprotect", "uninstall")) | ||
| ) and | ||
| not ( | ||
| process.parent.executable like~ "/Library/PrivilegedHelperTools/*" and | ||
| process.parent.code_signature.trusted == true | ||
| ) and | ||
| not process.parent.executable like~ "/usr/local/jamf/bin/jamf" and | ||
| not process.Ext.effective_parent.executable like~ ( | ||
| "/usr/local/jamf/bin/jamf", | ||
| "/Library/Application Support/JAMF/Jamf.app/Contents/MacOS/JamfManagementService.app/Contents/MacOS/JamfManagementService", | ||
| "/Library/Application Support/JAMF/Jamf.app/Contents/MacOS/JamfDaemon.app/Contents/MacOS/JamfDaemon", | ||
| "/Library/Application Support/Mosyle/MosyleMDM.app/Contents/MacOS/MosyleMDM", | ||
| "/Library/Intune/Microsoft Intune Agent.app/Contents/MacOS/IntuneMdmDaemon", | ||
| "/Applications/NinjaRMMAgent/programfiles/ninjarmm-macagent" | ||
| ) |
There was a problem hiding this comment.
| process where host.os.type == "macos" and event.type == "start" and | |
| ( | |
| ( | |
| process.name == "launchctl" and | |
| process.args in ("unload", "bootout", "remove", "disable") and | |
| process.command_line like~ ( | |
| "*com.crowdstrike.*", "*com.carbonblack.*", "*com.vmware.carbonblack.*", "*com.microsoft.fresno*", | |
| "*com.microsoft.wdav*", "*com.sentinelone.*", "*com.jamf.protect*", "*com.paloaltonetworks.cortex*", | |
| "*com.trendmicro.*", "*com.sophos.*", "*com.eset.*", "*com.kaspersky.*", "*com.bitdefender.*", | |
| "*com.malwarebytes.*", "*com.cylance.*", "*com.mcafee.*", "*com.trellix.*", "*com.symantec.*", | |
| "*com.fortinet.fortiedr*", "*com.checkpoint.*", "*com.cybereason.*", "*com.huntress.*", | |
| "*com.withsecure.*", "*com.f-secure.*", "*com.avast.*", "*com.avg.*", "*com.norton.*", | |
| "*com.webroot.*", "*com.objective-see.*", "*com.facebook.osquery*", "*io.kolide.*", | |
| "*com.fleetdm.*", "*com.absolute.*", "*at.obdev.*", "*com.opendns.*" | |
| ) | |
| ) or | |
| (process.name == "mdatp" and process.args == "config" and process.args == "real-time-protection" and process.args == "disabled") or | |
| (process.name == "falconctl" and process.args in ("unload", "uninstall")) or | |
| (process.name == "sentinelctl" and process.args in ("unload", "unprotect", "uninstall")) | |
| ) and | |
| not ( | |
| process.parent.executable like~ "/Library/PrivilegedHelperTools/*" and | |
| process.parent.code_signature.trusted == true | |
| ) and | |
| not process.parent.executable like~ "/usr/local/jamf/bin/jamf" and | |
| not process.Ext.effective_parent.executable like~ ( | |
| "/usr/local/jamf/bin/jamf", | |
| "/Library/Application Support/JAMF/Jamf.app/Contents/MacOS/JamfManagementService.app/Contents/MacOS/JamfManagementService", | |
| "/Library/Application Support/JAMF/Jamf.app/Contents/MacOS/JamfDaemon.app/Contents/MacOS/JamfDaemon", | |
| "/Library/Application Support/Mosyle/MosyleMDM.app/Contents/MacOS/MosyleMDM", | |
| "/Library/Intune/Microsoft Intune Agent.app/Contents/MacOS/IntuneMdmDaemon", | |
| "/Applications/NinjaRMMAgent/programfiles/ninjarmm-macagent" | |
| ) | |
| process where host.os.type == "macos" and event.type == "start" and event.action == "exec" and | |
| ( | |
| ( | |
| process.name == "launchctl" and | |
| process.args in ("unload", "bootout", "remove", "disable", "kill") and | |
| process.command_line like~ ( | |
| "*com.crowdstrike.*", "*com.carbonblack.*", "*com.vmware.carbonblack.*", "*com.microsoft.fresno*", | |
| "*com.microsoft.wdav*", "*com.sentinelone.*", "*com.jamf.protect*", "*com.paloaltonetworks.cortex*", | |
| "*com.trendmicro.*", "*com.sophos.*", "*com.eset.*", "*com.kaspersky.*", "*com.bitdefender.*", | |
| "*com.malwarebytes.*", "*com.cylance.*", "*com.mcafee.*", "*com.trellix.*", "*com.symantec.*", | |
| "*com.fortinet.fortiedr*", "*com.checkpoint.*", "*com.cybereason.*", "*com.huntress.*", | |
| "*com.withsecure.*", "*com.f-secure.*", "*com.avast.*", "*com.avg.*", "*com.norton.*", | |
| "*com.webroot.*", "*com.objective-see.*", "*com.facebook.osquery*", "*io.kolide.*", | |
| "*com.fleetdm.*", "*com.absolute.*", "*at.obdev.*", "*com.opendns.*", | |
| "*com.cisco.amp*", "*com.rapid7.*", "*com.qualys.*", "*com.tenablesecurity.*", | |
| "*com.wazuh.*", "*com.netskope.*", "*com.zscaler.*" | |
| ) | |
| ) or | |
| ( | |
| (process.name == "mdatp" or process.executable like~ "/Applications/Microsoft Defender.app/*") and | |
| process.args == "config" and | |
| ( | |
| (process.args in ("real-time-protection", "behavior-monitoring", "tamper-protection") and process.args == "disabled") or | |
| (process.args == "passive-mode" and process.args == "enabled") | |
| ) | |
| ) or | |
| (process.name == "falconctl" and process.args in ("unload", "uninstall")) or | |
| (process.name == "sentinelctl" and process.args in ("unload", "unprotect", "uninstall")) | |
| ) and | |
| not ( | |
| process.parent.executable like~ "/Library/PrivilegedHelperTools/*" and | |
| process.parent.code_signature.trusted == true | |
| ) and | |
| not process.parent.executable == "/usr/local/jamf/bin/jamf" and | |
| not process.Ext.effective_parent.executable in ( | |
| "/Library/Application Support/JAMF/Jamf.app/Contents/MacOS/JamfDaemon.app/Contents/MacOS/JamfDaemon", | |
| "/Library/Application Support/JAMF/Jamf.app/Contents/MacOS/JamfManagementService.app/Contents/MacOS/JamfManagementService", | |
| "/usr/local/jamf/bin/jamf", | |
| "/opt/jc/bin/jumpcloud-agent", | |
| "/Library/Addigy/go-agent", | |
| "/Library/Addigy/auditor", | |
| "/Library/Intune/Microsoft Intune Agent.app/Contents/MacOS/IntuneMdmDaemon", | |
| "/Library/Application Support/Mosyle/MosyleMDM.app/Contents/MacOS/MosyleMDM", | |
| "/Library/Kandji/Kandji Agent.app/Contents/Helpers/Kandji Library Manager.app/Contents/MacOS/kandji-library-manager", | |
| "/Library/Iru/Iru Agent.app/Contents/Helpers/Iru Library Manager.app/Contents/MacOS/kandji-library-manager", | |
| "/usr/local/sbin/FileWave.app/Contents/MacOS/fwcld", | |
| "/Library/PrivilegedHelperTools/com.jigsaw24.Elevate24Helper.app/Contents/MacOS/com.jigsaw24.Elevate24Helper" | |
| ) |
| - Reset credentials for the user account involved if the activity originated from a compromised session. | ||
| """ | ||
| references = [ | ||
| "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1685/T1685.md", |
…hctl.toml Co-authored-by: Bryan Porras <bryan.porras@elastic.co>
…hctl.toml Co-authored-by: Bryan Porras <bryan.porras@elastic.co>
|
Starting the rule tests ... |
|
Starting the rule tests ... |

Summary - What I changed
Adds a macOS Elastic Defend rule that alerts when
launchctlunloads, boots out, removes, or disables a third-party EDR, consumer antivirus, or endpoint telemetry/device-control agent, or whenmdatp,falconctl, orsentinelctlis used to disable or unload that product. This covers defense evasion where an adversary with admin rights stops a security sensor before follow-on activity (T1562.001). The rule has been created to fill the gap of the ART test.