Skip to content

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.

Published on 8 min read
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:

SourceWhat it adds
BTM store or sfltool dumpbtmEvery login item, agent and daemon BTM saw, per user, with developer, team ID, type and disposition
/Library/LaunchAgents, /Library/LaunchDaemons, ~/Library/LaunchAgentsThe 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 logWhen BTM registered an item, when launchd loaded and spawned it
ExecutablesSignature, hash, quarantine attribute
Installer receipts, FSEvents, TCC.dbWho installed what, file activity, permissions granted to the same program

What to look for

CheckWhy it mattersBenign look-alikes
No developer and no team identifierCode signed with a Developer ID is attributed to a team. Malware dropped as a bare executable usually is notOpen-source tools run as services, often ad-hoc signed; in-house scripts
Team ID that does not match the nameA helper named after a browser or vendor but signed by another teamVendors that ship through a subsidiary or a different team
Executable in /tmp, /private/var/folders, /Users/Shared or a dot-folderPlaces that are writable, temporary or hidden from FinderSome installers stage helpers in temporary folders, briefly
Hidden and enabledRuns, but is not shown in Login ItemsItems the system itself hides; why an item is hidden is not documented
Record whose plist is missingThe plist was deleted, possibly to clean up, while BTM kept the recordSoftware removed by dragging the app to the Trash
Launch plist with no BTM recordBTM never registered it, or the store was resetPlists written but never loaded; Apple's own jobs
com.apple. label outside Apple's foldersImitation of a system jobRare
Disabled but still presentSomeone tried to switch it off, or a policy did; the program is still on diskUsers disabling updaters
Item under an unexpected userPersistence for an account the user does not useShared 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:

FieldValue
Namecom.example.updater
Typelegacy agent (0x10008)
Developer Name / Team Identifiernone / none
Parent IdentifierUnknown Developer
Disposition0xb: enabled, allowed, notified, visible
URLfile:///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)EventSource
10:11:47sync-helper copied into ~/Library/Application Support/.updaterShell command in the unified log, file times
10:12:30sudo password failure for launchctl bootstrap gui/501 …sudo messages in the unified log
10:12:41sudo launchctl bootstrap gui/501 …/com.example.updater.plistsudo messages in the unified log
10:13:02.118launchd adds the service in gui/501launchd messages
10:13:02.512backgroundtaskmanagementd registers the new item, developer unknownsubsystem com.apple.backgroundtaskmanagement
10:13:03.007launchd spawns sync-helperlaunchd messages
10:15:02The plist is rewritten through a .tmp fileFile 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:

  1. 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.

  2. The executable. Hash it, check its signature (codesign -dv --verbose=4), its quarantine attribute (xattr -l) and its times.

  3. The unified log. Messages from subsystem com.apple.backgroundtaskmanagement around 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 show reads --start and --end in 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.

  4. EDR telemetry. Endpoint Security has had BTM_LAUNCH_ITEM_ADD and BTM_LAUNCH_ITEM_REMOVE notifications 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.

  5. Other users. The same program in another user's section or folder.

Anti-forensics to keep in mind

  • Reset. Apple documents sfltool resetbtm as 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.updater with 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.

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.