Veeam Backup & Response - RCE With Auth, But Mostly Without Auth (CVE-2024-40711)
Veeam Backup & Replication deserialises attacker-supplied .NET Remoting data using a custom binder that can be switched into blacklist mode, and the blacklist was missing the ObjRef gadget. An attacker could send a crafted serialised object to reach remote code execution, in some paths without authentication.
labs.watchtowr.com
Published on labs.watchtowr.com
This research is a glimpse into the capability powering the watchTowr Platform, a Preemptive Exposure Management solution. We enable organizations to autonomously validate and mitigate their exposure to emerging threats, ahead of in-the-wild exploitation.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a deserialisation binder that supports a blacklist mode was used by a helper class, and the blacklist did not include the ObjRef gadget, so a crafted serialised object was rebuilt as a dangerous type.
Impact
An attacker could achieve remote code execution on the backup server, in some paths without authentication, though the text notes the advisory's CVSS marks privileges as low.
What the attacker needed
Network access to a Veeam remoting service; crafted serialised .NET object
The fix
Veeam released a fix that adds the ObjRef type to the deserialisation blacklist.
How it was found
- Diff the latest release against the previous one and notice the embedded blacklist resource changed
- See that the ObjRef .NET class type was added to the blacklist
- Trace where the binder is used and find the helper class that deserialises with blacklist mode
- Send a serialised ObjRef through that path to trigger deserialisation of the gadget
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When two programs talk to each other they often send objects as a stream of bytes, and the receiver rebuilds them. If the receiver rebuilds whatever type the sender names, an attacker can name a dangerous type that runs code when rebuilt. Veeam tried to block this with an allow-list and a deny-list of types, but one code path used the deny-list and it was missing a known dangerous type.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.