How would you protect files of a VPS (Virtual Private Server) from snooping by the service provider?

  • notabot@lemm.ee
    link
    fedilink
    arrow-up
    10
    ·
    2 years ago

    It depends what you want to do with it. If it’s just for storing files/backups then encrypt them before uploading and make sure the key never goes anywhere near the VPS. If it’s for serving up something like a simple website, you probably care more about data integrity than exfiltration, so make sure you have the security, including selinux or equivalent, locked down, and regularly run integrity checks. If it’s for running something interactive, or where data will be generated or downloaded to the machine, you’re out of luck, there’s no even theoretical way of securing that against an adversary with that much access.

  • Rowan Thorpe@lemmy.ml
    link
    fedilink
    arrow-up
    5
    ·
    2 years ago

    If you’re only talking about Storage (data at rest) or Network (data in transit) then encrypt/decrypt offsite and never let symmetric keys (or asymmetric private keys) near the VPS, or for in-transit you could similarly setup encrypted tunnels (symmetric/private keys offsite only) where neither end of the tunnel terminates at the VPS. If you’re talking about Compute then whatever does the processing inherently needs access to decrypted data (in RAM, cache, etc) to do anything meaningful. Although there are lots of methods for delegating, compartmentalising, obfuscating, etc (like enclaves, TPM/vTPM…) the unavoidable truth is that you must trust whomever owns the base-infra ultimately processing your data. The one vaguely useful way to use “other people’s computers” trustlessly is with SMPC (secure multi-party computation) spread sufficiently widely across multiple independent (preferably competing - or even adversarial!) virtual-computation providers, with an “N-of-M keys” policy that avoids any single provider being able to attain a meaningful level of access to your data independently, or being able to view tangible portions of your data while providing functionality during SMPC. That stuff gets super-niche though.

  • oldfart@lemm.ee
    link
    fedilink
    arrow-up
    5
    ·
    2 years ago

    Syncthing has a concept of untrusted node, which only gets to store files, not see them

  • hperrin@lemmy.world
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    2 years ago

    Ultimately, you can’t. Even if everything you’re doing is encrypted, they have access to the RAM that’s holding your encryption keys.

  • Wispy2891@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    not a technical but you can’t just do full disk encryption and put the password manually at every single boot?

    It seems very unlikely that a reputable hosting company would snoop even in that case

    If we’re talking about 3 letter agencies, for the dedicated servers they’ll directly seize the disks…

  • ouch@lemmy.worldOP
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    2 years ago

    Thanks for the comments. I agree on the general consensus, that once an encryption key enters the VPS, the encryption is compromised.

    However, I’m thinking more in practical terms, eg. the service provider doing just casual scanning across all disks of VPS instances. Some examples could be: cloud authentication keys, torrc files, specific installed software, SSH private keys, TLS certificates.