CVE-2024-21378 — Remote Code Execution in Microsoft Outlook
Microsoft Outlook was vulnerable to authenticated remote code execution via synced form objects. An attacker with compromised credentials could send a malicious form that, when triggered by the victim, would write arbitrary files and registry keys, leading to code execution.
Published on netspi.com
Technical / Red Teaming
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, the form installation process allowed arbitrary file writes and registry key creation under HKCR, and the denylist for dangerous registry keys could be bypassed by using a leading backslash to specify a full path.
Impact
An attacker with valid credentials could achieve remote code execution on the victim's machine when the victim triggers the malicious form, but user interaction is required.
What the attacker needed
Compromised credentials for the target user; victim uses Outlook thick client on Windows; victim triggers the form (click, forward, or print)
The fix
Microsoft released patches for CVE-2024-21378 to address the vulnerability.
How it was found
- Obtain credential material for a targeted user.
- Create a COM compliant DLL that we want to execute.
- Specify our credential material, DLL and other required/optional parameters to Ruler.
- Ruler will authenticate to the Exchange Server/Exchange Online and send the form as an email.
- The user will then need to trigger the form by either clicking, forwarding, or printing the email from their Microsoft Outlook thick client on a Windows device.
- Execution of the form will create the registry keys, drop the DLL to disk and load the DLL into the Outlook process.
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.
Outlook lets you install custom forms that can run code. The researchers found that an attacker who has a user's login details could send a specially crafted form that, when opened, would install malicious code on the victim's computer. This is called remote code execution because the attacker can run their own code on someone else's machine.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.