Skip to content

macOS Apple Events โ€‹

Learn AWS hacking from zero to hero with htARTE (HackTricks AWS Red Team Expert)!

Other ways to support HackTricks:

Basic Information โ€‹

Apple Events are a feature in Apple's macOS that allows applications to communicate with each other. They are part of the Apple Event Manager, which is a component of the macOS operating system responsible for handling interprocess communication. This system enables one application to send a message to another application to request that it perform a particular operation, like opening a file, retrieving data, or executing a command.

The mina daemon is /System/Library/CoreServices/appleeventsd which registers the service com.apple.coreservices.appleevents.

Every application that can receive events will checking with this daemon providing its Apple Event Mach Port. And when an app wants to send an event to to it, the app will request this port from the daemon.

Sandboxed applications requires privileges like allow appleevent-send and (allow mach-lookup (global-name "com.apple.coreservices.appleevents)) in order to be able to send events. Noten that entitlements like com.apple.security.temporary-exception.apple-events could restrict who have access to send events which will need entitlements like com.apple.private.appleevents.

โœ…

It's possible to use the env variable AEDebugSends in order to log informtion about the message sent:

bash
AEDebugSends=1 osascript -e 'tell application "iTerm" to activate'

Learn AWS hacking from zero to hero with htARTE (HackTricks AWS Red Team Expert)!

Other ways to support HackTricks: