hbcc

Who actually did it: attribution in Endpoint Security events

Part two of Agentless macOS. One Endpoint Security event can name four processes, and each answers a narrower question than who did it. Eighty-one TCC events from a single click, one process that ran three programs in a row, and how often my own filter took its answer from the present moment.

Scope: One MacBook Air (M3, 2024) on macOS 27.2, no MDM; eslogger under launchd with 41 event types, es-filter 0.2.0 and a Splunk Universal Forwarder to a home-lab Splunk; 16 October to 8 November 2026.

Method: Unique events in one Splunk index from 16 October to 8 November 2026; the burst of 3 November read event by event; es-filter's attribution sources counted over all 159,596 events that carry them; es-filter's code read at the commit that ran.

Contents

Part one ended with a justified question. On 3 November, at 23:47 in the evening, my Mac sent a burst of events to my Splunk index, the log search system in my home lab. The events were about privacy permissions, which macOS keeps in a system called TCC (Transparency, Consent and Control). Each event named three processes. Terminal was the app whose permission had changed. sandboxd, the macOS daemon that enforces app sandboxes, was named as the initiator of the change. tccd, the daemon that keeps the TCC records, was the process that reported it.

The Mac runs no commercial security agent. The events come from Endpoint Security, the interface through which macOS tells security tools what processes do. Apple ships a command-line tool for it, eslogger, which writes each event as one line of JSON. From there they travel to Splunk in three steps.

The pipeline from part one: Endpoint Security, eslogger with 41 event types, the raw file, es-filter keeping 19.7 per cent, the output file, the forwarder over TLS and the Splunk index.

es-filter is a Python script of mine that runs on the Mac in the background and works as a sieve. Most of what eslogger records is macOS starting its own small programs: between 20 October and 4 November, es-filter read 725,088 lines from eslogger and passed on 142,788. It throws away the launches of Apple platform binaries, the programs Apple signs as part of macOS, except 46 tools that attackers like to borrow, such as curl and osascript. It also adds something eslogger leaves out. eslogger names two related processes of every process, its parent and its responsible process (both explained below), only by process number, and es-filter writes down the program behind each number. The Splunk forwarder then sends the result to the index. Every name in the Splunk results below has passed through es-filter. Part one describes the whole pipeline and what it cost to run.

So which of the three did it? An Endpoint Security event can name up to four processes, and each one answers a different question:

  1. The process that reported it. This is the event’s process field. In this burst it was tccd, the daemon that keeps the record.
  2. The process that made the change. This is the initiator, a field Apple’s API names instigator, and only some event types carry it. In this burst it was sandboxd, which passes permission checks from the app sandbox on to tccd.
  3. The process that started it. This is the parent: every process has one, the process that created it.
  4. The process macOS holds accountable for the entire situation. This is the responsible process. It is usually the app a person opened, and the helpers and commands started from that app inherit it, unless the app chooses to hand it off to them. In this burst it was Terminal.

In this burst, Endpoint Security named Terminal itself and handed over its full record. For the event’s own process, eslogger gives the parent and the responsible process only as numbers, and the names come from es-filter. Seven in ten of its answers about the responsible process describe the Mac at the moment es-filter read the event, which can be later than the moment it happened, and the record keeps nothing that would let me check them afterwards.

Where the four names come from

Apple describes the process in an event with one structure, es_process_t. The parent is in it twice: ppid for the parent now, and original_ppid for the parent before the process was handed over to launchd, the first process macOS starts, which runs background services and adopts processes whose parent has exited. Next to the parent sits its audit token, a small record the kernel keeps for every process. It holds the process number and a version number, pidversion, that changes when macOS gives the same number to a new process, so the token tells one parent from a later process that reuses its number. The responsible process has an audit token of its own. Part one ran into it twice. eslogger runs as a launchd daemon, a background service that launchd starts, which makes it its own responsible process. When I switched off its Full Disk Access, the TCC permission that opens all protected files on the Mac, Endpoint Security refused it because the “responsible process needs TCC Full Disk Access”. A second eslogger I started by hand from Terminal was refused for the same reason, because there the responsible process was Terminal, which no longer had that access.

The initiator only exists where Apple added it. tcc_modify, the event for a change to a TCC permission, arrived with macOS 15.4 and carries, next to identity, the app whose permission changed, both the initiator and the responsible process for the modification, and both are optional: Patrick Wardle’s first look at the event found the responsible process empty more often than set. btm_launch_item_add, the event for a new login item or launch daemon, carries an initiator too. In both, the process field holds the daemon that owns the subsystem: tccd for permissions, and backgroundtaskmanagementd, which keeps the list of login items and background services, for launch items. A rule that reads process first reads that daemon.

Eighty-one events from a single click

The burst holds 81 events, between 23:47:53.761 and 23:47:57.342, and none of them is a duplicate. This is the search that shows it. Every search in this article runs over the Mac’s index (its name shortened here to mac), drops copies of events indexed twice with dedup _raw, and reads the fields es-filter wrote: proc for the event’s process, target for the program a launch starts, and detail for everything specific to the event type. This one groups the burst by what changed and prints the first and the last time of each group.

index=mac sourcetype=macos:es type=tcc_modify earliest="11/03/2026:23:46:00" latest="11/03/2026:23:49:00"
| dedup _raw
| fillnull value="-"
| stats count min(_time) as first max(_time) as last by detail.service detail.right_name detail.reason_name detail.update_type_name detail.instigator.responsible_src
| eval first=strftime(first,"%H:%M:%S.%3N"), last=strftime(last,"%H:%M:%S.%3N")

The burst of 3 November grouped by what changed: one user_consent event at 23:47:53.761, then 80 service_policy events from 23:47:54.942 to 23:47:57.342, all creating a SystemPolicyAppDataDetailed record with the right limited. Index name redacted.

The first event has the reason user_consent, which Apple’s header describes as the user answering a dialog. I granted Terminal access, and the event names the TCC service SystemPolicyAppDataDetailed and the right limited; Apple does not document what that service covers. The other 80 come between 1.2 and 3.6 seconds later, with the reason service_policy, which I found no documentation for. Apart from the sequence number, eslogger’s running count of events, and the timestamp, they are identical, down to the initiator and the responsible process and the version numbers of both, so one sandboxd and one Terminal stand behind all 81. Every one of them is logged as a new record being created. Why one decision was written 80 times, I don’t know. The same macOS release, 27.2, gave part one a Full Disk Access switch in System Settings that showed one state while tccd enforced the other (reported to Apple), and nothing in the index connects the two.

So all four answers are right, each to its own question. tccd reported the change, sandboxd passed the request on, Terminal is the app macOS holds responsible, and the decision was mine, taken once, in the first event. A rule that alerts on every change to a privacy permission would have raised 81 alerts for one click.

One process, three programs

To see what led up to the permission dialog, I queried Splunk for every launch the index kept in the three minutes before it appeared. A launch is an exec event: a process replaces the program it runs with another one and keeps its process number. The search lists, for each launch, the program before (proc.path), the program after (target.path) and the responsible process with the way es-filter found it:

index=mac sourcetype=macos:es type=exec earliest="11/03/2026:23:45:00" latest="11/03/2026:23:48:00"
| dedup _raw
| eval when=strftime(_time,"%H:%M:%S.%3N")
| table when proc.path target.path proc.responsible_path proc.responsible_src
| sort when

Every launch the index kept from 23:45 to 23:48 on 3 November: the git credential chain at 23:46:22 and 23:46:23 with Terminal as the responsible process from the live lookup, the DNS script at 23:47:17, and xpcproxy starting python3 once a minute, responsible for itself. Index name redacted.

At 23:46:22.076 git talked to GitHub over HTTPS, from the copy of this very website on my disk, and needed my credentials. Read straight down the table, the launches form a chain. git-remote-http, git’s HTTPS helper, starts sh, sh starts bash, bash starts the GitHub command-line tool gh, and gh starts security, Apple’s command-line tool for the keychain, where macOS keeps passwords. That is how I read it the first time, and how I first drew it. The parent field says otherwise. This search lists the same launches with the parent es-filter wrote for each:

index=mac sourcetype=macos:es type=exec earliest="11/03/2026:23:46:22" latest="11/03/2026:23:46:24"
| dedup _raw
| eval when=strftime(_time,"%H:%M:%S.%3N")
| table when proc.path proc.parent_path proc.parent_src target.path
| sort when

The launches of 23:46:22 to 23:46:24 with the parent es-filter wrote for each: sh, bash and gh have git-remote-http as their parent, security has gh, and every answer came from the cache. Index name redacted.

sh, bash and gh all have the same parent, git-remote-http. They are one process that changed its program three times: on this Mac /bin/sh handed itself over to bash, and bash, given a single command, replaced itself with gh. Only security is a new process, a child of gh. In an exec event, process is the program the process ran just before the exec. Right after a new process starts, that is still a copy of its parent. After an earlier exec, it is the process’s own previous program. Nothing in proc.path says which of the two it is. The parent field does, and es-filter answered it from its cache on every row.

Git went through this four times in under two seconds, twice to read the credential and twice to store it back, and only the reads started security. The responsible process is Terminal for every one of these launches, and es-filter found that answer through the live lookup described below, at a moment when Terminal was certainly still open.

One credential read by git. git-remote-http starts a new process, which runs sh, then bash, then gh without ever becoming a new process; gh starts security as a new process. Both processes have Terminal as their responsible process, a name es-filter found through its live lookup. The launch of git-remote-http itself was dropped by the filter.

A rule written on the parent sees gh starting security, which is worth a second look. The responsible process adds that it happened in a Terminal session I had open.

At 23:47:17 Terminal started one more thing, bash running a script that sets up DNS for the same website. The first program in it that es-filter would keep is gcloud, Google Cloud’s command-line tool, and no launch of gcloud appears, so the script most likely stopped before it got there, on its configuration check. After that, for the 36 seconds up to the dialog, nothing launched from Terminal reached the index.

That gap is my pipeline’s doing. es-filter drops every launch of an Apple platform binary that is not on its list of 46 tools, and eslogger on this Mac does not subscribe to file events, the events for reading and writing files. If something I typed reached into another app’s data with ls, cat or find, the kernel reported the launch and es-filter threw it away. The trail behind those 81 events ends at my own click. Whatever made macOS show the dialog, if it was one of those commands, was dropped by design.

Brokers in the initiator field

Part one already had an initiator that was not the actor. When I registered the sensor’s own two launch daemons, eslogger and es-filter, both btm_launch_item_add events named /usr/libexec/smd, Apple’s service management daemon, as the initiator, and my installer script appeared in neither. That is why the persistence rule in part one, the Splunk rule that flags new login items and launch daemons, looks at what was installed, the item’s URL and its executable path, and never at who installed it.

Configuration profiles work the same way. A configuration profile is a bundle of settings that a device management (MDM) server, or a user, installs on a Mac, and mdmclient is the macOS program that handles them. The three profile_add events from part one, on 1 November at 21:35, name mdmclient both as the process that reported them and as the initiator, and so do three more on 4 November and three on 5 November. The Mac has no device management at all. The search lists every profile installation in the index with both fields:

index=mac sourcetype=macos:es type=profile_add earliest="10/16/2026:00:00:00" latest="11/08/2026:11:00:00"
| dedup _raw
| table _time proc.path detail.instigator.path

Every profile installation in the index: nine profile_add events on 1, 4 and 5 November, each with mdmclient as both the reporting process and the initiator. Index name redacted.

In April 2024 a developer asked on Apple’s forums why the initiator of a profile event was always mdmclient, whether the change came from System Settings, an MDM server or the profiles command. Quinn, an engineer in Apple’s Developer Technical Support, replied that the profile system could do a better job of passing the real initiator to Endpoint Security, and asked for a bug report. The developer who had asked filed it as FB13751871. So on a Mac, mdmclient in that field tells you a profile changed, and nothing about who changed it.

Privacy permissions have more brokers than that. Between 16 October and the morning of 8 November the index holds 143 tcc_modify events. Every one of them names an initiator, and the field names nine different programs. This search counts them by initiator, by the kind of change (create, modify or delete a permission record) and by the reason the event gives:

index=mac sourcetype=macos:es type=tcc_modify earliest="10/16/2026:00:00:00" latest="11/08/2026:11:00:00"
| dedup _raw
| eval upd=coalesce('detail.update_type_name', 'detail.update_type'), why=coalesce('detail.reason_name', 'detail.reason')
| fillnull value="(none)" detail.instigator.path
| stats count dc(detail.identity) as apps min(_time) as first max(_time) as last by detail.instigator.path upd why
| eval first=strftime(first,"%F %T"), last=strftime(last,"%F %T")
| sort - count

All 143 tcc_modify events from 16 October to the morning of 8 November by initiator, kind of change and reason: sandboxd, the Privacy & Security pane, cloudd and six more, with numeric codes from the filter’s first version. Index name redacted.

The rows with numbers instead of names come from the first version of es-filter, which did not translate the codes yet; until 19 October 1 and 2 meant create and user_consent, and 2 and 3 meant modify and user_set. Counted together, sandboxd passed on 95 changes, 81 of them in the burst of 3 November. The Privacy & Security pane of System Settings, a program called SecurityPrivacyExtension, made 27: every switch I moved there in my tests shows up under that name, with the reason user_set. tccutil, the command line tool that resets permissions, deleted two records, and eslogger created two.

The other initiators answer the question differently again. They are in this search, which leaves out the ones above:

index=mac sourcetype=macos:es type=tcc_modify earliest="10/16/2026:00:00:00" latest="11/08/2026:11:00:00" NOT detail.instigator.path IN ("/usr/libexec/sandboxd", "*SecurityPrivacyExtension", "/usr/bin/*")
| dedup _raw
| sort 0 _time
| eval when=strftime(_time,"%F %T"), initiator=replace('detail.instigator.path', ".*/", ""), responsible=coalesce(replace('detail.responsible.path', ".*/", ""), "-"), reason=coalesce('detail.reason_name', 'detail.reason')
| table when initiator detail.identity detail.service reason responsible

The 17 tcc_modify events whose initiator is neither sandboxd, the Privacy & Security pane nor a tool in /usr/bin: Python on 19 October, calaccessd for Rohan on 1 November, and fifteen Liverpool and Ubiquity grants by cloudd, syncdefaultsd and facetimemessagestored, none with a responsible process. Index name redacted.

On 1 November at 16:49 Rohan, a small app of mine that syncs calendars, asked for access to my calendar, and I allowed it. That one event gives four answers on one line. tccd reported it, the initiator is calaccessd, a daemon from Apple’s calendar framework, Rohan is the responsible process, and the reason is user_consent, my answer to the dialog. On 19 October I set up a throwaway Python environment from Terminal, installed bleak, a Python library for Bluetooth Low Energy, and ran a short script fed to Python on standard input. Under five seconds later a TCC event gave Python access to Bluetooth with no broker at all. The initiator is the interpreter itself, and not under the name I typed: the python command execs into Python.app inside Homebrew’s Python framework, the same process taking a second program, and that second program is the one the event names. The responsible process is Terminal.

Fifteen events carry the same reason as the switches in System Settings, user_set, and none of them came from the Settings pane. Their initiators are cloudd, the daemon of Apple’s CloudKit framework, and two more Apple daemons, syncdefaultsd and facetimemessagestored. Each of them grants an Apple system service, from com.apple.coretelephony to com.apple.icloud.findmydeviced, access to Liverpool or Ubiquity, two TCC services that Apple does not document and that I found no reliable description of. None of the fifteen has a responsible process. They start on the evening of 1 November, the day this Mac installed macOS 27.2, eight of them within 40 seconds at 20:13, and end on the morning of 2 November. The index says nothing more about why they came. A rule that reads user_set as a click in System Settings would put all fifteen on me.

