macOS File Extension & URL scheme app handlers
Last updated
Last updated
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE) Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
This is a database of all the installed applications in the macOS that can be queried to get information about each installed application such as URL schemes it support and MIME types.
It's possible to dump this datase with:
Or using the tool lsdtrip.
/usr/libexec/lsd
is the brain of the database. It provides several XPC services like .lsd.installation
, .lsd.open
, .lsd.openurl
, and more. But it also requires some entitlements to applications to be able to use the exposed XPC functionalities, like .launchservices.changedefaulthandler
or .launchservices.changeurlschemehandler
to change default apps for mime types or url schemes and others.
/System/Library/CoreServices/launchservicesd
claims the service com.apple.coreservices.launchservicesd
and can be queried to get information about running applications. It can be queried with the system tool /usr/bin/lsappinfo
or with lsdtrip.
The following line can be useful to find the applications that can open files depending on the extension:
Or use something like SwiftDefaultApps:
You can also check the extensions supported by an application doing:
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE) Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)