How to Recover Account Credentials From the Veeam Backup & Replication Database
Security Statement
Since the account credentials provided to Veeam Backup & Replication are used to make connections to other resources in the environment (vCenter, Hyper-V, Linux, Azure, etc.), they must be stored in such a way that allows the software to decrypt the stored credentials and use them to authenticate to those remote resources. To accomplish this, Veeam Backup & Replication encrypts the credentials and keeps them in its configuration database. The credentials are encrypted using Microsoft Data Protection API, utilizing a per-deployment unique encryption salt and the unique MachineKey of the Windows OS where Veeam Backup & Replication is installed, making it so that the encrypted credentials can only be decrypted using the Windows machine where Veeam Backup & Replication is installed.
This storing of account credentials in a state which the software can later decrypt is common among all software that must take actions on behalf of users. When credentials are stored in such a way that software can later utilize those credentials on behalf of the user, they can also be decrypted by any user with access to that machine by using the same decrypt commands the software would use. In that same way, so too can the encrypted credentials stored by Veeam Backup & Replication be decrypted by a user who has access to the configuration database (VeeamBackup), the EncryptionSalt value secured within the registry, and the Windows machine where Veeam Backup & Replication is installed.
For those reasons, it is strongly advised to closely follow all security best practices and limit access to the Veeam Backup Server.
For information about Veeam Backup Server security, review the following:
Veeam Backup & Replication Best Practice Guide - Security Domains
Key Points:
- Recovery of credentials stored in the Veeam Backup & Replication Configuration Database requires all of the following:
- Access to the Configuration Database to acquire the encrypted account credentials.
- Access to the registry to acquire the Encryption Salt value.
- Access to the Veeam Backup Server to execute the native Windows commands to decrypt the account credentials from the database.
- Access to the Configuration Database to acquire the encrypted account credentials.
- Credentials provided by users to Veeam Backup & Replication are encrypted and stored in the Configuration Database.
- Credentials can only be recovered by executing code on the machine where Veeam Backup & Replication is installed.
- Credentials cannot be recovered with only a copy of the database. The decryption process requires access to the machine that initially encrypted the credentials.
- The native Windows commands used to recover the encrypted credentials using the encrypted password and encryption salt can be performed by any user with access to the Veeam Backup Server.
- The ability to recover the account credentials from the Veeam Backup & Replication Configuration Database is not a vulnerability. It is inherent to the nature of any software which must make authentication actions on behalf of a user, such as monitoring software or any other backup software that authenticates with username/password.
Purpose
This article documents how to recover account credentials stored within the Veeam Backup & Replication configuration database.
The procedure detailed in this article can only be used to recover account credentials and not to recover backup encryption passwords.
Solution
The file and database locations below are based on the default install locations for Veeam Backup & Replication.
Credential Recovery Procedure
- Collect the encrypted password value from the Veeam Backup & Replication configuration database using the following query.
Refer to KB1471 for Veeam Database Location Details.
Microsoft SQL Query:
- Collect the EncrpytionSalt from the Registry of the Veeam Backup Server.
Location: HKLM\SOFTWARE\Veeam\Veeam Backup and Replication\Data
- Update the following PowerShell script with the encrypted password value from the database and the encryption salt. Then, execute the script.
Note that the same commands as the example above are used.
More Information
Credentials Manager Cleanup
In some environments, duplicate accounts may be listed within the Credentials Manager. For more information, review: KB3224: How to Clean Up the Credentials Manager in Veeam Backup & Replication.
Security Statement
Since the account credentials provided to Veeam Backup & Replication are used to make connections to other resources in the environment (vCenter, Hyper-V, Linux, Azure, etc.), they must be stored in such a way that allows the software to decrypt the stored credentials and use them to authenticate to those remote resources. To accomplish this, Veeam Backup & Replication encrypts the credentials and keeps them in its configuration database. The credentials are encrypted using Microsoft Data Protection API and the unique MachineKey of the Windows OS where Veeam Backup & Replication is installed, making it so that the encrypted credentials can only be decrypted using the Windows machine where Veeam Backup & Replication is installed.
This storing of account credentials in a state which the software can later decrypt is common among all software that must take actions on behalf of users. When credentials are stored in such a way that software can later utilize those credentials on behalf of the user, they can also be decrypted by any user with access to that machine by using the same decrypt commands the software would use. In that same way, so too can the encrypted credentials stored by Veeam Backup & Replication be decrypted by a user who has access to both the configuration database (VeeamBackup) and the Windows server where Veeam Backup & Replication is installed.
For those reasons, it is strongly advised to closely follow all security best practices and limit access to the Veeam Backup Server.
For information about Veeam Backup Server security, review the following:
Veeam Backup & Replication Best Practice Guide - Security Domains
Key Points:
- Recovery of credentials stored in the Veeam Backup & Replication Configuration Database requires both of the following:
- Access to the Configuration Database to acquire the encrypted account credentials.
- Access to the Veeam Backup Server to execute the native windows commands to decrypt the account credentials from the database.
- Access to the Configuration Database to acquire the encrypted account credentials.
- Credentials provided by users to Veeam Backup & Replication are encrypted and stored in the Configuration Database.
- Credentials can only be recovered by executing code on the machine where Veeam Backup & Replication is installed.
- Credentials cannot be recovered with only a copy of the database. The decryption process requires access to the machine that initially encrypted the credentials.
- The native Windows commands used to recover the encrypted credentials can be performed by any user.
- The ability to recover the account credentials from the Veeam Backup & Replication Configuration Database is not a vulnerability. It is inherent to the nature of any software which must make authentication actions on behalf of a user, such as monitoring software or any other backup software that authenticates with username/password.
Purpose
This article documents how to recover account credentials stored within the Veeam Backup & Replication configuration database.
The procedure detailed in this article can only be used to recover account credentials and not to recover backup encryption passwords.
Solution
The file and database locations below are based on the default install locations for Veeam Backup & Replication.
Credential Recovery Procedure
- Collect the encrypted password value from the Veeam Backup & Replication configuration database using the following query.
Refer to KB1471 for Veeam Database Location Details.
Microsoft SQL Query:
- Update the following PowerShell script using the encrypted password value from the database, and then Execute.
Note that the same commands as the example above are used.
More Information
Credentials Manager Cleanup
In some environments, duplicate accounts may be listed within the Credentials Manager. For more information, review: KB3224: How to Clean Up the Credentials Manager in Veeam Backup & Replication.
Security Statement
Since the account credentials provided to Veeam Backup & Replication are used to make connections to other resources in the environment (vCenter, Hyper-V, Linux, Azure, etc.), they must be stored in such a way that allows the software to decrypt the stored credentials and use them to authenticate to those remote resources. To accomplish this, Veeam Backup & Replication encrypts the credentials and keeps them in its configuration database. The credentials are encrypted using Microsoft Data Protection API and the unique MachineKey of the Windows OS where Veeam Backup & Replication is installed, making it so that the encrypted credentials can only be decrypted using the Windows machine where Veeam Backup & Replication is installed.
This storing of account credentials in a state which the software can later decrypt is common among all software that must take actions on behalf of users. When credentials are stored in such a way that software can later utilize those credentials on behalf of the user, they can also be decrypted by any user with access to that machine by using the same decrypt commands the software would use. In that same way, so too can the encrypted credentials stored by Veeam Backup & Replication be decrypted by a user who has access to both the configuration database (VeeamBackup) and the Windows server where Veeam Backup & Replication is installed.
For those reasons, it is strongly advised to closely follow all security best practices and limit access to the Veeam Backup Server.
For information about Veeam Backup Server security, review the following:
Veeam Backup & Replication Best Practice Guide - Security Domains
Key Points:
- Recovery of credentials stored in the Veeam Backup & Replication Configuration Database requires both of the following:
- Access to the Configuration Database to acquire the encrypted account credentials.
- Access to the Veeam Backup Server to execute the native windows commands to decrypt the account credentials from the database.
- Access to the Configuration Database to acquire the encrypted account credentials.
- Credentials provided by users to Veeam Backup & Replication are encrypted and stored in the Configuration Database.
- Credentials can only be recovered by executing code on the machine where Veeam Backup & Replication is installed.
- Credentials cannot be recovered with only a copy of the database. The decryption process requires access to the machine that initially encrypted the credentials.
- The native Windows commands used to recover the encrypted credentials can be performed by any user.
- The ability to recover the account credentials from the Veeam Backup & Replication Configuration Database is not a vulnerability. It is inherent to the nature of any software which must make authentication actions on behalf of a user, such as monitoring software or any other backup software that authenticates with username/password.
Purpose
This article documents how to recover account credentials stored within the Veeam Backup & Replication configuration database.
The procedure detailed in this article can only be used to recover account credentials and not to recover backup encryption passwords.
Solution
The file and database locations below are based on the default install locations for Veeam Backup & Replication.
Credential Recovery Procedure
- Collect the encrypted password value from the Veeam Backup & Replication configuration database using the following query.
Refer to KB1471 for Veeam Database Location Details.
- Update the following PowerShell script using the encrypted password value from the database, and then Execute.
Note that the same commands as the example above are used.
More Information
Credentials Manager Cleanup
In some environments, duplicate accounts may be listed within the Credentials Manager. For more information, review: KB3224: How to Clean Up the Credentials Manager in Veeam Backup & Replication.
Advanced Script Example
The script below will automatically identify the location of the VeeamBackup database from the registry values used by Veeam Backup & Replication and output all credentials in plaintext.
Script Requirements
- This script was written for Veeam Backup & Replication 11a and older.
- The script must be run on the Veeam Backup Server.
- The script must be run from an Administrative PowerShell console.
- The account used to execute the script must have access to the Configuration Database.
Use the command whoami in the Administrative PowerShell console to verify which account will execute the script.
Veeam Technical Support will not assist in the usage or troubleshooting of this tool.
To report a typo on this page, highlight the typo with your mouse and press CTRL + Enter.