Introduction
macOS malware doesn't need rootkits to stay hidden—it just needs to restart when you reboot. Persistence mechanisms like LaunchAgents, LaunchDaemons, kernel extensions, and Background Task Management entries provide legitimate pathways that attackers routinely abuse. The problem isn't detection in the antivirus sense; it's visibility. Most Mac users, including developers and security engineers, have no complete inventory of what starts automatically on their systems, let alone why it starts or whether it should.
MacPersistenceChecker, an open-source Swift application maintained by pinperepette, addresses this gap directly. With 259 GitHub stars and active development through June 2026, it scans 22+ persistence mechanisms, verifies code signatures, builds a local knowledge graph for AI-assisted triage, and tracks forensic timelines—all without sending data to external servers unless you explicitly opt into AI features with your own Anthropic API key.
This article breaks down what MacPersistenceChecker actually does, how its architecture works, and where it fits in a developer or incident responder's toolkit.
What is Pinperepette/MacPersistenceChecker?
MacPersistenceChecker is a native macOS security tool written in Swift, distributed as a universal binary for Apple Silicon and Intel (macOS 13+), and released under the MIT License. It is explicitly inspired by Mark Russinovich's Autoruns for Windows—a tool so foundational that macOS has lacked a credible equivalent until recently.
The project sits at the intersection of endpoint visibility, digital forensics, and AI-assisted triage. Unlike generic system monitors, it is persistence-native: it understands macOS-specific mechanisms that Windows-centric tools miss entirely, including LaunchAgent plist semantics, TCC permission databases, dylib hijacking vectors, BTM (Background Task Management) entries, and modern System Extensions built on DriverKit.
Key architectural decisions distinguish it from simpler scanners:
- Local-first processing: All scanning, risk scoring, and graph reasoning runs locally in SQLite. No cloud dependency, no telemetry.
- Knowledge graph, not flat lists: 6,800 persistence items might collapse to ~280 concept clusters. Verdicts propagate across related items, including future detections.
- Optional AI via Claude: Anthropic's Haiku and Sonnet models classify items in batches, but only when you supply your own API key. Costs run under $1/month for active use, $0 at steady state.
- Real-time monitoring: FSEvents-based change detection with optional AI analysis of each modification.
- MCP server: Exposes persistence data to Claude Code and other Model Context Protocol clients for programmatic querying.
The tool is maintained by a single developer (pinperepette) with 12 forks indicating early community interest, though not yet broad adoption. The 259-star count suggests it has found an audience among macOS security practitioners who value depth over polish.
Key Features
Comprehensive Persistence Scanning
MacPersistenceChecker covers 22+ mechanisms split between core and extended scanners:
Core: LaunchDaemons, LaunchAgents, Login Items, Kernel Extensions, System Extensions, Privileged Helper Tools, Cron Jobs, Configuration Profiles, and Application Support background apps.
Extended: Periodic scripts, shell startup files (.zshrc, .bashrc, /etc/profile with suspicious pattern detection), legacy Login/Logout Hooks, Authorization Plugins, Spotlight Importers, Quick Look Plugins, Directory Services Plugins, Finder Sync Extensions, BTM Database entries, dylib hijacking detection (DYLD_INSERT_LIBRARIES), and TCC/Accessibility permissions.
Risk Scoring (0-100)
Every item receives a composite risk score based on:
- Invalid or missing code signatures
- Missing hardened runtime protection
- Ad-hoc signing
- Suspicious file locations (
/tmp/,/Users/Shared/, hidden directories) - Persistent auto-start configurations (
RunAtLoad,KeepAlive) - Known malware patterns
Severity levels sort items as Low, Medium, High, or Critical.
Behavioral & Context-Aware Detection
The tool implements several specialized detectors:
- Launch Frequency Anomaly: Flags
StartInterval < 60seconds (possible watchdog abuse) and aggressiveKeepAlive+ low interval combinations. - Signed-but-Dangerous: Detects risky entitlements (
com.apple.security.cs.disable-library-validation), Apple impersonation, hidden locations for signed apps, and notarization gaps. - LOLBins (Living-off-the-Land): 40+ legitimate macOS binaries tracked with MITRE ATT&CK mappings. Context matters:
osascript + persistencetriggers differently thanosascriptalone. - Plist vs Binary Intent Mismatch: Catches modern dropper behavior where innocent plists load heavily-entitled binaries.
- Binary Age vs Persistence Age: Detects post-install malicious updates via timestamp analysis, including timestomping detection.
Forensic Timeline & Visualization
Each item carries a full lifecycle: first discovery, plist creation/modification, binary creation/modification, and last execution. Anomaly detection flags impossible timestamps (creation after modification) and binary swaps without plist changes.
Visual outputs include risk distribution histograms, trust-level donut charts, interactive relationship graphs, and a six-dimension Security Profile Radar (Trust, Signature, Safety, Stability, Transparency, Age).
Containment System
Suspicious items can be neutralized without deletion: disable persistence, block network via PF firewall rules, or both. Automatic backups, timed release (default 24h), and complete audit trails support safe investigation.
Use Cases
1. Incident Response & Malware Hunting
A developer suspects compromise after noticing unexpected network traffic. MacPersistenceChecker reveals an unsigned LaunchAgent in ~/Library/LaunchAgents with RunAtLoad and KeepAlive, pointing to a binary in /Users/Shared/. The forensic timeline shows the binary was modified two weeks after the plist's creation—classic post-install malicious update. MITRE ATT&CK mapping points to T1543.001 (LaunchAgent). Containment disables the agent and blocks network access while preserving evidence.
2. Pre/Post-Installation Auditing
Before installing a new productivity tool, a security engineer takes a snapshot. After installation, snapshot comparison reveals three new persistence items: a LaunchAgent, a Privileged Helper Tool, and a Finder Sync Extension. The AI diff explanation notes the helper tool requests network client/server entitlements despite claiming to be a local utility. The engineer revokes installation.
3. Performance Troubleshooting
A MacBook runs hot with no obvious CPU hogs in Activity Monitor. MacPersistenceChecker identifies 47 auto-start items, including a forgotten Adobe updater with aggressive KeepAlive + no ThrottleInterval (crash-restart loop risk). Removing it eliminates the thermal issue.
4. Continuous Security Monitoring
A DevOps↗ Bright Coding Blog engineer enables AI-mode monitoring with a 30-second check interval. A new unsigned LaunchAgent appears from /tmp/. The AI analysis, sent with full context (signature, LOLBins, behavioral anomalies), returns shouldNotify: true, severity: Critical, and mitreTechniques: [T1543.001]. The engineer contains it within minutes of creation.
5. LLM-Powered System Audits via MCP
Using the included MCP server, a developer queries persistence data directly from Claude Code: "Show me unsigned items with high risk scores in the LaunchAgents category." The JSON-RPC server returns structured data without requiring separate API calls or parsing log files.
Installation & Setup
Prebuilt Binary (Recommended)
Download the latest DMG from releases:
# Download from GitHub releases page
# https://github.com/Pinperepette/MacPersistenceChecker/releases/latest
# If macOS reports "app is damaged" (common for unsigned open-source tools):
xattr -cr /Applications/MacPersistenceChecker.app
The xattr -cr command removes extended attributes including quarantine flags that Gatekeeper applies to downloaded applications. This is standard practice for open-source macOS tools distributed outside the App Store.
Build from Source
# Clone the repository
git clone https://github.com/Pinperepette/MacPersistenceChecker.git
cd MacPersistenceChecker
# Build using the provided script
./build.sh
# Copy to Applications
cp -R MacPersistenceChecker.app /Applications/
Requirements: macOS 13.0+, Xcode 15+ or Swift 5.9+
Dependencies: GRDB.swift (SQLite wrapper), resolved automatically by Swift Package Manager.
Permissions
MacPersistenceChecker requires Full Disk Access in System Settings → Privacy & Security. Without it, the following remain invisible:
/Library/LaunchDaemons- System configuration files
- TCC database (
~/Library/Application Support/com.apple.TCC/TCC.db) - Shell startup files in other users' home directories
AI Setup (Optional)
# In the app:
# 1. Settings → AI → paste your Anthropic API key (stored in macOS Keychain)
# 2. Settings → Monitoring → toggle "Use AI" on
# 3. Toolbar → Triage for bulk classification, or Hunt for natural-language queries
The API key never leaves your machine except in direct HTTPS calls to Anthropic's API. No proxy, no logging, no telemetry.
Real Code Examples
MCP Server Configuration
MacPersistenceChecker includes an MCP server for programmatic access. Build it separately:
# Build the MCP server target
swift build --target MPCServer
# Binary location
# .build/debug/mpc-server
Configure Claude Code or Claude Desktop to use it:
{
"mcpServers": {
"macpersistence": {
"command": "/path/to/mpc-server",
"args": []
}
}
}
This JSON configuration tells MCP-compatible clients how to launch the server. The server communicates via JSON-RPC 2.0 over stdin/stdout, reads from MacPersistenceChecker's local SQLite database, and requires no separate API key.
Example MCP Queries
Once configured, these natural-language queries work in Claude Code:
What persistence items are on this Mac?
Show me unsigned items with high risk scores
What changed since the last snapshot?
Analyze the risk of items in the LaunchAgents category
Compare today's snapshot with yesterday's
The MCP server translates these into structured database queries and returns formatted results. Available tools include get_current_state, get_diff, get_summary, get_item_details, get_risk_analysis, get_snapshots, and compare_snapshots.
Build Script Reference
The repository's build.sh encapsulates the complete build process. While not shown in detail in the README, it is the documented entry point:
#!/bin/bash
# build.sh - Referenced in README, exact contents not shown
# Typically resolves dependencies, builds universal binary, signs if certificates available
./build.sh
The README notes this produces MacPersistenceChecker.app suitable for copying to /Applications/. For developers modifying the source, standard Swift Package Manager commands (swift build, swift test) apply.
Advanced Usage & Best Practices
Tuning AI Monitoring
The default 30-call daily cap prevents runaway API costs. For production monitoring, consider:
- Raising minimum risk score threshold to exclude Apple-signed system updates
- Adding custom ignore paths for known-good development tools
- Using the custom prompt field for organizational context (e.g., "Ignore anything from VMware")
Snapshot Strategy
Take baselines before and after any software installation. The diff view with AI explanation rapidly identifies unexpected persistence additions. For incident response, snapshot comparison provides tamper-evident records of system state changes.
Containment Before Deletion
The containment system's timed release (default 24h) lets you verify that disabling an item doesn't break critical functionality. This is particularly valuable for poorly-documented enterprise software where persistence mechanisms may be required for licensing or updates.
Knowledge Graph Maintenance
As you classify clusters, the system learns your environment. Early triage requires more manual decisions; steady-state operation becomes increasingly automated. Periodically review propagated verdicts—especially after major macOS upgrades that may change legitimate system behavior.
Integration with SIEM/SOAR
The forensic JSON export includes complete MITRE ATT&CK mappings, Unix timestamps, and structured risk data. Ingest this into Splunk, Elastic, or custom SOAR playbooks for cross-platform correlation. The export button enables only after scan completion to ensure data completeness.
Comparison with Alternatives
| Tool | Platform Focus | AI Triage | Persistence Depth | Open Source | Local-First |
|---|---|---|---|---|---|
| MacPersistenceChecker | macOS-native | Optional (Claude, user-paid) | 22+ mechanisms, graph-based | Yes (MIT) | Yes |
| KnockKnock (Objective-See) | macOS | No | Multiple mechanisms | Yes | Yes |
| Autoruns (Sysinternals) | Windows | No | Comprehensive Windows | No | Yes |
| LuLu (Objective-See) | macOS | No | Network-focused, not persistence | Yes | Yes |
KnockKnock is the closest macOS equivalent, also open-source and local-first. MacPersistenceChecker differentiates through its knowledge graph architecture, optional AI triage, real-time monitoring with FSEvents, and MCP server integration. KnockKnock remains valuable for quick static scans without configuration.
Autoruns is the conceptual inspiration but Windows-only; direct comparison is unfair except to note that macOS finally has a tool with comparable systematic coverage.
LuLu complements rather than replaces MacPersistenceChecker: it monitors network connections, not persistence mechanisms. Using both provides defense-in-depth.
FAQ
Q: Does MacPersistenceChecker require internet access? No. All scanning and analysis runs locally. Internet is only used if you enable AI features with your own Anthropic API key.
Q: What macOS versions are supported? macOS 13.0 (Ventura) and later, on both Apple Silicon and Intel.
Q: Is the AI feature free? No, but costs are minimal. The README estimates under $1/month for active use, $0 at steady state. You pay Anthropic directly; no markup or subscription to the tool author.
Q: Why does macOS say the app is damaged?
Gatekeeper quarantines downloaded apps without Apple notarization. Run xattr -cr /Applications/MacPersistenceChecker.app to remove quarantine attributes.
Q: Can I use this commercially? Yes. MIT License permits commercial use, modification, and distribution with attribution.
Q: How does the knowledge graph reduce noise? 6,800 items typically cluster into ~280 concepts. One manual or AI verdict applies to all items sharing that concept, including future detections.
Q: Is there a command-line interface?
The MCP server (mpc-server) provides programmatic access. The main app is GUI-only.
Conclusion
MacPersistenceChecker fills a genuine gap in macOS security tooling: systematic, deep visibility into persistence mechanisms with modern affordances like AI-assisted triage and knowledge graph reasoning. It is not a mass-market utility but a specialized instrument for developers, security engineers, and incident responders who need to understand why things run on their Macs, not just what runs.
The local-first architecture, optional AI with user-controlled keys, and open-source MIT licensing make it trustworthy for sensitive environments. The 259-star count and active development through mid-2026 suggest sustainable maintenance, though the single-maintainer model carries typical open-source risk.
If you manage macOS systems, investigate malware, or simply want to understand your machine's auto-start behavior beyond Activity Monitor's surface view, MacPersistenceChecker deserves evaluation. Download the latest release or build from source at https://github.com/Pinperepette/MacPersistenceChecker.
For related macOS security tooling, see [INTERNAL_LINK: macOS security tools comparison] or explore the [INTERNAL_LINK: MITRE ATT&CK macOS technique coverage] guide.