Incident Response: Analyzing Dogwalk ZeroDay (LetsDefend)
A Windows Server 2019 endpoint was infected via the DogWalk zero-day (CVE-2022-34713), where a malicious .diagcab file opened by msdt.exe dropped a file into the user's startup folder. The attacker could achieve persistence and execute malicious commands on the machine.
Published on systemweakness.com
Hello guys, i will be solving an incident response case on letsdefend platform which provides a simulated SOC corporate environment. We will investigate a windows server 2019 infected by DogWalk 0DAY vulnerability which was recently publicly announced by Microsoft and also received cve: CVE-2022–34713.
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 diagnostic tool saves files from a .diagcab package before verifying its digital signature, allowing a crafted package to write to arbitrary locations such as the startup folder.
Impact
The attacker could place a malicious executable in the startup folder, achieving persistence and potentially executing arbitrary commands on the server.
What the attacker needed
Victim downloads a malicious .diagcab file; victim opens the file
The fix
Microsoft released a fix for this vulnerability, as indicated by the CVE assignment and public announcement.
How it was found
- The user downloaded a .diagcab file named hotfix895214.diagcab.
- The user double-clicked the file, which started msdt.exe.
- msdt.exe processed the package and placed a malicious calc.exe in the user's startup folder.
- The endpoint contacted an external IP address from which malicious files were downloaded.
- The investigator confirmed the dropped files were malicious using VirusTotal.
- The investigator contained the device and deleted the malicious artifacts.
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.
This is a real vulnerability in a Windows tool called msdt.exe, which handles diagnostic packages. The tool checks the package's signature only after it has already saved files, so an attacker can sneak a malicious file into a startup folder. That means the bad file runs every time the computer starts, giving the attacker a foothold.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.