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

Verify .ssh directory permissions before adding authkeys #262

Closed
wants to merge 2 commits into from
Closed

Verify .ssh directory permissions before adding authkeys #262

wants to merge 2 commits into from

Conversation

lavafroth
Copy link

Description of Changes

Addresses #260. The Linux implant module for authorized keys now checks the permissions on the .ssh directory before adding the keys. If the .ssh directory does not exist, besides creating it, we also record that fact for later reverts. Similar reverts can be made to the authorized_keys file if created and any permission changes.

Please note any noqa: comments needed to appease flake8.

Major Changes Implemented:

  • Added tamper class ModifiedPermissions
  • Authorized keys implant now checks the permissions on the .ssh directory
  • Directory and file creation as well as permission changes by the implant can be reverted.

Pre-Merge Tasks

  • Formatted all modified files w/ python-black
  • Sorted imports for modified files w/ isort
  • Ran flake8 on repo, and fixed any new problems w/ modified files
  • Ran pytest test cases
  • Added brief summary of updates to CHANGELOG (under [Unreleased])

For issues with pre-merge tasks, see CONTRIBUTING.md

@lavafroth lavafroth closed this Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant