T1553.001
Gatekeeper Bypass
Adversaries bypass macOS Gatekeeper to execute untrusted applications without triggering security prompts. Gatekeeper enforces code signing and app notarization requirements. Bypass techniques include: removing the quarantine extended attribute (xattr -d com.apple.quarantine), using archive formats (.zip, .dmg, .iso) that strip quarantine on extraction, exploiting the first-launch trust mechanism, using DYLD_INSERT_LIBRARIES for code injection into trusted apps, and abusing symlinks to confuse Gatekeeper path checks. Malware widely abuses these techniques to run on macOS without triggering security warnings.
Microsoft Sentinel / Defender
kusto
// T1553.001 — Gatekeeper Bypass detection (macOS)
// Part 1: Detect xattr removal of quarantine attribute
let QuarantineRemoval = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName =~ "xattr"
| where ProcessCommandLine has_any ("-d com.apple.quarantine", "--delete com.apple.quarantine",
"-c ", "-r ", "-dr")
| extend DetectionType = "Quarantine_Attribute_Removed"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine, DetectionType;
// Part 2: Detect spctl operations to add trusted sources or modify policy
let SpctlBypass = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName =~ "spctl"
| where ProcessCommandLine has_any ("--add", "--enable", "--master-disable",
"--global-disable", "assessments")
| extend DetectionType = "Spctl_Gatekeeper_Modified"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, DetectionType;
// Part 3: Detect DYLD injection into Gatekeeper-trusted processes
let DYLDInject = DeviceProcessEvents
| where Timestamp > ago(24h)
| where ProcessCommandLine has_any ("DYLD_INSERT_LIBRARIES", "DYLD_FRAMEWORK_PATH",
"DYLD_LIBRARY_PATH")
| extend DetectionType = "DYLD_Injection"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, DetectionType;
// Part 4: Detect writes to quarantine database removal
let QuarantineDB = DeviceFileEvents
| where Timestamp > ago(24h)
| where FileName =~ "QuarantineEventsV2" or
FolderPath has "com.apple.LaunchServices"
| where ActionType in ("FileModified", "FileDeleted")
| where InitiatingProcessFileName !in~ ("quarantine", "tccd", "launchservicesd")
| extend DetectionType = "Quarantine_Database_Modified"
| project Timestamp, DeviceName, AccountName, FileName, FolderPath,
InitiatingProcessFileName, DetectionType;
union QuarantineRemoval, SpctlBypass, DYLDInject, QuarantineDB
| sort by Timestamp desc high severity
high confidence
Data Sources
Process: Process Creation File: File Modification Microsoft Defender for Endpoint (macOS)
Required Tables
DeviceProcessEvents DeviceFileEvents
False Positives
- Developers removing quarantine from their own development builds for testing
- Enterprise IT deploying applications via MDM or managed distribution where quarantine removal is part of the deployment process
- Software build systems removing quarantine from build artifacts before packaging
- System administrators disabling Gatekeeper temporarily for authorized software installation
Last updated: 2026-04-13 Research depth: deep
Unlock Pro Content
Get the full detection package for T1553.001 including response playbook, investigation guide, and atomic red team tests.
Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance