Scenario:
- One machine with proxmox
- Second machine with PBS
VMs on proxmox machine are DELETED, all the VM data is wiped.
After that, the proxmox machine is physically compromised.
What to expect: no data leak
Whan actually happens:
- PBS encryption key is available in /etc/pve on the compromised machine
- PBS user/token and password are also available there
- PBS IP address is also available.
Even if the PBS is properly secured, the threat actor can easily download backups from it, which results in practically non-existing security.
Current bugs which could mitigate this:
- PBS user Permission "Datastore.Backup" also allows for READS(!) of the backups, even if the "Datastore.Read" is NOT SET.
Solution for better backups. This is just a proposition:
Backup setup after proxmox install or adding pbs:
- Generate GPG public/private keypair. Let the user save the private key. On the proxmox itself keep only the public key.
Backup:
- On every VM backup: generate TEMPORARY aes key, encrypt it with the public key, and send it to the PBS
- Encrypt the VM backup with the temporary aes key, send it to the PBS.
- Delete the aes key from proxmox memory.
Restore:
- Ask the user to provide the private key
- Decrypt the temporary aes key for the given VM backup
- Decrypt and restore the vm.
- One machine with proxmox
- Second machine with PBS
VMs on proxmox machine are DELETED, all the VM data is wiped.
After that, the proxmox machine is physically compromised.
What to expect: no data leak
Whan actually happens:
- PBS encryption key is available in /etc/pve on the compromised machine
- PBS user/token and password are also available there
- PBS IP address is also available.
Even if the PBS is properly secured, the threat actor can easily download backups from it, which results in practically non-existing security.
Current bugs which could mitigate this:
- PBS user Permission "Datastore.Backup" also allows for READS(!) of the backups, even if the "Datastore.Read" is NOT SET.
Solution for better backups. This is just a proposition:
Backup setup after proxmox install or adding pbs:
- Generate GPG public/private keypair. Let the user save the private key. On the proxmox itself keep only the public key.
Backup:
- On every VM backup: generate TEMPORARY aes key, encrypt it with the public key, and send it to the PBS
- Encrypt the VM backup with the temporary aes key, send it to the PBS.
- Delete the aes key from proxmox memory.
Restore:
- Ask the user to provide the private key
- Decrypt the temporary aes key for the given VM backup
- Decrypt and restore the vm.