Investigating Mac Persistence with BTM
Use the macOS BTM store in a malware or intrusion case: items with no developer, hidden items, unregistered plists, the notification, and a worked example.
On this page
TL;DR. In a Mac intrusion, the Background Task Management store is a list of persistence across all users, with the developer and team ID macOS attributed to each item. Start with items that have no developer and no team identifier, executables in hidden, temporary or shared folders, hidden but enabled items, records whose plist is gone, and launch plists that BTM does not know. Then take times from elsewhere: the store has no documented registration time, so the unified log of backgroundtaskmanagementd, launchd and file times carry the timeline. BTM Parser applies these checks in your browser and explains each one; the FIN-MBP-03 sample shows them on a planted agent.
Where BTM fits
A persistence review on macOS 13 or later covers several sources. BTM is one of them, not a replacement:
| Source | What it adds |
|---|---|
BTM store or sfltool dumpbtm | Every login item, agent and daemon BTM saw, per user, with developer, team ID, type and disposition |
/Library/LaunchAgents, /Library/LaunchDaemons, ~/Library/LaunchAgents | The plists themselves: label, program, arguments, run conditions |
/private/var/db/com.apple.xpc.launchd/ | launchd's overrides: which services are disabled (BTM vs launchd overrides) |
| Unified log | When BTM registered an item, when launchd loaded and spawned it |
| Executables | Signature, hash, quarantine attribute |
| Installer receipts, FSEvents, TCC.db | Who installed what, file activity, permissions granted to the same program |
What to look for
| Check | Why it matters | Benign look-alikes |
|---|---|---|
| No developer and no team identifier | Code signed with a Developer ID is attributed to a team. Malware dropped as a bare executable usually is not | Open-source tools run as services, often ad-hoc signed; in-house scripts |
| Team ID that does not match the name | A helper named after a browser or vendor but signed by another team | Vendors that ship through a subsidiary or a different team |
Executable in /tmp, /private/var/folders, /Users/Shared or a dot-folder | Places that are writable, temporary or hidden from Finder | Some installers stage helpers in temporary folders, briefly |
| Hidden and enabled | Runs, but is not shown in Login Items | Items the system itself hides; why an item is hidden is not documented |
| Record whose plist is missing | The plist was deleted, possibly to clean up, while BTM kept the record | Software removed by dragging the app to the Trash |
| Launch plist with no BTM record | BTM never registered it, or the store was reset | Plists written but never loaded; Apple's own jobs |
com.apple. label outside Apple's folders | Imitation of a system job | Rare |
| Disabled but still present | Someone tried to switch it off, or a policy did; the program is still on disk | Users disabling updaters |
| Item under an unexpected user | Persistence for an account the user does not use | Shared or service accounts that are expected |
None of these is a verdict on its own. Two or three together on one item usually are worth a full look.
The notification
On Ventura the user was told about a new item with a "Background Items Added" notification; later releases changed the wording. The notified bit of the disposition records that the notification was posted. It does not prove that anyone saw it or understood it.
Patrick Wardle showed at DEF CON 31 (August 2023) that the notification could be suppressed, including by paths that do not need root, and said Apple's fixes did not address the root cause. So a missing notification, or a user who remembers none, proves nothing either way. Ask the user anyway: an answer such as "I clicked something about background items on Monday morning" can date the event.
Worked example: FIN-MBP-03
The FIN-MBP-03 sample is the Mac of dana.whitlock, an administrator in finance, running macOS 26. Load it with Try a sample on BTM Parser to follow along.
The store lists eleven records under dana's generated UID: developer records for Microsoft, Google and Zoom, their updaters and helpers, Microsoft Teams, and one more:
| Field | Value |
|---|---|
| Name | com.example.updater |
| Type | legacy agent (0x10008) |
| Developer Name / Team Identifier | none / none |
| Parent Identifier | Unknown Developer |
| Disposition | 0xb: enabled, allowed, notified, visible |
| URL | file:///Users/dana.whitlock/Library/LaunchAgents/com.example.updater.plist |
| Executable Path | /Users/dana.whitlock/Library/Application Support/.updater/sync-helper |
Three checks fire at once: no developer and no team, an executable in a dot-folder, and a name that imitates an updater without saying whose. The plist is in the collection. It runs the program at load and keeps it alive, with output sent to /dev/null.
The record has no time. The sample's unified log and file times give it:
| Time (UTC) | Event | Source |
|---|---|---|
| 10:11:47 | sync-helper copied into ~/Library/Application Support/.updater | Shell command in the unified log, file times |
| 10:12:30 | sudo password failure for launchctl bootstrap gui/501 … | sudo messages in the unified log |
| 10:12:41 | sudo launchctl bootstrap gui/501 …/com.example.updater.plist | sudo messages in the unified log |
| 10:13:02.118 | launchd adds the service in gui/501 | launchd messages |
| 10:13:02.512 | backgroundtaskmanagementd registers the new item, developer unknown | subsystem com.apple.backgroundtaskmanagement |
| 10:13:03.007 | launchd spawns sync-helper | launchd messages |
| 10:15:02 | The plist is rewritten through a .tmp file | File times |
The store file's modification time is also 10:13:02.512: the registration was the last write. The registration came 0.4 seconds after launchd added the job, and the job ran half a second later, before anyone could have answered a notification. That is what an advisory notification means in practice.
The other records are a useful baseline. The Microsoft AutoUpdate, Google Keystone and Zoom helpers are attributed to their teams (UBF8T346G9, EQHXZ8M8AV and BJ4HAAB9B3), and their plists are in the system folders. The Zoom updater is disabled (0xa), and dana's launchd overrides file disables it too. That is a user switching off an updater in March, not an intrusion.
Pivots
From a suspicious record:
-
The plist. Read it (
plutil -p). Compare its label, program and arguments with the record. A program path that differs from the record's executable path suggests the plist changed after registration. -
The executable. Hash it, check its signature (
codesign -dv --verbose=4), its quarantine attribute (xattr -l) and its times. -
The unified log. Messages from subsystem
com.apple.backgroundtaskmanagementaround the time, then launchd and process messages:log show --info --predicate 'subsystem == "com.apple.backgroundtaskmanagement"' \ --start "2026-09-14 10:00:00" --end "2026-09-14 10:30:00"log showreads--startand--endin the Mac's local time zone. The message wording varies between releases, so search by subsystem and by the label or path you care about, not by an exact sentence. The messages are kept only as long as the unified log's normal retention. -
EDR telemetry. Endpoint Security has had
BTM_LAUNCH_ITEM_ADDandBTM_LAUNCH_ITEM_REMOVEnotifications since macOS 13. Apple documents that they carry the item, its type, whether it is legacy or managed, its user, and the instigating process and app when available. That answers "who registered it", which the store cannot. -
Other users. The same program in another user's section or folder.
Anti-forensics to keep in mind
- Reset. Apple documents
sfltool resetbtmas resetting login and background item data. Apple recommends restarting the Mac after it. Records from before the reset are gone. A store with very few records on a long-used Mac, or launch plists without records, can point to it. - Plist removal. Deleting the plist does not necessarily delete the record. That is a gain for the investigator.
- Suppressed notification. See above.
- Borrowed attribution. A helper placed inside a real app can be listed under that app. Check the executable's own signature.
Writing it up
- State what the record shows: "BTM recorded a legacy agent
com.example.updaterwith no developer, enabled and allowed, for dana.whitlock". Not "the malware persisted". - Take times from the log or file system, and say which.
- Say which BTM bit meanings you relied on, and that they are observed, not documented by Apple.
FAQ
Does a BTM record prove that malware ran?
No. It proves that Background Task Management knew the item and in which state. Execution comes from other evidence: launchd and process messages in the unified log, EDR telemetry, file access times, the program's own output.
The user says they never saw a Background Items Added notification. Is that meaningful?
A little. The notified bit says the notification was posted, not that it was read, and researchers have shown ways to suppress it. Treat the user's account as one input and check the store and the log.
What does a launch plist with no BTM record mean?
Apple does not document every case. Possible reasons include a store reset with sfltool resetbtm, a plist that was never loaded since it was written, or interference with registration. It is a lead, not a conclusion.
Where do I find who registered a BTM item?
Not in the store. Endpoint Security BTM events carry the instigating process and the app, so EDR telemetry built on them can answer it. Otherwise correlate the registration time in the unified log with process, sudo and shell activity.
Related articles
Frequently asked questions
Does a BTM record prove that malware ran?
No. It proves that Background Task Management knew the item and in which state. Execution comes from other evidence: launchd and process messages in the unified log, EDR telemetry, file access times, the program's own output.
The user says they never saw a Background Items Added notification. Is that meaningful?
A little. The notified bit says the notification was posted, not that it was read, and researchers have shown ways to suppress it. Treat the user's account as one input and check the store and the log.
What does a launch plist with no BTM record mean?
Apple does not document every case. Possible reasons include a store reset with sfltool resetbtm, a plist that was never loaded since it was written, or interference with registration. It is a lead, not a conclusion.
Where do I find who registered a BTM item?
Not in the store. Endpoint Security BTM events carry the instigating process and the app, so EDR telemetry built on them can answer it. Otherwise correlate the registration time in the unified log with process, sudo and shell activity.