-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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 Persistence #19886
Comments
Full list of persistence methods can be The Art of Mac Malware. There are already persistence support for Launch Items, both Daemons and Agents. Currently this module is called persistence but should probably be called Launch Item Persistence. At Persistence is supported under unix/local. Cron persistence is available for Linux, my guess would be that this module would work on OSX. Login Items look promising:
Periodic scripts, which falls under jobs and tasks have not been implemented and seem relatively simple. To my knowledge OSX inherits this feature from BSD, I'm wondering if we could build a module that works for both. As noted in TAOMM periodic scripts are aren't being leveraged for persistence:
Login/Logout hooks would be another low hanging fruit for persistence, requiring a payload a PLIST in As noted in TAOMM another neat place to hide persistence would be in system scripts, for example It would be call if there was just one Meta-Persistence module that would check every nook and cranny of the system and provide you a list with places you can persist. |
Appreciate the feedback. A lot of this is just placeholders/reminders for after #19815 lands. I've done a bunch of mac testing to make sure the Launch items are still working. Also made sure the |
Persistence suggester, similar to local exploit suggester, is implemented in the persistence overhaul already :) https://github.com/rapid7/metasploit-framework/pull/19815/files#diff-e12cbce40ffdbf4924980a4b6c52b0954eb0ada8938ae51a9134f8b0e724ffb1 |
Added Periodic Script Persistence in #19903 |
Summary
Currently there's only one module (plist). https://www.kandji.io/blog/mac-malware-persistence has a nice list of other places to persist
Basic example
https://github.com/dockur/macos should make development a lot easier
Motivation
There's lots of room for improvement!
The text was updated successfully, but these errors were encountered: