
Folder encryption, but not really.
The new UGOS version has an encryption option now. When the encrypted folder was still mounted after a reboot, I got curious. Automount of encrypted folders means the key is stored somewhere on the system.
UGOS uses the tool gocryptfs for encryption, but with a twist, as it seems. gocryptfs creates a config-file for each folder with the encrypted key in it. To decrypt the key, you need you password. The backup-key you get when creating the encryption is the same as the decrypted key.
UGOS adds a second encrypted key to the config-file, so it can decrypt the folder without your password, basically bypassing your encryption. How this second key is decrypted, I don't know yet, my reverse engineering skills are non-existing. But it is probably done using a hard-coded string or the serial number or something similar. Some hacker (or maybe your government )probably already figured out how to decrypt the second key.
You can check for yourself by connecting via SSH and look at the file /volume1/@FOLDERNAME@/gocryptfs.conf.
Did anyone else check how the encryption is done and reached the same conclusion?
For me this means:
- if someone gets access to the HDD without the UGOS-SSD, the folder is safe
- but access to the full NAS leaves the folder vulnerable to decryption
I tried messing up the UgConfig and that seemed to do the trick, the automount was gone when "salt":"0" was set. I saw some errors in the logs. manual mounting with password was still fine. So this might be a hotfix, if you really want to rely on the UGOS encryption but want the fallback/backdoor gone. Try at your own risk.
Imho, ideally, the automount with second key should be a opt-in feature in the GUI.