Summery

A high-severity vulnerability (CVSS 7.5) in Veeam Backup & Replication that allows unauthenticated attackers with network access to TCP port 9401 (and also if you have access to the target host and it has that port opened locally) to retrieve stored credentials, potentially compromising backup infrastructure.

Affected versions
CVE-2023-27532 affects all versions of Veeam Backup & Replication released before these fixed builds:

  • Version 11a: before 11.0.1.1261 P20230227
  • Version 12: before 12.0.0.1420 P20230223

Exploitation

There are two main PoCs. Original PoC from sfewer-r7 and an easier, compiled, ready-to-go fork of the original PoC by puckiestyle.

Puckiestyle’s PoC
You can run the exploit remotely if possible and it should be straigh forward. I only had the pleasure to run it locally on the target host.
If you want to run the exploit locally on a target host you need to upload it with these three required DLLs:

  • Veeam.Backup.Common.dll
  • Veeam.Backup.Interaction.MountService.dll
  • Veeam.Backup.Model.dll

When you upload all of those 4 files, put them in a folder, and run powershell with this command .\VeeamHax.txt --cmd "powershell -e <PS ONE-LINER>".
This should spawn a reverse shell as SYSTEM.

Sfewer-r7’s PoC
With this exploit you have more manual work and need to compiler the binary yourself in Visual Studio.

  1. Download the exploit on your Windows machine
  2. Download these DLLs form the target computer onto your Windows system: Veeam.Backup.Common.dll, Veeam.Backup.Interaction.MountService.dll, Veeam.Backup.Model.dll
  3. Run Visual Studio, create a new project and add said DLLs as references
  4. Optionally, you can remove the else condition (94-146 lines) from the code if you don’t need the feature to extract credentials
  5. Build the project
    You may encounter errors about unsigned executables SignTool Error. This can be problem in more strict environments, but in most cases you can ignore it as target machines will usually allow you to run unsigned binaries on themselves.

References

0xdf’s write-up
Original PoC from sfewer-r7
Better fork of the original PoC by puckiestyle