Skip to content

Conversation

h00die
Copy link
Contributor

@h00die h00die commented Sep 6, 2025

Pulls out systemd from the init persistence module and adds new persistence mixin. Part of #20374

Verification

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

@h00die h00die force-pushed the modern_persistence_systemd branch from 576da00 to e3cad5b Compare September 9, 2025 20:22
def service_file(exec, target = 'multi-user.target')
<<~EOF
[Unit]
Description=Start daemon at boot time
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe using ::Faker::Hacker.say_something_smart here would be useful?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

while this is easy to write defenses against, vs something more random... its relevant, and i worry that say_something_smart will give something too outlandish and not service related and make it obvious

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

Successfully merging this pull request may close these issues.

2 participants