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

Add Apt package manager persistence module #11665

Merged
merged 8 commits into from
Apr 27, 2019

Conversation

aringo
Copy link
Contributor

@aringo aringo commented Mar 31, 2019

This module will run a payload when the package manager is triggered. Module installs a pre-invoke hook for APT in apt.conf.d.

Verification

  • Start msfconsole
  • Get a privileged session on a target that uses the Apt package manger
  • use exploit/linux/local/apt_package_manager_persistence
  • Choose a payload and set options
  • exploit
  • Verify Wrote hook file , wrote binary
  • Verify fail if no permissions to write hook or binary
  • use exploit/multi/handler/
  • Choose a payload and set options
  • run
  • On target run sudo apt-get update
  • Verify Caught a root session
  • Documentation Included

apt

@aringo
Copy link
Contributor Author

aringo commented Mar 31, 2019

There is no need to check for apt as the first write attempt is to an apt specific folder. If apt is not installed the folder will not exist and so the write check should fail. Changed the error message to reflect that.

@aringo
Copy link
Contributor Author

aringo commented Apr 25, 2019

Changed some of the quotes and also ran a rubocop to try to find some space formatting. I did not see the use of single quotes vs double quotes in the docs, although covered under rubocop. Was mostly sticking to double quotes since there was a lot of string interpolation.

Changed Disclosure Date format

Co-Authored-By: aringo <ringo.aaron@gmail.com>
@jrobles-r7 jrobles-r7 self-assigned this Apr 26, 2019
@jrobles-r7 jrobles-r7 merged commit 635be0c into rapid7:master Apr 27, 2019
jrobles-r7 added a commit that referenced this pull request Apr 27, 2019
msjenkins-r7 pushed a commit that referenced this pull request Apr 27, 2019
@jrobles-r7
Copy link
Contributor

jrobles-r7 commented Apr 27, 2019

Release Notes

The linux/local/apt_package_manager_persistence exploit module has been added to the framework. This module adds a hook to execute a payload when apt update is ran on the host.

@gdavidson-r7 gdavidson-r7 added the rn-modules release notes for new or majorly enhanced modules label May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs module rn-modules release notes for new or majorly enhanced modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants