TL;DR: Don't install @signalapp for macOS, it is not secure.
I carried out this small experiment:
- I wrote a simple Python script that copies the directory of Signal's local storage to another location (to mimic a malicious script or app)
- I ran the script in the Terminal and got a copy of my Signal data on my Mac
- I booted a fresh macOS installation in a virtual machine
...
…
- I transferred the copy of Signal's data to the VM and placed it where Signal expects it: ~/Library/Application\ Support/Signal
- I installed Signal and started it
- Signal started and restored my session with all the chat histories
- I exchanged a couple messages with a contact from the VM and it worked
- Then, I started Signal on the Mac
- I got three sessions running in unison: Mac, iPhone, and VM
…
…
Messages were either delivered to the Mac or to the VM. The iPhone received all messages. All of the three sessions were live and valid. Signal didn't warn me of the existence of the third session [that I cloned]. Moreover, Signal on the iPhone still shows one linked device. This is particularly dangerous because any malicious script can do the same to seize a session.
…
…
Perhaps this flaw is what makes some users think that Signal has a "backdoor" as it is easy for sophisticated attackers to target a victim who's using the Mac app and see their chats. (The same may be also true for the Windows app)
@mysk signal has to decrypt the messages to display them, how else do you expect this to work?
@shadowwwind @mysk They could use the OS keychain
@shadowwwind @mysk Yes, applications could do this with the keychain integrated in the operating system. See here: https://developer.apple.com/documentation/security/keychain_services/
Additionally macOS has some protections for this in the latest versions and will add some more in the next version. Signal does not use either at the moment: https://infosec.exchange/@jjtech/112735940093556474
@mysk If you 'solve' this problem by putting the crypto in the hardware or operating system all you do is have to trust Apple or Microsoft or whoever and it isn't scrutable.
It's true for all their desktop apps, they use the same codebase across all of them.
@mysk i keep wondering: is it surprising? Do other apps handle.that better? What should an app do to prevent that sort of attack? You copied the private keys so the other machine can decrypt the same thing as the original machine