[New Rules] macOS Unified Logs TCC Detection Rules#5870
[New Rules] macOS Unified Logs TCC Detection Rules#5870DefSecSentinel wants to merge 17 commits intomainfrom
Conversation
Adds 5 new alerting rules leveraging macOS Unified Logs TCC (Transparency, Consent, and Control) telemetry from the com.apple.TCC subsystem to detect suspicious permission access and changes. New rules: - Full Disk Access Denied via TCC (T1005) - Screen Capture Access Denied via TCC (T1113) - Camera or Microphone Access Denied via TCC (T1125, T1123) - TCC Permission Probing Without Prompt Entitlement (T1518.001) - TCC Privacy Permission Change Detected (T1562.001) Also adds message field as keyword in non-ECS schema for the logs-unified_logs.log-* index pattern to support EQL validation. Relates to: elastic/ia-trade-team#847 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
⛔️ Test failed Results
|
Rule: New - GuidelinesThese guidelines serve as a reminder set of considerations when proposing a new rule. Documentation and Context
Rule Metadata Checks
New BBR Rules
Testing and Validation
|
|
⛔️ Test failed Results
|
|
⛔️ Test failed Results
|
terrancedejesus
left a comment
There was a problem hiding this comment.
A few thoughts and suggestions. Logic seems sound!
| [metadata] | ||
| creation_date = "2026/03/23" | ||
| integration = ["unified_logs"] | ||
| maturity = "development" |
There was a problem hiding this comment.
May want to check other PRs but this says development, not production. Won't release if not production.
rules/integrations/unified_logs/collection_denied_camera_or_microphone_access_via_tcc.toml
Outdated
Show resolved
Hide resolved
| rule_id = "a96b3d0f-beb1-413d-b498-114ad6d26965" | ||
| severity = "medium" | ||
| tags = [ | ||
| "Domain: macOS", |
There was a problem hiding this comment.
I think this should be endpoint as the domain.
OS would be macOS.
rules/integrations/unified_logs/discovery_denied_screen_capture_via_tcc.toml
Outdated
Show resolved
Hide resolved
Switch from EQL to KQL (query type) since message is match_only_text and EQL doesn't support text fields. Use unified_log.subsystem and unified_log.category keyword fields for efficient filtering. Update index pattern and event.dataset to match actual integration naming. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
⛔️ Test failed Results
|
The ingest pipeline normalizes event.dataset to "unifiedlogs.log" regardless of the data stream name. Update all rules and index patterns accordingly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
⛔️ Test failed Results
|
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
⛔️ Test failed Results
|
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
⛔️ Test failed Results
|
data_stream.dataset is "unifiedlogs.unifiedlogs" but event.dataset is set to "unifiedlogs.log" by the integration. Rules query on event.dataset so must use the correct value. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
⛔️ Test failed Results
|
KQL cannot query the message field (match_only_text type with no keyword sub-field). ES|QL's LIKE operator works correctly on text fields. Converted all 5 TCC rules to ES|QL with METADATA and KEEP. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
⛔️ Test failed Results
|
user.name, process.name, process.executable don't exist in the unifiedlogs index. Removed from KEEP to prevent query errors. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
⛔️ Test failed Results
|
event.dataset is unifiedlogs.log which maps to package=unifiedlogs, integration=log. Schema needs a 'log' dataset key. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
⛔️ Test failed Results
|
Testing & Validation UpdateAll TCC detection rules have been validated end-to-end against live unified log data on the trade lab cluster ( Changes Made During Testing
Emulation Commands (run on macOS host with Unified Logs integration)Full Disk Access Denied: ls ~/Library/Mail/ 2>/dev/null
cat ~/Library/Safari/History.db 2>/dev/nullScreen Capture Denied: screencapture -x /tmp/test_capture.png
# Click Deny if promptedPermission Probing (no prompt entitlement): python3 -c "
import ctypes, ctypes.util
appservices = ctypes.cdll.LoadLibrary(ctypes.util.find_library('ApplicationServices'))
result = appservices.AXIsProcessTrusted()
print(f'Accessibility trusted: {result}')
"TCC Permission Change: tccutil reset Camera com.apple.TerminalIntegration Prerequisites
Validation Results
|
Unified Logs integration is now GA. Rules are validated and ready for production use. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
⛔️ Test failed Results
|
- Flatten duplicate Collection tactic in camera/mic rule - Rename FDA and screen capture filenames: discovery_ -> collection_ - Fix FDA tactic tag: Discovery -> Collection - Add "Resources: Investigation Guide" tag to all TCC rules Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
⛔️ Test failed Results
|
|
⛔️ Test failed Results
|
Summary
com.apple.TCCsubsystem with categoryaccessand work without private data enablementNew Alerting Rules
kTCCServiceSystemPolicyAllFiles+auth_value=0kTCCServiceScreenCapture+auth_value=0kTCCServiceCamera/kTCCServiceMicrophone+auth_value=0does not allow promptingpublishAccessChangedEventDesign Notes
message likefor pattern matching on rawmessagefieldmessage: keywordtonon-ecs-schema.jsonforlogs-unified_logs.log-*to support EQL validation (same fix as Apple Events PR)developmentgiven the beta integration statusRelates to: https://github.com/elastic/ia-trade-team/issues/847
Test plan
detection_rules validate-rulesubsystem=="com.apple.TCC" AND category=="access")🤖 Generated with Claude Code