mac-monitor: Understanding Endpoint Security Framework Events on macOS

Explore mac-monitor to deeply understand Endpoint Security Framework events on macOS. Learn what exec, fork, open, rename, and other ES events mean, with practical examples and output interpretation.

mac-monitor is an excellent open-source tool for observing macOS at a low level, but its real value shines when you truly understand the Endpoint Security Framework (ESF) events it surfaces.

Endpoint Security events aren’t just raw notifications – they reveal the inner workings of process creation, file access, network activity, and more. In this guide, we’ll use mac-monitor as our window into ESF to break down the most important event types:

  • EXEC and FORK: Process lifecycle events – what they tell you about new processes and their origins
  • OPEN, RENAME, UNLINK: File operations and how to spot suspicious modifications
  • NETWORK events (when available): Outbound connections and their context
  • Authorization decisions: Allow vs. deny, caching, and performance implications
  • Event structure deep dive: Paths, PIDs, signatures, responsible auditors, and flags

Through live mac-monitor runs and annotated output, you’ll learn to interpret these events confidently – whether for security research, malware analysis, troubleshooting, or building your own tools.

No prior ESF expertise required – just clone mac-monitor and follow along. By the end, you’ll see macOS system activity in a whole new light.

More information and download is located here:


mac-monitor Event Classes

These are the Event Classes (categories) in mac-monitor‘s graphical interface. When you start a trace/session, the app lets you toggle subscriptions to groups of related Endpoint Security Framework (ESF) events.

This grouping makes it easy for beginners to enable/disable entire categories at once, reducing noise and focusing on specific areas (e.g., turn on only “Process” and “File system” for basic malware hunting). Each class bundles multiple individual ES event types (like ES_EVENT_TYPE_NOTIFY_EXEC), and mac-monitor enriches them with extra metadata (e.g., code signing certs, paths, quarantine status).

This list provides matches of the current (as of early 2026, v2.1+) organization in the app’s subscription panel – expanded over time from earlier versions (which had fewer, like just Process, File, Interprocess). Some classes cover core ES events, while others include macOS-specific behaviors or enrichments.

Here’s a breakdown in a table for clarity:

Event ClassDescriptionKey Events/Examples IncludedUse Cases for Security/Monitoring
ProcessCore process lifecycle eventsNOTIFY_EXEC, NOTIFY_FORK, NOTIFY_EXIT, process args/env varsDetecting new process launches, command-line activity, malware execution
InterprocessCommunication/coordination between processesSignals, remote thread creation, task port accessSpotting process injection or debugging attempts
File systemBasic file operationsCREATE, OPEN, WRITE, CLOSE, RENAME, DELETE/UNLINKTracking file drops, modifications, ransomware patterns
File metadataChanges to file attributes and extended infoSETATTRLIST, SETEXTATTR, SETFLAGS, SETMODE, SETOWNER, time changesDetecting timestamp stomping or metadata tampering
File system mountingMounting/unmounting volumesMOUNT, UNMOUNT, REMOUNTMonitoring external drives or filesystem changes
Code signingCode signature validation and invalidationCS_INVALIDATED, CODE_SIGNATURE_VALIDATEDIdentifying tampered or unsigned binaries
GatekeeperApple’s app execution policy enforcementRelated to quarantine checks and validation (enriched from signing events)Spotting blocked/ad-hoc app runs
XProtectApple’s built-in malware scanner detectionsEnrichments from scans/remediations (e.g., YARA signature hits)Detecting known threats via Apple’s engine
KernelKernel-level extensions and low-level opsKEXTLOAD, KEXTUNLOAD (rare now due to deprecation)Monitoring legacy kernel code loads
LoginUser login/logout eventsLogin-related hooks (e.g., session creation)Tracking user sessions or login items
MDMMobile Device Management profile changesMDM enrollment or command eventsEnterprise monitoring for managed devices
Memory mappingMemory allocation and protection changesMMAP, MPROTECTDetecting code injection or shellcode execution (e.g., RWX pages)
OpenSSHSSH-specific activitiesSSH key access or connection eventsMonitoring remote access attempts
SocketNetwork socket operationsBIND, CONNECT, LISTENTracking outbound/inbound connections (potential C2)
AuthorizationAuthorization checks (e.g., auth/open events)Various AUTH_ events (observable in notify mode)Seeing privilege escalations or denied actions
Service ManagementLaunchd/daemon/agent managementBTM_LAUNCH_ITEM_ADD (Background Task Management)Detecting persistence via LaunchAgents/Daemons
LinkHard/soft link creation and resolutionLINK, READLINK, symlink opsTracking persistence or evasion via links
TCCTransparency, Consent, and Control (privacy permissions)TCC_MODIFY (newer macOS) – changes to privacy grantsDetecting malware requesting camera/mic/screen access
Task portAccess to Mach task portsGET_TASK, GET_TASK_READPreventing/spotting process introspection or injection
XPCXPC inter-process communicationXPC_CONNECT, service creationMonitoring app-to-app or app-to-system communication (mac-monitor uses this itself!)
DirectoryDirectory enumeration and lookupsREADDIR, LOOKUPRecon activity like scanning folders
File ProviderCloud/sync provider interactions (e.g., iCloud)FILE_PROVIDER_MATERIALIZE, FILE_PROVIDER_UPDATETracking cloud file access/modifications
UID/GIDUser/group ID changesSETUID, SETEUID, SETGIDDetecting privilege escalation (e.g., setuid binaries)
ClockSystem time changesSETTIMESpotting time manipulation for evasion

