> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/pt-br/web-vulnerabilities/webdav-attack/webdav-techniques-pentesting-web.md).

# Técnicas WebDAV

<figure><img src="/files/dd5d57719b54ceb8617f3ee51a775834c92309b6" alt=""><figcaption></figcaption></figure>

### Reconhecimento (whatweb):

> A fase inicial **reconhecimento** tenta identificar quais extensões de arquivo o servidor permite. Depois que essas extensões são conhecidas, os invasores podem tentar enviar e executar arquivos maliciosos. Se o envio e a execução forem bem-sucedidos, eles podem obter acesso não autorizado e comprometer o sistema.

* O **WhatWeb** a ferramenta indica que o **WebDAV** protocolo é usado.

<figure><img src="/files/40af5239066af842cd98b404c8795127ca8c92b2" alt=""><figcaption></figcaption></figure>

### Força bruta (Davtest):

> A ferramenta **Davtest** é uma ferramenta de linha de comando usada para realizar testes de penetração em servidores WebDAV. Davtis pode ser usado para enumerar recursos protegidos em um servidor WebDAV, bem como para testar a configuração de segurança do servidor. Davtis também pode ser usado para testar a autenticação e a autorização do servidor e detectar vulnerabilidades conhecidas.

```bash
cat /usr/share/wordlists/rockyou.txt| whithe read password; do response=$(davtis -url http://127.0.0.1 -auth admin:$password 2>&1 | grep -i succeed); if [ $response ]; then echo "[+] A senha correta é $password"; break; fi; done

```

<figure><img src="/files/6b975fa503ec61f92d030001350a39f16d2d400c" alt=""><figcaption></figcaption></figure>

### Envio de arquivo (Cadaver):

> **Cadaver** é outra ferramenta de linha de comando usada para interagir com servidores WebDAV. O Cadaver permite aos usuários navegar pelos recursos do servidor, fazer upload de arquivos e executar comandos no servidor. Também pode ser usado em tarefas de teste de penetração, como enumeração de recursos protegidos e exploração de vulnerabilidades conhecidas.

* Assim que soubermos o **nome de usuário e a senha** usando o ataque de força bruta, nos conectamos com o Cadaver.

<figure><img src="/files/7a16ace8631dbd023bb5aa50ea91cc5203150540" alt=""><figcaption></figcaption></figure>

* Para **fazer upload de arquivos**, usamos o comando **put** seguido do nome do arquivo:

<figure><img src="/files/38ba3dc96fcabc3bc71be22fbe4f0185413fa3b7" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/9ab742c0761b9fa20fff69a590eb57c6836fad21" alt=""><figcaption></figcaption></figure>

* Se **WebDAV** interpretado **PHP** código, poderíamos executar um [LFI](/pt-br/web-vulnerabilities/owasp-top-10-vulnerabilities/vulnerability-local-file-inclusion-lfi.md) ou até um [RFI](/pt-br/web-vulnerabilities/owasp-top-10-vulnerabilities/vulnerability-remote-file-inclusion-rfi.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/pt-br/web-vulnerabilities/webdav-attack/webdav-techniques-pentesting-web.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
