Languages: English • Tiếng Việt
Instant kernel interception with Touch ID authentication & batch unlocking
"I'm 15 years old. When lending my Mac to friends or classmates, I always worried about my personal data and private apps being accessed. macOS has no granular per-app locking mechanism out of the box. So I decided to build one myself."
Starting with zero prior experience in low-level systems programming, I researched how Apple's Endpoint Security Framework and POSIX signal handling work under the hood (drawing inspiration from open-source references like Google Santa). With that architectural foundation, I partnered with AI Coding Agents to implement the Swift codebase, navigate tricky security hurdles, review logic, and debug issues. AppLocker is living proof that anyone with a clear vision can build real-world software to solve their own everyday problems.
AUTH_SIGNAL & NOTIFY_EXEC) running as a root System Extension daemon.SIGSTOP before any UI or window renders, resuming with SIGCONT upon successful authentication or terminating with SIGKILL on denial.LocalAuthentication.SIGKILL/SIGSTOP) aimed at the security daemon or main app, and protects configuration files from tampering.en, vi).NSCache icon caching (AppIconProvider), debounced Spotlight queries (NSMetadataQuery), and strictly isolated actor concurrency (@MainActor).| Main Dashboard | Single-App Authentication |
|---|---|
![]() | ![]() |
| Manage & Configure Locked Applications | Touch ID / Password Interception Dialog |
| Batch Authentication | Menu Bar Quick Access |
|---|---|
![]() | ![]() |
| Simultaneous Multi-App Queue Processing | Instant Status & Quick Access Menu |
AppLocker is structured into three decoupled layers:
AppLocker (Main Application): User-space GUI (SwiftUI + AppKit) managing app configurations, LocalAuthentication, Menu Bar status, and Batch Auth window dispatch on @MainActor.ESExtension (Endpoint Security Daemon): Privileged System Extension running as root. Handles NOTIFY_EXEC, NOTIFY_EXIT, and anti-tamper events (AUTH_SIGNAL, AUTH_FILE).Shared Core: Shared XPC protocol contracts (ESAppProtocol, ESXPCProtocol), ECDSA P-256 cryptography helpers (KeychainHelper), CDHash verification (CDHashHelper), and unified logging (os.Logger).sequenceDiagram
autonumber
actor User
participant TargetApp as Blocked App (e.g. Safari)
participant Kernel as macOS Kernel / ES Subsystem
participant ESExt as ESExtension (Root Daemon)
participant AppLocker as AppLocker (Main App)
User->>TargetApp: Launch App
TargetApp->>Kernel: execve()
Kernel->>ESExt: NOTIFY_EXEC Event (PID > 0 & CDHash available)
ESExt->>TargetApp: POSIX kill(PID, SIGSTOP) [Process Frozen]
ESExt->>AppLocker: XPC notifyBlockedExec(name, path, cdhash, pid)
AppLocker->>User: Prompt Touch ID / Password (BatchAuthView)
alt Authentication Approved
User->>AppLocker: Touch ID Success
AppLocker->>ESExt: XPC processPendingApps(approvedPIDs: [PID])
ESExt->>TargetApp: POSIX kill(PID, SIGCONT) [Process Resumed]
else Authentication Rejected / Timeout
AppLocker->>ESExt: XPC processPendingApps(rejectedPIDs: [PID])
ESExt->>TargetApp: POSIX kill(PID, SIGKILL) [Process Terminated]
end
AUTH_SIGNAL): Monitors and denies unauthorized external POSIX signals (SIGCONT, SIGKILL, SIGSTOP) directed at suspended target apps, the daemon, or AppLocker, preventing unauthorized bypasses.AppLocker and ESExtension is protected by cryptographic challenge-response handshakes using CryptoKit (P256.Signing).audit_token is verified against executable CDHashes to prevent process spoofing and unauthorized Mach service invocations.[!NOTE] Entitlements Notice: Apple requires a paid Apple Developer Program account and explicit approval for the
com.apple.developer.endpoint-security.cliententitlement.For local development and open-source testing without a paid provisioning profile, System Integrity Protection (SIP) must be disabled (
csrutil disablein Recovery Mode for Intel, and Reduced Security mode for Apple Silicon) to allow the System Extension to register.
.dmg from Releases./Applications.# Clone the repository
git clone https://github.com/TranPhuong319/AppLocker.git
cd AppLocker
# Open in Xcode
open AppLocker.xcodeproj
AppLocker scheme.Trần Phương
Special thanks to Google's Santa project for providing reference standards on Endpoint Security architecture.
This project is licensed under the Apache License 2.0 — see the LICENSE file for details.
251 commits
Swift
82.4%
Shell
17.4%
Languages: English • Tiếng Việt
Instant kernel interception with Touch ID authentication & batch unlocking
"I'm 15 years old. When lending my Mac to friends or classmates, I always worried about my personal data and private apps being accessed. macOS has no granular per-app locking mechanism out of the box. So I decided to build one myself."
Starting with zero prior experience in low-level systems programming, I researched how Apple's Endpoint Security Framework and POSIX signal handling work under the hood (drawing inspiration from open-source references like Google Santa). With that architectural foundation, I partnered with AI Coding Agents to implement the Swift codebase, navigate tricky security hurdles, review logic, and debug issues. AppLocker is living proof that anyone with a clear vision can build real-world software to solve their own everyday problems.
AUTH_SIGNAL & NOTIFY_EXEC) running as a root System Extension daemon.SIGSTOP before any UI or window renders, resuming with SIGCONT upon successful authentication or terminating with SIGKILL on denial.LocalAuthentication.SIGKILL/SIGSTOP) aimed at the security daemon or main app, and protects configuration files from tampering.en, vi).NSCache icon caching (AppIconProvider), debounced Spotlight queries (NSMetadataQuery), and strictly isolated actor concurrency (@MainActor).| Main Dashboard | Single-App Authentication |
|---|---|
![]() | ![]() |
| Manage & Configure Locked Applications | Touch ID / Password Interception Dialog |
| Batch Authentication | Menu Bar Quick Access |
|---|---|
![]() | ![]() |
| Simultaneous Multi-App Queue Processing | Instant Status & Quick Access Menu |
AppLocker is structured into three decoupled layers:
AppLocker (Main Application): User-space GUI (SwiftUI + AppKit) managing app configurations, LocalAuthentication, Menu Bar status, and Batch Auth window dispatch on @MainActor.ESExtension (Endpoint Security Daemon): Privileged System Extension running as root. Handles NOTIFY_EXEC, NOTIFY_EXIT, and anti-tamper events (AUTH_SIGNAL, AUTH_FILE).Shared Core: Shared XPC protocol contracts (ESAppProtocol, ESXPCProtocol), ECDSA P-256 cryptography helpers (KeychainHelper), CDHash verification (CDHashHelper), and unified logging (os.Logger).sequenceDiagram
autonumber
actor User
participant TargetApp as Blocked App (e.g. Safari)
participant Kernel as macOS Kernel / ES Subsystem
participant ESExt as ESExtension (Root Daemon)
participant AppLocker as AppLocker (Main App)
User->>TargetApp: Launch App
TargetApp->>Kernel: execve()
Kernel->>ESExt: NOTIFY_EXEC Event (PID > 0 & CDHash available)
ESExt->>TargetApp: POSIX kill(PID, SIGSTOP) [Process Frozen]
ESExt->>AppLocker: XPC notifyBlockedExec(name, path, cdhash, pid)
AppLocker->>User: Prompt Touch ID / Password (BatchAuthView)
alt Authentication Approved
User->>AppLocker: Touch ID Success
AppLocker->>ESExt: XPC processPendingApps(approvedPIDs: [PID])
ESExt->>TargetApp: POSIX kill(PID, SIGCONT) [Process Resumed]
else Authentication Rejected / Timeout
AppLocker->>ESExt: XPC processPendingApps(rejectedPIDs: [PID])
ESExt->>TargetApp: POSIX kill(PID, SIGKILL) [Process Terminated]
end
AUTH_SIGNAL): Monitors and denies unauthorized external POSIX signals (SIGCONT, SIGKILL, SIGSTOP) directed at suspended target apps, the daemon, or AppLocker, preventing unauthorized bypasses.AppLocker and ESExtension is protected by cryptographic challenge-response handshakes using CryptoKit (P256.Signing).audit_token is verified against executable CDHashes to prevent process spoofing and unauthorized Mach service invocations.[!NOTE] Entitlements Notice: Apple requires a paid Apple Developer Program account and explicit approval for the
com.apple.developer.endpoint-security.cliententitlement.For local development and open-source testing without a paid provisioning profile, System Integrity Protection (SIP) must be disabled (
csrutil disablein Recovery Mode for Intel, and Reduced Security mode for Apple Silicon) to allow the System Extension to register.
.dmg from Releases./Applications.# Clone the repository
git clone https://github.com/TranPhuong319/AppLocker.git
cd AppLocker
# Open in Xcode
open AppLocker.xcodeproj
AppLocker scheme.Trần Phương
Special thanks to Google's Santa project for providing reference standards on Endpoint Security architecture.
This project is licensed under the Apache License 2.0 — see the LICENSE file for details.
251 commits
Swift
82.4%
Shell
17.4%