Tips:

  • In the app, you can expand each class to toggle individual events for finer control.
  • Start with a few classes (e.g., Process + File system + Memory mapping) to avoid overwhelming telemetry.
  • Recent versions (post-2025) standardized these to match tools like eslogger for compatibility.

Endpoint Security Framework (ES) Event Types

Apple’s Endpoint Security Framework defines many event types in the es_event_type_t enum. These split into AUTH (authorizable – ES clients can allow/deny before the action) and NOTIFY (notification-only – observe after or during the action).

Below are comprehensive tables based on the latest Apple documentation (as of early 2026), including events up to macOS 15.x. A notable addition in macOS 15.4 is ES_EVENT_TYPE_NOTIFY_TCC_MODIFY for monitoring Transparency, Consent, and Control (TCC) privacy permission changes.

Events provide rich data via specific structs (e.g., es_event_exec_t includes process details, arguments, environment variables, code signing info). In tools like mac-monitor, NOTIFY events are primarily used for observation, enrichment, and correlation.

I’ve grouped them into two tables for readability. Use cases focus on security research, malware analysis, and troubleshooting (relevant to mac-monitor).

Authorization Events (AUTH) – Can Be Allowed/Denied

These allow potential blocking (e.g., in EDR tools).

Event ConstantDescriptionKey Data ProvidedSecurity/Monitoring Use Cases
ES_EVENT_TYPE_AUTH_CHDIRChange working directoryTarget path, processDetect navigation to suspicious directories
ES_EVENT_TYPE_AUTH_CHROOTChange root directoryNew root pathSpot containment escapes or jailbreaks
ES_EVENT_TYPE_AUTH_CLONEClone a fileSource/target filesMonitor file duplication for persistence
ES_EVENT_TYPE_AUTH_COPYFILECopy a fileSource/targetTrack data exfiltration attempts
ES_EVENT_TYPE_AUTH_CREATECreate a filePath, modeDetect new malware drops or persistence files
ES_EVENT_TYPE_AUTH_DELETEEXTATTRDelete extended attributeFile, attribute nameMonitor tampering with quarantine/metadata
ES_EVENT_TYPE_AUTH_EXCHANGEDATAExchange data between filesTwo file pathsDetect atomic file swaps (common in malware)
ES_EVENT_TYPE_AUTH_EXECExecute a binaryTarget executable, args, signing infoBlock/prevent malicious executions
ES_EVENT_TYPE_AUTH_FCNTLFile control operationsFile descriptor, commandMonitor lock acquisitions or flags
ES_EVENT_TYPE_AUTH_FILE_PROVIDER_MATERIALIZEFile provider materializeFile referenceCloud sync monitoring
ES_EVENT_TYPE_AUTH_FILE_PROVIDER_UPDATEFile provider updateUpdated fileDetect cloud-based modifications
ES_EVENT_TYPE_AUTH_FSGETPATHGet filesystem pathFile referenceTrack path resolutions
ES_EVENT_TYPE_AUTH_GET_TASKGet task control portTarget processPrevent process injection/debugging
ES_EVENT_TYPE_AUTH_GET_TASK_READGet task read portTarget processSimilar to above, read-only access
ES_EVENT_TYPE_AUTH_GETATTRLISTGet file attributesFile, attribute listMonitor attribute queries
ES_EVENT_TYPE_AUTH_GETEXTATTRGet extended attributeFile, attributeQuarantine or metadata checks
ES_EVENT_TYPE_AUTH_IOKIT_OPENOpen IOKit deviceDevice class, user client typeBlock hardware access (e.g., keyloggers)
ES_EVENT_TYPE_AUTH_KEXTLOADLoad kernel extensionKEXT pathPrevent unauthorized kernel code (rare now)
ES_EVENT_TYPE_AUTH_LINKCreate hard linkSource/targetDetect persistence via links
ES_EVENT_TYPE_AUTH_LISTEXTATTRList extended attributesFileMetadata enumeration
ES_EVENT_TYPE_AUTH_MMAPMap file into memoryFile, protection flagsDetect code injection via mappings
ES_EVENT_TYPE_AUTH_MOUNTMount filesystemMount pointBlock unauthorized mounts
ES_EVENT_TYPE_AUTH_MPROTECTChange memory protectionAddress, protectionDetect RWX memory for shellcode
ES_EVENT_TYPE_AUTH_OPENOpen a filePath, flags (read/write/etc.)Control sensitive file access
ES_EVENT_TYPE_AUTH_PROC_CHECKCheck process infoTarget PID, flavorPrevent process enumeration
ES_EVENT_TYPE_AUTH_PROC_SUSPEND_RESUMESuspend/resume process socketsTarget processNetwork disruption attempts
ES_EVENT_TYPE_AUTH_READDIRRead directoryDirectory pathDirectory scanning for recon
ES_EVENT_TYPE_AUTH_READLINKRead symlinkSymlink pathTrack symlink resolutions
ES_EVENT_TYPE_AUTH_REMOUNTRemount filesystemMount point, flagsFilesystem tampering
ES_EVENT_TYPE_AUTH_RENAMERename fileSource/target pathsDetect overwrite techniques (e.g., ransomware)
ES_EVENT_TYPE_AUTH_SEARCHFSSearch filesystemVolumeVolume searches
ES_EVENT_TYPE_AUTH_SETACLSet ACLFile, ACLPermission escalations
ES_EVENT_TYPE_AUTH_SETATTRLISTSet attributesFile, attributesMetadata changes
ES_EVENT_TYPE_AUTH_SETEXTATTRSet extended attributeFile, attributeQuarantine bypassing
ES_EVENT_TYPE_AUTH_SETFLAGSSet file flagsFile, flagsImmutable/append-only changes
ES_EVENT_TYPE_AUTH_SETMODESet file modeFile, modePermission changes
ES_EVENT_TYPE_AUTH_SETOWNERSet file ownerFile, ownerOwnership escalations
ES_EVENT_TYPE_AUTH_SETTIMESet system timeNew timeDetect time stomping
ES_EVENT_TYPE_AUTH_SIGNALSend signalTarget process, signalProcess termination attempts
ES_EVENT_TYPE_AUTH_TRUNCATETruncate fileFileData destruction
ES_EVENT_TYPE_AUTH_UIPC_BINDBind UNIX socketSocket pathLocal IPC setup
ES_EVENT_TYPE_AUTH_UIPC_CONNECTConnect UNIX socketSocketLocal communication
ES_EVENT_TYPE_AUTH_UNLINKDelete filePathPrevent file deletions
ES_EVENT_TYPE_AUTH_UTIMESChange file timesFile, timesTimestamp manipulation

Notification Events (NOTIFY) – Observation Only

These are post-action or during-action notifications (most common in mac-monitor).

Event ConstantDescriptionKey Data ProvidedSecurity/Monitoring Use Cases
ES_EVENT_TYPE_NOTIFY_ACCESSCheck file accessFile, modePermission probes
ES_EVENT_TYPE_NOTIFY_CHDIRChange directoryPathNavigation tracking
ES_EVENT_TYPE_NOTIFY_CHROOTChange rootPathContainment changes
ES_EVENT_TYPE_NOTIFY_CLONEClone fileFilesDuplication tracking
ES_EVENT_TYPE_NOTIFY_CLOSEClose fileFile descriptor, modified flagFile session end
ES_EVENT_TYPE_NOTIFY_COPYFILECopy fileSource/targetData copying
ES_EVENT_TYPE_NOTIFY_CREATECreate filePathNew file drops (malware/persistence)
ES_EVENT_TYPE_NOTIFY_CS_INVALIDATEDCode signature invalidatedProcessTampering detection
ES_EVENT_TYPE_NOTIFY_DELETEEXTATTRDelete extended attrFile, attrMetadata removal
ES_EVENT_TYPE_NOTIFY_DUPDuplicate FDFDHandle passing
ES_EVENT_TYPE_NOTIFY_EXCHANGEDATAExchange file dataFilesAtomic swaps
ES_EVENT_TYPE_NOTIFY_EXECExecute binaryProcess, args, env, signingProcess launches (core for malware detection)
ES_EVENT_TYPE_NOTIFY_EXITProcess exitProcess, exit codeProcess termination
ES_EVENT_TYPE_NOTIFY_FCNTLFile controlFD, commandLocks/flags
ES_EVENT_TYPE_NOTIFY_FILE_PROVIDER_MATERIALIZEMaterialize fileFileCloud file access
ES_EVENT_TYPE_NOTIFY_FILE_PROVIDER_UPDATEUpdate fileFileCloud modifications
ES_EVENT_TYPE_NOTIFY_FORKFork processChild processProcess creation
ES_EVENT_TYPE_NOTIFY_FSGETPATHGet pathPathPath resolution
ES_EVENT_TYPE_NOTIFY_GETATTRLISTGet attributesFileAttribute reads
ES_EVENT_TYPE_NOTIFY_GETEXTATTRGet extended attrFile, attrQuarantine checks
ES_EVENT_TYPE_NOTIFY_GET_TASK*Get task portsTarget processDebugging/injection
ES_EVENT_TYPE_NOTIFY_IOKIT_OPENOpen IOKitDeviceHardware interaction
ES_EVENT_TYPE_NOTIFY_KEXTLOAD/UNLOADLoad/unload KEXTKEXT pathKernel changes (deprecated)
ES_EVENT_TYPE_NOTIFY_LINKCreate hard linkFilesPersistence
ES_EVENT_TYPE_NOTIFY_LISTEXTATTRList extended attrsFileMetadata enum
ES_EVENT_TYPE_NOTIFY_LOOKUPPath lookupPathRecon
ES_EVENT_TYPE_NOTIFY_MMAPMap memoryFile, flagsInjection detection
ES_EVENT_TYPE_NOTIFY_MOUNT/UNMOUNTMount/unmountMount pointFilesystem changes
ES_EVENT_TYPE_NOTIFY_MPROTECTChange memory protectionAddress, protShellcode prep
ES_EVENT_TYPE_NOTIFY_OPENOpen filePath, flagsFile access tracking
ES_EVENT_TYPE_NOTIFY_PTY_*Pseudoterminal opsPTY deviceInteractive shells
ES_EVENT_TYPE_NOTIFY_READDIRRead directoryDirDirectory enumeration
ES_EVENT_TYPE_NOTIFY_READLINKRead symlinkSymlinkSymlink tracking
ES_EVENT_TYPE_NOTIFY_REMOTE_THREAD_CREATECreate remote threadTarget processInjection
ES_EVENT_TYPE_NOTIFY_REMOUNTRemountMountFilesystem flags
ES_EVENT_TYPE_NOTIFY_RENAMERenameSource/targetOverwrite/ransomware
ES_EVENT_TYPE_NOTIFY_SET* (ACL, ATTR, EXTATTR, FLAGS, MODE, OWNER, TIME, etc.)Set various attributesFile, new valuesPermission/metadata changes
ES_EVENT_TYPE_NOTIFY_SETEUID/SETUID etc.Privilege changesNew IDsEscalation detection
ES_EVENT_TYPE_NOTIFY_SIGNALSend signalTarget, signalKill attempts
ES_EVENT_TYPE_NOTIFY_STATStat fileFileFile info queries
ES_EVENT_TYPE_NOTIFY_TRACETrace processTargetDebugging
ES_EVENT_TYPE_NOTIFY_TRUNCATETruncate fileFileData wipe
ES_EVENT_TYPE_NOTIFY_UIPC_*UNIX socket opsSocketLocal IPC
ES_EVENT_TYPE_NOTIFY_UNLINKDelete filePathDeletion tracking
ES_EVENT_TYPE_NOTIFY_WRITEWrite to fileFileModification/ransomware
ES_EVENT_TYPE_NOTIFY_TCC_MODIFY (macOS 15.4+)TCC permission modifyService, identity, right, reasonDetect privacy grants (e.g., malware getting Accessibility)

This covers the core set; some niche events (e.g., XPC connect, launch items) may exist in specific macOS versions but aren’t universally listed. In mac-monitor, toggle these in the UI to reduce noise – start with EXEC, FORK, EXIT, CREATE, OPEN, WRITE, RENAME, UNLINK for basic monitoring.


Guided Walkthrough of Mac Monitor: Step-by-Step Usage with Explanations and Real-World Examples

  • Upon launch, Mac Monitor establishes an XPC connection to its System Extension, which subscribes to ES events. This extension remains dormant until a trace is started, minimizing resource usage. The app’s interface will appear as a clean window with a toolbar at the top, a central table for event display, and a left sidebar for process trees.
  • Click the “Start” button in the toolbar. Events will begin populating the table in real-time. This activates the System Extension to subscribe to ES event types, such as process creations (ES_EVENT_TYPE_NOTIFY_FORK and ES_EVENT_TYPE_NOTIFY_EXEC), file operations (ES_EVENT_TYPE_NOTIFY_WRITE), or memory mappings (ES_EVENT_TYPE_NOTIFY_MMAP). Events are enriched with metadata like code signing certificates, environment variables, and quarantine status (e.g., for downloaded files).
  • You may see a flood of system events from background processes. This is normal; macOS generates thousands of events per minute. To manage noise, proceed to filtering in later steps.

