Inside dawgyg/AppleResearch: A Catalog of macOS Privilege Escalation Patterns Apple Won't Pay For
Hook
Apple's bug bounty program rejected dozens of working privilege escalation exploits as insufficiently severe. One researcher dumped them all on GitHub, creating an unintentional field guide to macOS attack surfaces that slip through the cracks.
Context
Security research typically follows a predictable lifecycle: discover vulnerability, report to vendor, receive CVE assignment, publish write-up after patch. Apple's bug bounty program disrupted this flow by establishing a financial bar that many real-world exploitable vulnerabilities fail to clear. Logic bugs in XPC services, confused deputy attacks against privileged daemons, and TCC framework bypasses frequently get rejected as "working as designed" or deemed insufficiently severe for compensation, leaving researchers with working exploits and no incentive to keep them private.
The dawgyg/AppleResearch repository emerged from this friction — a raw dump of macOS privilege escalation research that Apple's bounty program declined to reward. Unlike polished security advisories or exploit frameworks, this is unfiltered reconnaissance: standalone C programs demonstrating XPC authentication failures, Mach port manipulation primitives, and IOKit interface abuse. The repository represents a category of vulnerability that sophisticated attackers actively exploit but formal security processes systematically undervalue: design weaknesses in Apple's IPC architecture that enable privilege escalation without touching memory corruption or kernel panics.
Technical Insight
The repository's architecture is deliberately minimal — each subdirectory contains a focused proof-of-concept targeting a specific macOS attack surface. The dominant pattern is XPC service exploitation, where system daemons expose privileged functionality through Cross-Process Communication without properly validating caller entitlements. A typical PoC establishes an XPC connection to a privileged service, invokes methods that should be restricted, and demonstrates unauthorized operations executing with elevated privileges.
Consider this simplified pattern extracted from multiple exploits in the repository:
#import <Foundation/Foundation.h>
// Connect to privileged XPC service without entitlement checks
NSXPCConnection *connection = [[NSXPCConnection alloc]
initWithMachServiceName:@"com.apple.privileged.helper"
options:NSXPCConnectionPrivileged];
connection.remoteObjectInterface = [NSXPCInterface
interfaceWithProtocol:@protocol(PrivilegedOperations)];
[connection resume];
id proxy = [connection remoteObjectProxy];
// Call privileged method from unprivileged process
[proxy executeAsRoot:@"/bin/sh"
withArguments:@[@"-c", @"id > /tmp/proof.txt"]
reply:^(NSError *error) {
if (!error) {
NSLog(@"Privilege escalation successful");
}
}];
The vulnerability isn't in the code itself but in the service's failure to validate that the connecting process possesses required entitlements before executing privileged operations. Apple's XPC framework provides NSXPCConnectionCodeSigningRequirement and entitlement validation mechanisms, but services must explicitly implement these checks — they aren't enforced by default. The repository documents dozens of system services that skip this validation, creating privilege escalation vectors invisible to traditional vulnerability scanners.
Another dominant pattern exploits confused deputy scenarios where legitimate signed binaries perform privileged file operations with attacker-controlled paths. These exploits manipulate environment variables, race conditions in temporary file creation, or symlink-following behavior to trick privileged installers into overwriting system files:
// Create symlink in predictable temp location
char *tempPath = "/var/folders/tmp/installer_tmp";
symlink("/Library/LaunchDaemons/persistence.plist", tempPath);
// Trigger privileged installer that writes to temp path
// without validating it's not a symlink
system("/Library/PrivilegedHelperTools/Installer --output /var/folders/tmp/installer_tmp");
// Installer follows symlink, overwrites LaunchDaemon with attacker content
The repository also exposes TCC framework bypasses through direct SQLite database manipulation and synthetic event injection. macOS stores privacy permissions in ~/Library/Application Support/com.apple.TCC/TCC.db, and several exploits demonstrate gaining write access to this database through privileged helpers, then inserting records granting accessibility or file access permissions without user consent. These aren't memory corruption bugs — they're logic flaws in how macOS enforces privacy controls.
Mach port manipulation appears throughout the codebase, demonstrating how macOS's microkernel IPC primitives enable privilege escalation when services expose port rights without proper validation. Exploits acquire send rights to privileged Mach ports through leaked port names in system logs or brute-force port number enumeration, then send crafted Mach messages invoking kernel operations normally restricted to root. The code reveals undocumented IOKit user clients and kernel extension interfaces that accept commands from userspace without validating caller credentials.
What makes this research valuable isn't novel exploitation techniques — these are well-understood vulnerability classes. The insight is empirical documentation of how pervasively these patterns exist in macOS's vast privileged service ecosystem. Apple ships hundreds of XPC services and privileged helpers; this repository demonstrates that authentication failures and confused deputy vulnerabilities remain common despite years of security improvements. It's a catalog of attack surface that formal security assessments consistently miss because the vulnerabilities don't crash, don't corrupt memory, and often work exactly as the developer intended — just without considering adversarial callers.
Gotcha
The repository's greatest weakness is complete absence of context. Exploits appear as raw C files with minimal comments, no indication of affected macOS versions, and zero documentation about whether vulnerabilities were patched. You'll spend more time reverse engineering the PoCs to understand what they target than you would discovering similar bugs through your own research. Many exploits contain hardcoded memory addresses or assume specific system configurations that break silently on different macOS versions, leaving you uncertain whether the exploit failed because Apple patched it or you're missing prerequisites.
The unstructured organization compounds this problem. There's no categorization by vulnerability type, severity, or exploitation reliability. Some PoCs demonstrate critical privilege escalation requiring single terminal commands; others showcase edge cases requiring specific race condition timing or pre-installed software. Without testing each exploit individually against your target macOS version, you can't assess what's operationally useful versus historical curiosities. If you're building a security assessment methodology or need reliable exploits for red team engagements, this repository will frustrate more than assist — it's raw research notes, not a curated vulnerability database.
Verdict
Use if you're a macOS security researcher studying Apple's IPC attack surface and need concrete examples of vulnerability patterns that traditional security auditing misses, a red teamer building custom privilege escalation chains who can adapt raw PoCs to current macOS versions, or a security engineer assessing macOS deployment risks who wants empirical evidence of exploitable logic flaws beyond CVE databases. This repository excels at demonstrating how macOS privilege escalation works in practice — not through exotic kernel exploits but through mundane authentication failures in privileged services. Skip if you need working exploits for current macOS versions without reverse engineering effort, want documentation explaining vulnerability context and patch status, or expect organized code suitable for integration into security tooling. This is unfiltered research notes from someone who tested Apple's security boundaries and documented what broke — valuable for understanding macOS attack surfaces, frustrating for operational security work.