What's the data security guarantee of Anytype's client? #50
Replies: 2 comments 6 replies
-
|
Vulnerabilities shouldn't be posted it here in the public. |
Beta Was this translation helpful? Give feedback.
-
|
Hello @SilverBut! Appreciate your deep dive into Anytype's security. Let's get right into your queries. First, our security model assumes a non-compromised device. If the device is compromised, there would be innumerable ways for an attacker to gain access to data including key loggers and secure enclave phishing. On 'Data at Rest' security: The mnemonic (recovery phrase) is stored securely in the system's secure enclave. All files and objects' changes are encrypted in rest. As for search indexes (such as fts and localstore folders), these are non-encrypted for performance reasons. However, they can be safely deleted, though re-indexing will be required upon app start. We are currently researching the feasibility of providing optional encryption for indexes, but we don't have any estimates. At the same time, it makes sense to mitigate the risks associated with the most critical information, like the mnemonic variable you mentioned. It should be possible to avoid storing it in memory and instead, use it only at the time of logging in. Also, since we use BIP39, it should theoretically be possible to use hardware wallets to sign into the Anytype account and derive the encryption keys. However, this is currently not on our roadmap. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm reading code of
anytype-heartand noticedMiddlewarestruct contains some quite sensitive info likemnemonicwhich can be derived tosessionKey, and thepinfor protecting(?) mnemonics.Due to Golang's memory model, in current form of storage (raw
stringand[]byte), they can be found in memory, and maybe will duplicated later after a few copies. Even though keys are safely rested on the disk using OS's keychains, they are not very safe while Anytype is running.But, while it sounds horrifying, this might not be a vulnerability. Attackers need to access the memory. For macOS, I think you need to bypass SIP before accessing a signed application's memory. Windows have some similar features, but for Linux, maybe a application running as current user is enough. Coredump is also a possible way to extract memory content. Besides, physical attack (such as abusing IOMMU with a malicious device) is also a way to read memory. And if not using on-site methods, attacker must have the ability to run code remotely on victim's device. This is a relatively high bar.
So the question is: What's the security guarantee to the keys (and maybe clear text content of blocks)? Some possible answers:
Beta Was this translation helpful? Give feedback.
All reactions