prey-bash-client-modules
prey-bash-client-modules copied to clipboard
Add an ssh connection function
If set up properly, this function will theoretically open a port from the stolen computer through any firewalls When setup correctly and a connection made to the remote server, you can SSH from this server using "ssh -p REMOTE_PORT USER@localhost"
This pull request is intended as a 'proof of concept', and as a place to discuss the idea.
Current caveats:
- Requires the user to have a server running SSH (Prey could do this for the user for the 'pro' account, see below)
- Requires the client to be authenticated with the server (SSH keys) -- and these SSH keys must be created for root
$ sudo ssh-keygensince the cron is run as root. - Untested on Windows
My idea is that the prey project could have a 'pro' feature called simply "enable SSH connection" (on/off). When enabled, the prey servers would send down details of the SSH host, user, ports etc. to the client when it requests the XML status file from prey's servers (the URL that's something like http://panel.preyproject.com/devices/). The client would then setup the connection to the prey server (using the script in this pull), after which a prey pro user could simply log into the prey control panel and be presented with an SSH prompt from which they can interact with their lost computer (or Prey could just give the user the details to SSH in themselves)
I think this is a good idea (for the expert user) since even if SSH is allowed and you have the IP of the computer, most modern day routers block incoming traffic on port 22. This is the most reliable way of being able to SSH into the stolen computer'