Python every minute, on xpcproxy’s account

Once a minute the index shows xpcproxy launching /usr/bin/python3, and the responsible path es-filter writes for that launch is xpcproxy too. Taken at face value, an Apple helper runs Python on my Mac every minute and answers for it.

It is a script of mine that samples LuLu, Objective-See’s free firewall for outgoing connections, which runs on this Mac, started by launchd as a root daemon every 60 seconds. The misreading is the one from the git chain. For a launchd job, the program a process runs just before the exec is xpcproxy, the small program launchd uses to set a job up, and the same process becomes Python an instant later. A launchd daemon is its own responsible process, and es-filter’s self on all three launches confirms it for this one. So the responsible path es-filter writes is the only path it has for that process, the one about to be replaced.

Where es-filter gets the names

eslogger names the parent and the responsible process only by process number. This is the part of es-filter 0.2.0 that turns those numbers into program names, as it ran for every event in this article, trimmed only where it does something else:

DROP_KEYS = frozenset({"env", "fds", "audit_token", "parent_audit_token", "responsible_audit_token"})
CACHE_MAX = 8192

class EsFilter:
    def remember(self, pid, path):
        if isinstance(pid, int) and path:
            self.cache[pid] = path
            self.cache.move_to_end(pid)
            if len(self.cache) > CACHE_MAX:
                self.cache.popitem(last=False)

    def resolve(self, pid):
        if not isinstance(pid, int):
            return None, "none"
        if pid in self.cache:
            return self.cache[pid], "cache"
        if self.live is not None:
            self.c.live_lookups += 1
            path = self.live(pid)
            if path:
                return path, "live"
        return None, "none"

    def learn(self, ev, body, et):
        p = ev.get("process") or {}
        self.remember((p.get("audit_token") or {}).get("pid"), (p.get("executable") or {}).get("path"))
        if et == "exec":
            tgt = (body.get(et) or {}).get("target") or {}
            self.remember((tgt.get("audit_token") or {}).get("pid"), (tgt.get("executable") or {}).get("path"))

    def proc_slim(self, p, attribute=False):
        at = p.get("audit_token") or {}
        rat = p.get("responsible_audit_token") or {}
        out = {
            "pid": at.get("pid"),
            "pidversion": at.get("pidversion"),
            "ppid": p.get("ppid"),
            "original_ppid": p.get("original_ppid"),
            "responsible_pid": rat.get("pid"),
            "path": (p.get("executable") or {}).get("path"),
            ...
        }
        if attribute:
            out["parent_path"], out["parent_src"] = self.resolve(p.get("ppid"))
            if out["responsible_pid"] == out["pid"]:
                out["responsible_path"], out["responsible_src"] = out["path"], "self"
            else:
                out["responsible_path"], out["responsible_src"] = self.resolve(out["responsible_pid"])
        return out

The whole of es-filter 0.2.0, 630 lines of Python with no dependencies outside the standard library, is published here as plain text. It is byte for byte the file that ran on the Mac, SHA-256 188ec6a85aa797ed44fb096ead2e17bfa44f1c58f319996ca9b6edf645154726, so you can check it against the excerpt and against everything this article says it does.

Read from the bottom up, the excerpt does four things.

  1. proc_slim() decides what the record keeps. For the process the event is about, it keeps the process number and its version, pidversion, which changes when a number is reused. For the parent and the responsible process it keeps only the numbers, ppid and responsible_pid. Their versions sit in parent_audit_token and responsible_audit_token, and DROP_KEYS removes both from the record.
  2. self comes first. If the responsible process number is the process’s own number, es-filter writes the event’s own program and marks it self. Otherwise both numbers go to resolve().
  3. resolve() tries its memory, then the running Mac. It answers from the cache and marks the answer cache. If the number is not there, it asks macOS with proc_pidpath() which program runs under that number at this moment, and marks the answer live. If neither works, the path stays empty and the mark is none.
  4. learn() and remember() fill the cache. After every event, including the launches it is about to throw away, es-filter stores the event’s process number with its program, and on a launch also the number with the new program. It keeps the 8,192 numbers it saw last and forgets the oldest. Part one’s excerpt shows that learn() runs after the event has been attributed, so a launch never names itself as its own parent.

The excerpt leaves out where proc_slim() is called, and that decides which processes get names. An event can carry more than one process record, and es-filter does not treat them all alike. The process the event is about, in the process field that every event has, gets the full treatment: eslogger gives its parent and its responsible process only as process numbers, and es-filter writes down a program for each number and marks how it found it, self, cache, live or none. The same happens to every process record nested in the details of an event that is not a launch. In this article those are the initiator of a tcc_modify, a btm_launch_item_add or a profile_add event, and the responsible process that a tcc_modify event names for the modification. Each of these records arrives whole, with its own audit token and its own version number, but its own parent and its own responsible process again arrive as numbers, and es-filter resolves them in the same way. A launch is the exception. The program the process becomes, the target of an exec event, keeps its numbers and nothing more: es-filter writes no parent or responsible path for it, so every launch search above reads the names from proc, the program the process ran before the launch.

This search counts, over every event in the index, which of those ways gave the names of the parent and the responsible process of the event’s own process:

index=mac sourcetype=macos:es type=* earliest="10/16/2026:00:00:00" latest="11/08/2026:11:00:00"
| dedup _raw
| fillnull value="(none)" proc.parent_src proc.responsible_src
| stats count by proc.parent_src proc.responsible_src
| eventstats sum(count) as total
| eval pct=round(100*count/total,2)
| sort - count

Every event from 16 October to the morning of 8 November counted by how es-filter found the parent and the responsible process: cache, live, self, none, or no attribution fields at all. Index name redacted.

Between 16 October and the morning of 8 November, 159,596 events carried those fields. In 112,500 of them, 70.5 per cent, the responsible path came from the live lookup. In 39,295 the process was responsible for itself, the cache answered 7,737, and 64 had no answer. For the parent, the cache answered 86,404 times, the live lookup 61,990 times, and 11,202 events, one in fourteen, have no parent path at all.

The other 67,806 events in the window carry no such fields: 47,531 come from the first four days, before es-filter wrote any names, the last of them at 20:23:06 on 20 October, and 20,275 are es-filter’s own heartbeats and start records.

Of 159,596 events, 112,500 name their responsible process as it was when the filter read them.

A live answer is whatever program runs under that number when the filter gets to the event. That can be a second after it happened, or minutes later: after a restart, es-filter picks up eslogger’s file where it stopped and works through the events that piled up meanwhile. For a responsible process that lives as long as Terminal or a browser it is very likely the right program, and the record cannot show that it is. Both limits are in es-filter’s documentation: a live path is “the state when the filter read it, not when the event happened”, and a cached path “can be wrong after pid reuse”, with the process version “there to check”. The second promise does not hold. The record keeps a version only for the processes it describes in full: the event’s own process and the records nested in its details. For each of them, the version of its parent and of its responsible process leaves the record together with the audit tokens that carry it, so a reader has nothing to check those paths against.

My lab’s documentation had also left open how often attribution fails altogether. The answer for this window is 64 events without a responsible process and one in fourteen without a parent.

The rules I am changing

The persistence rule from part one stays as it is, keyed on the item and its executable, because the initiator of a new launch item is Apple’s broker.

The table of privacy changes on the Mac’s Splunk dashboard from part one will group events that share a service, an app and a responsible process within a few seconds, and show the user’s decision first. The burst of 3 November then reads as one decision and 80 repeats. A rule on these events alerts once per group, on the decision.

The filter’s next version will keep the version number for the parent and the responsible process, and key its cache on the number and the version together. Until then, a path marked live is where I start looking, and a path marked cache, with a version I can compare, is what I would put in a report.

In the burst of 3 November, the field that answered who did it was none of the four that name a process. It was the reason on the first of 81 events, user_consent.

Sources

Updates and errata

  • First published. Data from 16 October to 8 November 2026.
  • update Linked the third-party tools and products the text names, for readers who do not know them.
Tango, co-author