Response playbooks, investigation guides, and Atomic Red Team tests are Pro-only. Upgrade to unlock the full detection package for T1548.006.

Upgrade to Pro
T1548.006 Elastic Security · Elastic

Detect TCC Manipulation in Elastic Security

This detection identifies adversary attempts to manipulate macOS Transparency, Consent, and Control (TCC) protections — either by directly modifying the TCC SQLite database to grant unauthorized permissions, by injecting into TCC-privileged applications such as Finder to inherit Full Disk Access, by abusing environment variables to load a rogue TCC database, or by exploiting SIP-disabled systems where TCC protections are bypassed entirely. Successful TCC abuse grants attackers access to protected resources including the camera, microphone, screen recording, Full Disk Access, and sensitive user directories without user prompts.

MITRE ATT&CK

Tactic
Defense Evasion Privilege Escalation
Technique
T1548 Abuse Elevation Control Mechanism
Sub-technique
T1548.006 TCC Manipulation
Canonical reference
https://attack.mitre.org/techniques/T1548/006/

Elastic Detection Query

Elastic Security (Elastic)
eql
sequence by host.name with maxspan=10m
  [
    process where event.action == "start"
      and process.name in ("sqlite3", "python3", "python", "bash", "sh", "zsh", "ruby", "perl")
      and (
        process.args like~ "*/com.apple.TCC/TCC.db*"
        or process.command_line like~ "*INSERT INTO access*"
        or process.command_line like~ "*UPDATE access*"
        or process.env_vars.SQLITE_TMPDIR != null
        or process.env_vars.HOME_TCC_DB != null
      )
  ] by process.entity_id
  [
    file where event.action in ("creation", "change")
      and file.path like~ "*/com.apple.TCC/TCC.db*"
      and not process.name in ("tccd", "syspolicyd", "mdmclient")
  ] by process.entity_id
union
sequence by host.name with maxspan=5m
  [
    process where event.action == "start"
      and process.parent.name in ("Finder", "finder")
      and process.name in ("osascript", "bash", "sh", "zsh", "python3", "ruby", "perl")
  ] by process.entity_id
  [
    file where event.action in ("creation", "change")
      and file.path like~ "*/Library/*"
  ] by process.entity_id
high severity medium confidence

Detects TCC manipulation via correlated sequences: a process modifying TCC.db combined with file write events on the database, and Finder spawning interpreter children that subsequently access protected file paths.

Data Sources

Elastic Agent (macOS)Elastic Endpoint Security

Required Tables

processfile

False Positives & Tuning

  • Automated Xcode test runners that spawn osascript under Finder for UI testing workflows
  • MDM configuration agents writing TCC profiles during device enrollment
  • Security tools performing TCC database backups or audits as part of compliance checks

Other platforms for T1548.006


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Direct SQLite Injection into System TCC Database

    Expected signal: DeviceFileEvents with ActionType=FileModified on /Library/Application Support/com.apple.TCC/TCC.db, initiating process sqlite3. macOS Unified Log entries from com.apple.TCC subsystem recording database modification.

  2. Test 2Rogue TCC Database via Environment Variable

    Expected signal: Process launch event for osascript with SQLITE_TMPDIR environment variable set to non-standard path. File creation events in /tmp/tcc_test/com.apple.TCC/. sqlite3 process execution with TCC.db path argument.

  3. Test 3Finder TCC Inheritance via AppleScript

    Expected signal: Process launch event showing osascript spawned as child of Finder process. Subsequent shell command execution accessing ~/Library/Messages/ which is normally TCC-protected. File creation event at /tmp/tcc_finder_test.txt.

Unlock playbooks & atomic tests with Pro

Get the full detection package for T1548.006 — response playbook and atomic red team tests, plus investigation guidance and hunting queries.

df00tech Pro — £29/user/month

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections