calebstewart / pwncat

Fancy reverse and bind shell handler
https://pwncat.readthedocs.io
MIT License
2.58k stars 250 forks source link

Verify .ssh directory permissions before adding authkeys #262

Closed lavafroth closed 2 years ago

lavafroth commented 2 years ago

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:

Pre-Merge Tasks

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