SSH Credentials Collector is an Agent Plugin for
Infection Monkey that
steals SSH keys from compromised Linux machines.
It locates the SSH keys in the /home
directory, steals SSH keypairs, and
uploads them to the Monkey Island server.
The supported private key encryption formats are RSA, DSA, EC and ECDSA.
For more information, see the SSH Credentials Collector Plugin documentation.
To create the resulting SSH archive, follow these steps:
-
Clone the Repository
$ git clone https://github.com/guardicode/ssh-credentials_collector.git $ cd ssh-credentials_collector
-
Install development dependencies
This project uses Poetry for managing dependencies and virtual environments, and pre-commit for managing pre-commit hooks.
$ pip install pre-commit poetry $ pre-commit install -t pre-commit $ poetry install
The test suite can be run with the following command:
poetry run pytest
To build the plugin, run the Agent Plugin Builder.
poetry run build_agent_plugin .
The build tool will create SSH-credentials_collector.tar
, which can be installed in
the Monkey Island.