Skip to content

OSX Persistence: Login logout hook - #21766

Open
h00die wants to merge 3 commits into
rapid7:masterfrom
h00die:login_logout_persistence
Open

OSX Persistence: Login logout hook#21766
h00die wants to merge 3 commits into
rapid7:masterfrom
h00die:login_logout_persistence

Conversation

@h00die

@h00die h00die commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds a new module for OSX persistence: login/logout hooks.
It also does some fine tuning meta wise of the current launch_plist module.

Related Issue: #19886

Reviewer Notes

Not sure if this works on modern mac, so you may need an older one like I have.

Verification Steps

  1. Start msfconsole
  2. Get a root shell on the target
  3. Do: use exploit/osx/persistence/login_hook
  4. Do: set session <session>
  5. Do: set WritableDir /var/root (or any non-TCC-protected directory)
  6. Do: run
  7. Log out and back in on the target (or set RUN_NOW true)
  8. You should get a new shell as root.

AI Usage Disclosure

Kimi K3 was used to generate code and docs, manual review and testing was done after that to clean it up and make it usable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant