Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS: Plugin enhancements for latest kernel compatibility #1116

Draft
wants to merge 24 commits into
base: develop
Choose a base branch
from

Conversation

Abyss-W4tcher
Copy link
Contributor

@Abyss-W4tcher Abyss-W4tcher commented Mar 23, 2024

Hi 👋,

This Pull Request provides updates to existing macOS plugins, for compatibility with recent kernels. It indirectly depends on the work produced in #1115. It is marked as "Draft" for now, but is available for anyone to try !

Instead of opening one PR for each change, I thought it would be easier to track down the global update here.

Changes are mostly small fixes on types and structures naming changes, while keeping the compatibility for older kernels. A couple reworks were necessary for some plugins, and extensions.

Tested on kernels :

  • 10.9.3_build-13D65
  • 10.12.6_build-16G29
  • 10.15.7_build-19H15
  • 12.0.1_build-21A559
  • 13.6.4_build-22G513
  • 14.0_build-23A5257q

Plugins version haven't been bumped for now.

Details

Here are the justifications, in the form of a before/after on kernel structures :

volatility3/framework/symbols/mac/init.py

filedesc :

fileproc :

fileglob :

vnode :

mac.pslist

bsd_info :

mac.kevents

mac.list_files

Recursive logic was updated to an iterative one, as "maximum recursion depth exceeded in comparison" were encountered when deep recursion occured.

volatility3/framework/symbols/mac/extensions/init.py

proc (impacts mac.pslist) :

mac.malfind

Fixes #848. As vm_map_object was removed from the kernel, updates on the logic to get vm_object from a vm_map_entry were done. See :

Here is an article brieflly talking about it :

https://saaramar.github.io/kmem_guard_t_blogpost/#bookkeeping

mac.timers

/!\ 1-1 changes were done, but results don't seem really useful/accurate in recent kernels

@Abyss-W4tcher Abyss-W4tcher marked this pull request as draft March 23, 2024 16:40
@Abyss-W4tcher Abyss-W4tcher changed the title macOS : plugins updates, for recent kernels support macOS: Plugin enhancements for latest kernel compatibility Aug 9, 2024
@ikelos
Copy link
Member

ikelos commented Aug 20, 2024

Where are we with this? Is it still draft, or ready for review? Happy for either, just interested in an update so it doesn't get forgotten accidentally...

@Abyss-W4tcher
Copy link
Contributor Author

Abyss-W4tcher commented Aug 21, 2024

The MH fileset dual modules thing can be reviewed, but I put this to draft as it might need to be reworked the same way the LinuxIntelStacker is reworked in the AArch64 PR, to enhance scalability of the MacStacker.

Currently, we had a few issues determining where to put the modules requirements : #1118

edit: What I said applies to PR #1115, not this one sorry.


This PR is still draft as I am waiting for the main MacOS rework to be finished, reviewed and validated before checking plugins. However, if you want to review it as-is, I'll be happy to check out your comments :)

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.

Volatility can't match the memory dump file (MacOS Monterey 12.6 build 21G115) to the symbol table created
2 participants