Real-World Example 1: Monitoring Basic File Operations via Terminal

Simulate a simple file creation and access, common in debugging or detecting unauthorized modifications.

  1. Open Terminal.app (or any shell).
  2. Run: touch ~/Desktop/testfile.txt (creates an empty file).
  3. Then: echo “Hello, world” > ~/Desktop/testfile.txt (writes content).
  4. Finally: ls ~/Desktop (lists directory contents).

Expected in Mac Monitor:

  • Look for ES_EVENT_TYPE_NOTIFY_CREATE for the touch command, showing the initiating process as /bin/zsh (or your shell) and target path /Users/<yourusername>/Desktop/testfile.txt.
  • The echo triggers ES_EVENT_TYPE_NOTIFY_WRITE, enriched with metadata like file permissions and no quarantine (since it’s locally created).
  • ls generates ES_EVENT_TYPE_NOTIFY_EXEC or ES_EVENT_TYPE_NOTIFY for directory reads.

This example mirrors real-world threat hunting, where monitoring file writes could detect ransomware encrypting documents.

Real-World Example 2: Monitoring a Network Download and Process Execution

Emulate downloading and running a script, useful for analyzing potential malware or app behaviors.

  1. Run: curl -O http://malware.wicar.org/data/eicar.com (downloads a file; replace with a safe URL).
  2. Then: chmod +x eicar.com (makes it executable).

Stay In Touch.

Let's Get Creative.