Skip to content

Add macOS plugins#1727

Open
EmperorValkorion wants to merge 57 commits into
fox-it:mainfrom
EmperorValkorion:feature/macos-plugins
Open

Add macOS plugins#1727
EmperorValkorion wants to merge 57 commits into
fox-it:mainfrom
EmperorValkorion:feature/macos-plugins

Conversation

@EmperorValkorion

@EmperorValkorion EmperorValkorion commented Apr 21, 2026

Copy link
Copy Markdown

Added various macOS plugins.

  • Parsers for install, system, wifi, fsck_apfs, asl logs and fs events

  • Locale parsers for timezone, language, install date & location services

  • Plist parsers for: LaunchAgents, LaunchDaemons, Login Items, Airport Preferences, Code Signature Coderesources, Contents Info, Contents Version, Global User Preferences, Groups, Installation History, Keyboard Layout, Login Window, Resources Info Strings, User Password Hashes (Shadow), Software Update Preferences, System Preferences, Time Machine, Safari Per Site Zoom Preferences, Safari Downloads, Safari Recently Closed Tabs & Safari User Notification Permissions

  • SQLite parsers for: Authorization Rules, Call History, Directory Services Local Nodes, Duet Activity Scheduler, Duet KnowledgeC, Duet InteractionC, Gatekeeper Opaque, Identity Services, Keychain, Notes, TCC, Text Replacements, User Accounts, Safari Favicons & Safari Per Site Preferences

  • Parsers for macOS cron tabs, at jobs & periodic functions

  • Added parser for Resources Localizable Strings, but it still has some issues (new records do not always begin on a new line). Also have not written tests for this artifact yet. Not sure how valuable the artifact is considering it appears to just contain a list of translations.

  • Added build_records.py helper file to build SQLite and Plist records and match them to the provided record descriptors

This PR was initially based on #1637

ASL & fs events plugins are based on #1717

This PR includes #1753

Comment thread dissect/target/plugins/os/unix/bsd/darwin/macos/logs/fsck_apfs_log.py Outdated
Comment thread dissect/target/plugins/os/unix/bsd/darwin/macos/logs/fsck_apfs_log.py Outdated
Comment thread dissect/target/plugins/os/unix/bsd/darwin/macos/logs/install_log.py Outdated
Comment thread dissect/target/plugins/os/unix/bsd/darwin/macos/logs/install_log.py Outdated
Comment thread dissect/target/plugins/os/unix/bsd/darwin/macos/logs/install_log.py Outdated
Comment thread dissect/target/plugins/os/unix/bsd/darwin/macos/code_signature_coderesources.py Outdated
Comment thread dissect/target/plugins/os/unix/bsd/darwin/macos/contents_info.py Outdated
"""macOS contents info plugin."""

PATHS = (
"/Applications/*/*.app/Contents/Info.plist",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about apps in /Applications/*.app?

Might be nice to add a utility for iterating applications and kexts. It could yield paths for every .app and .kext it finds (within known locations), as well as perform some basic nested plugin/bundle checks for each one. That way, you don't end up with an evergrowing list of glob patterns scattered over different plugins. Plugins that act on these packages would then just look into path / "Contents/Info.plist" for every path the helper returns.

I.e. search within certain paths for *.app, .kext, .framework (/Applications, /System/Library/CoreServices, /System//Library/Extensions etc), then for each of those paths, recursively check for Contents/PlugIns and Contents/Resources and additional apps, kexts, frameworks, plugins and bundles in here.

A applications plugin could utilize this information too (as we also have them for Linux and Windows).

Some suggestions:

  • I forget the exact nomenclature, but I believe Apple generally calls these "bundles", so you could make a bundles.py
  • Within there, you could add some exports (or @internal, which are plugin functions that are solely meant to be used by other plugins, not tools like target-query) for some of the individual types of bundles, and something to iterate over them all
  • This plugin and e.g. the code signature one would simple iterate over the results of that plugin

@EmperorValkorion EmperorValkorion May 27, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added a find_bundle_files helper function in macos/helpers/build_paths.py, but I'm not quite satisfied with the performance yet.

EmperorValkorion and others added 28 commits May 26, 2026 16:26
…ences.py

Co-authored-by: Erik Schamper <1254028+Schamper@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants