You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just something I stumbled across trying to understand how duplicacy verifies the host it is connecting to.
This code is not fully compatible with the standard definition of the SSH known_hosts file syntax [1]. Perhaps it's not meant to be, but then the name of the file is misleading. While the code appears to be able to account for markers, it does not seem to be able to account for the brackets around the host name, in case a non-standard port is provided. Also if the standard port :22 is used, it is not enforced that it is omitted in the config file.
I'd argue that duplicacy should not automatically connect to hosts for which it has never seen a fingerprint before, without explicit user consent. Right now, a MITM could be happening during the first use of duplicacy, leading to exposed data.
Maybe consider taking into account ~/.ssh/known_hosts as well in addition to .duplicacy/known_hosts?
duplicacy/src/duplicacy_storage.go
Lines 165 to 211 in 0a794e6
Just something I stumbled across trying to understand how duplicacy verifies the host it is connecting to.
This code is not fully compatible with the standard definition of the SSH
known_hosts
file syntax [1]. Perhaps it's not meant to be, but then the name of the file is misleading. While the code appears to be able to account for markers, it does not seem to be able to account for the brackets around the host name, in case a non-standard port is provided. Also if the standard port:22
is used, it is not enforced that it is omitted in the config file.I'd argue that duplicacy should not automatically connect to hosts for which it has never seen a fingerprint before, without explicit user consent. Right now, a MITM could be happening during the first use of duplicacy, leading to exposed data.
Maybe consider taking into account
~/.ssh/known_hosts
as well in addition to.duplicacy/known_hosts
?[1] https://man.openbsd.org/sshd#SSH_KNOWN_HOSTS_FILE_FORMAT
The text was updated successfully, but these errors were encountered: