Atlantiraptor Docs

ssh

Type: Accessor

Access a remote system’s filesystem via SSH/SFTP.

This accessor allows accessing remote systems via SFTP/SSH. This is useful for being able to search remote systems where it is not possible to run a Velociraptor client directly on the endpoint. For example, on embedded edge devices such as routers/firewalls/VPN servers etc.

To use this accessor you will need to provide credentials via the SSH_CONFIG scope variable:

LET SSH_CONFIG <= dict(hostname='localhost:22',
  username='mic',
  private_key=read_file(filename='/home/user/.ssh/id_rsa'))

SELECT OSPath FROM glob(accessor="ssh", globs="/*")

Notes

  1. hostname must have a port after the column.
  2. You can provide a password instead of a private key via the password parameter to the SSH_CONFIG
  3. The private_key parameter must contain an unencrypted PEM encoded SSH private key pair.
  4. The hostkey parameter is a base64 encoded SSH host key. When it is specified, connections to a remote system that does not present that exact host key are rejected. When it is not specified, the host key presented by the remote system is written to the query log instead. A hostkey provided by the secret takes precedence over the hostkey parameter.

It is more convenient to use the secrets support to manage these credentials.

Argument Type Description
secret string The name of a secret to use.
username string The username to use to log into the remote system.
password string The password to use to log into the remote system.
private_key string A private key to use to log into the remote system instead of a password.
hostname string The hostname to log into.
hostkey string A base64 encoded host key. If specified we reject connections that do not present this host key.

Required permissions: NETWORK

Platforms: macOS, Linux, Windows