SLIDE 1
Can You Trust Your Encrypted Cloud? An Assessment of SpiderOakONEs - - PowerPoint PPT Presentation
Can You Trust Your Encrypted Cloud? An Assessment of SpiderOakONEs - - PowerPoint PPT Presentation
Can You Trust Your Encrypted Cloud? An Assessment of SpiderOakONEs Security Anders Dalskov Claudio Orlandi Aarhus University RWC 2018 Agenda I A Threat Model for Encrypted Cloud Storage (ECS). I A high-level look into a modern ECS service
SLIDE 2
SLIDE 3
Agenda
I A Threat Model for Encrypted Cloud Storage (ECS). I A high-level look into a modern ECS service SpiderOakONE. I Attacks on SpiderOakONE and what we can learn from them.
Disclaimer: All issues were reported on June 5th 2017 responsibly, and are fixed in version 6.4.0 of SpiderOakONE.
SLIDE 4
(Password) Encrypted Cloud Storage
Traditional Cloud Storage raises some privacy concerns:
SLIDE 5
(Password) Encrypted Cloud Storage
Traditional Cloud Storage raises some privacy concerns:
I Besides us, who can read our files?
SLIDE 6
(Password) Encrypted Cloud Storage
Traditional Cloud Storage raises some privacy concerns:
I Besides us, who can read our files? I What happens to the files we delete? Or when we close our account?
SLIDE 7
(Password) Encrypted Cloud Storage
Traditional Cloud Storage raises some privacy concerns:
I Besides us, who can read our files? I What happens to the files we delete? Or when we close our account? I What if the Cloud Storage company is sold?
SLIDE 8
(Password) Encrypted Cloud Storage
Traditional Cloud Storage raises some privacy concerns:
I Besides us, who can read our files? I What happens to the files we delete? Or when we close our account? I What if the Cloud Storage company is sold?
Solution: Encrypt files on the client before sending them to the server.
SLIDE 9
Threat Model
ECS should provide more security than Traditional Cloud Storage: We want our files to stay secure even if the server turns malicious.
SLIDE 10
Threat Model
ECS should provide more security than Traditional Cloud Storage: We want our files to stay secure even if the server turns malicious. ECS providers seem to agree:
I Tresorit: We believe you should never have to ‘trust’ a cloud service I LastPass: No one at LastPass can ever access your sensitive data. I sync: We can’t read your files and no one else can either I pCloud: No one, even pCloud’s administrators, will have access to your
content
I SpiderOak: No Knowledge means we know nothing about the encrypted
data you store on our servers
I . . .
SLIDE 11
Threat Model
But is a “malicious server” threat model actually used?
SLIDE 12
Threat Model
But is a “malicious server” threat model actually used? For example, SpiderOak wrote (after we’d disclosed the issues we found): When we started building SpiderOak in 2006, the threat model was an attacker who would want to compromise SpiderOak and steal customer data [...] Because this was a legacy mindset, the SpiderOak ONE backup code base is not robust against a different kind of threat model: SpiderOak, the company, as the active attacker
SLIDE 13
Threat Model
But is a “malicious server” threat model actually used? For example, SpiderOak wrote (after we’d disclosed the issues we found): When we started building SpiderOak in 2006, the threat model was an attacker who would want to compromise SpiderOak and steal customer data [...] Because this was a legacy mindset, the SpiderOak ONE backup code base is not robust against a different kind of threat model: SpiderOak, the company, as the active attacker Previous work that has examined ECS (SpiderOakONE in particular):
I Bhargavan et al (2012): External adversary. CSRF in web interface that
could be used to learn location of shared files.
I Wilson & Ateniese (2014): Only considers file sharing. Found that the
server can read files shared by the user.
SLIDE 14
Threat Model—Our attempt
Assume an honest client (client software obtained before server turns malicious).
SLIDE 15
Threat Model—Our attempt
Assume an honest client (client software obtained before server turns malicious). Informally, we try to answer the questions:
SLIDE 16
Threat Model—Our attempt
Assume an honest client (client software obtained before server turns malicious). Informally, we try to answer the questions:
- 1. Are we secure against a passive adversary? I.e. is the client’s default
behaviour secure?
SLIDE 17
Threat Model—Our attempt
Assume an honest client (client software obtained before server turns malicious). Informally, we try to answer the questions:
- 1. Are we secure against a passive adversary? I.e. is the client’s default
behaviour secure?
- 2. Are we secure against an active adversary? Is the protocols secure against
misuse? What about the client implementation?
SLIDE 18
Threat Model—Our attempt
Assume an honest client (client software obtained before server turns malicious). Informally, we try to answer the questions:
- 1. Are we secure against a passive adversary? I.e. is the client’s default
behaviour secure?
- 2. Are we secure against an active adversary? Is the protocols secure against
misuse? What about the client implementation? Formally: Indistinguishability experiment between an oracle (client) and adversary (server). Our definition only considers confidentiality. Refer to our paper for the details: https://eprint.iacr.org/2017/570
SLIDE 19
SpiderOakONE—Quick facts
SpiderOakONE is an ECS with praise/endorsements from both Edward Snowden and the EFF. Uses “No Knowledge” (and “Zero Knowledge” before that) to describe their encryption routines.
I Supports Windows, Mac and Linux (partial support for Android and iOS), I File sharing (single files and whole directories), I Written in Python =
⇒ decompilation is easy,
I Certificate Pinning + TLS =
⇒ limits scope of attacks. Our review focused on version 6.1.5, released July 2016.
SLIDE 20
SpiderOakONE—Communication
Client Server Input: password pw protocol ID pid
- Abort if invalid pid
Auth with protocol identified by pid
- !
- . . .
RPC fi (x1, . . . , xn)
- v = fi (x1, . . . , x2)
v
- !
store/process v
SLIDE 21
SpiderOakONE—Communication
Client Server Input: password pw protocol ID pid
- Abort if invalid pid
Auth with protocol identified by pid
- !
- . . .
RPC fi (x1, . . . , xn)
- v = fi (x1, . . . , x2)
v
- !
store/process v
Authentication:
I Only run on first install. I Server picks what protocol to run. (4 possible, but only 2 were observed.) I All protocols are non-standard (i.e. “home-made”).
SLIDE 22
SpiderOakONE—Communication
Client Server Input: password pw protocol ID pid
- Abort if invalid pid
Auth with protocol identified by pid
- !
- . . .
RPC fi (x1, . . . , xn)
- v = fi (x1, . . . , x2)
v
- !
store/process v
Authentication:
I Only run on first install. I Server picks what protocol to run. (4 possible, but only 2 were observed.) I All protocols are non-standard (i.e. “home-made”).
RPC:
I Everything else (data transfer, device stats, etc.) I Comprehensive: Server can call ≈ 90 different procedures on the client.
SLIDE 23
SpiderOakONE—Encryption
User files:
I File F is encrypted with kF = H(F || mk); I kF is encrypted with a per-directory key dki; I dki is encrypted with a per-account long-term
key;
I long-term keys are encrypted with
k = KDF(pw). Password pw Long-term keys (mk and others) dkn . . . dk1 ki,n ki,1
SLIDE 24
SpiderOakONE—Encryption
User files:
I File F is encrypted with kF = H(F || mk); I kF is encrypted with a per-directory key dki; I dki is encrypted with a per-account long-term
key;
I long-term keys are encrypted with
k = KDF(pw). Password changes: A password change only triggers re-encryption of the long-term secrets. I.e. no “future secrecy”. Password pw Long-term keys (mk and others) dkn . . . dk1 ki,n ki,1
SLIDE 25
Attacks
We found 4 different issues that can be leveraged for attacks on the client:
I 1 attack weakens the security of a hash derived from the user’s password
(we’ll skip this);
I 2 attacks recover the user’s password—one is completely silently! I 1 attack can in some situations recover files that are not supposed to be
shared (during sharing of other files). All but the last attack is active. Verification: All attacks was implemented and verified to work against version 6.1.5 of SpiderOakONE.
SLIDE 26
Password recovery
Recall: 2 authentication protocols were seen, yet 4 can be run.
SLIDE 27
Password recovery
Recall: 2 authentication protocols were seen, yet 4 can be run.
Client Server Input: pw Input: lst list of RSA public-keys, chl random string lst, chl
- Display FP(lst) to
- user. Continue if user
accepts a = LE(pw, lst, chl)
- !
??? I FP(lst) computes a “fingerprint” on lst using RFC1751; I LE(pw, lst, chl) computes a “layered encryption” of pw and lst using keys
from lst. I.e. a = Encpkn(Encpkn−1 . . . (Encpk1(pw || chl))).
SLIDE 28
Password recovery
Recall: 2 authentication protocols were seen, yet 4 can be run.
Client Server Input: pw Input: lst list of RSA public-keys, chl random string lst, chl
- Display FP(lst) to
- user. Continue if user
accepts a = LE(pw, lst, chl)
- !
??? I FP(lst) computes a “fingerprint” on lst using RFC1751; I LE(pw, lst, chl) computes a “layered encryption” of pw and lst using keys
from lst. I.e. a = Encpkn(Encpkn−1 . . . (Encpk1(pw || chl))). Issue: Server can pick pki s.t. it knows ski, which lets it recover pw from a.
SLIDE 29
Password recovery
FP(lst) changes when lst changes. But what should the user compare the fingerprint to?
SLIDE 30
Password recovery
FP(lst) changes when lst changes. But what should the user compare the fingerprint to? TOFU: If your SpiderOakONE Administrator has given you a fingerprint phrase and it matches the fingerprint below, or if you have not been given a fingerprint, please click “Yes” below. Otherwise click “No” and contact your SpiderOakONE Administrator. I.e. if the user does not have anything to compare FP(lst) against, then they should just accept.
SLIDE 31
File recovery via. directory sharing (ShareRooms)
Observations: (1) sharing directory D happens by revealing dkD (the directory key) to the server;
SLIDE 32
File recovery via. directory sharing (ShareRooms)
Observations: (1) sharing directory D happens by revealing dkD (the directory key) to the server; (2) file encryptions are not updated when moving a file from
- ne directory to another;
SLIDE 33
File recovery via. directory sharing (ShareRooms)
Observations: (1) sharing directory D happens by revealing dkD (the directory key) to the server; (2) file encryptions are not updated when moving a file from
- ne directory to another; and (3) directory keys are never rotated.
SLIDE 34
File recovery via. directory sharing (ShareRooms)
Observations: (1) sharing directory D happens by revealing dkD (the directory key) to the server; (2) file encryptions are not updated when moving a file from
- ne directory to another; and (3) directory keys are never rotated.
Scenario 1:
- 1. Directory D with files F1, F2, . . . , Fn;
- 2. Move Fi to D0 and then share D;
SLIDE 35
File recovery via. directory sharing (ShareRooms)
Observations: (1) sharing directory D happens by revealing dkD (the directory key) to the server; (2) file encryptions are not updated when moving a file from
- ne directory to another; and (3) directory keys are never rotated.
Scenario 1:
- 1. Directory D with files F1, F2, . . . , Fn;
- 2. Move Fi to D0 and then share D;
- 3. But, Fi is encrypted with dkD
(obs. 2), which server knows (obs. 1);
- 4. Server can recover Fi.
SLIDE 36
File recovery via. directory sharing (ShareRooms)
Observations: (1) sharing directory D happens by revealing dkD (the directory key) to the server; (2) file encryptions are not updated when moving a file from
- ne directory to another; and (3) directory keys are never rotated.
Scenario 1:
- 1. Directory D with files F1, F2, . . . , Fn;
- 2. Move Fi to D0 and then share D;
- 3. But, Fi is encrypted with dkD
(obs. 2), which server knows (obs. 1);
- 4. Server can recover Fi.
Scenario 2:
- 1. Directory D with files F1, . . . , Fn is
shared (server knows dkD);
- 2. Sharing of D ceases;
- 3. File Fn+1 is added to D;
SLIDE 37
File recovery via. directory sharing (ShareRooms)
Observations: (1) sharing directory D happens by revealing dkD (the directory key) to the server; (2) file encryptions are not updated when moving a file from
- ne directory to another; and (3) directory keys are never rotated.
Scenario 1:
- 1. Directory D with files F1, F2, . . . , Fn;
- 2. Move Fi to D0 and then share D;
- 3. But, Fi is encrypted with dkD
(obs. 2), which server knows (obs. 1);
- 4. Server can recover Fi.
Scenario 2:
- 1. Directory D with files F1, . . . , Fn is
shared (server knows dkD);
- 2. Sharing of D ceases;
- 3. File Fn+1 is added to D;
- 4. But, dkD was not invalidated in
step 2 (obs. 3) = ⇒ Fn+1 is also encrypted under dkD;
- 5. Server can recover Fn+1.
SLIDE 38
File recovery via. directory sharing (ShareRooms)
Observations: (1) sharing directory D happens by revealing dkD (the directory key) to the server; (2) file encryptions are not updated when moving a file from
- ne directory to another; and (3) directory keys are never rotated.
Scenario 1:
- 1. Directory D with files F1, F2, . . . , Fn;
- 2. Move Fi to D0 and then share D;
- 3. But, Fi is encrypted with dkD
(obs. 2), which server knows (obs. 1);
- 4. Server can recover Fi.
Scenario 2:
- 1. Directory D with files F1, . . . , Fn is
shared (server knows dkD);
- 2. Sharing of D ceases;
- 3. File Fn+1 is added to D;
- 4. But, dkD was not invalidated in
step 2 (obs. 3) = ⇒ Fn+1 is also encrypted under dkD;
- 5. Server can recover Fn+1.
In both scenarios, files are recovered that the user took specific steps to avoid sharing.
SLIDE 39
Password recovery (again)
After installation, the user’s password is stored in plaintext on the user’s
- machine. (This avoids the user having to input it on every boot.)
SLIDE 40
Password recovery (again)
After installation, the user’s password is stored in plaintext on the user’s
- machine. (This avoids the user having to input it on every boot.)
RPC methods exist that, on input a file path, will return the file’s content if the file path matches a regular expression.
SLIDE 41
Password recovery (again)
After installation, the user’s password is stored in plaintext on the user’s
- machine. (This avoids the user having to input it on every boot.)
RPC methods exist that, on input a file path, will return the file’s content if the file path matches a regular expression. The file path for the file containing the user’s password matches this regular expression.
SLIDE 42
Password recovery (again)
After installation, the user’s password is stored in plaintext on the user’s
- machine. (This avoids the user having to input it on every boot.)
RPC methods exist that, on input a file path, will return the file’s content if the file path matches a regular expression. The file path for the file containing the user’s password matches this regular expression. Attack: The server can just “ask” the client to send the user’s password.
SLIDE 43
My 5 cents on secure application design
I Complexity. Many RPC methods and different authentication protocols
create a large attack surface.
SLIDE 44
My 5 cents on secure application design
I Complexity. Many RPC methods and different authentication protocols
create a large attack surface.
I Same secret for both authentication and encryption. All active attacks we
found were the result of using the same secret (the password) for both encryption and authentication.
SLIDE 45
My 5 cents on secure application design
I Complexity. Many RPC methods and different authentication protocols
create a large attack surface.
I Same secret for both authentication and encryption. All active attacks we
found were the result of using the same secret (the password) for both encryption and authentication.
I Different execution contexts. The client should avoid making assumptions
about the user.
SLIDE 46
Wrapping up
Talk Summary:
I Motivation for Encrypted Cloud Storage and its security requirements; I A Threat Model for ECS. Specifically, security in the presence of an either
passive or active malicious server;
I Examples of how security in a real ECS (SpiderOakONE) breaks down
when the server turns malicious.
SLIDE 47