1

I've been tinkering with a backup solution in my spare time, made to simplify doing backups as much as possible. It's written in bash.

The solution consists of 2 files, one placed on a backup server, the other one placed on the machine that wants to back up stuff.

The first file creates a chrooted user and modifies the server sshd configuration so that the user is only given access to an SFTP process in order to only upload files.

The second file simply sends the backup files to the server based on IP and username using SFTP.

The controversial part is the fact that the backup user is only authenticated using its IP address and username.

So, the only way an intruder could gain access is when 2 criteria is met:

  1. Intruder somehow figures out that backup user does not authenticate using password and/or SSH key when connecting to the backup server.

  2. Intruder successfully spoofs its own IP address to match the backup user and also somehow figures out the backup user's username.

At this point though, the intruder can only upload files as the sshd config file (on the backup server) has locked down the SFTP in order to minimize functionality as much as possible.

The full source code can be found here for your scrutiny.

So my question is pretty simple: Would this be considered safe?

Any and all suggestions/comments are welcome.

  • from a local network perspective spoofing the IP address is child's play and thus (if talking about local network) should not even be considered as a factor. – TheHidden Apr 19 '18 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.