Skip to content

Conversation

h00die
Copy link
Contributor

@h00die h00die commented Sep 11, 2025

Apparently theres a way to overload systemd services with an override.conf file in /etc/. Did you know that? I didn't. Well, now theres a module to exploit it. You need root which is suboptimal, and systemctl status shows your session being execute, but it also doesn't overwrite or create a NEW service, so its fairly stealthy?

Verification

  • Start msfconsole
  • exploit the box somehow (ssh_login for instance)
  • get root
  • use exploit/linux/persistence/init_systemd_override
  • set SESSION <id>
  • exploit
  • Verify persistence is created, and you get a new session if service is restart
  • Verify cleanup works
  • Document is updated and correct

@h00die h00die added the module label Sep 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant