> 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/es/web-vulnerabilities/webdav-attack/webdav-techniques-pentesting-web.md).

# Técnicas WebDAV

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

### Reconocimiento (whatweb):

> La fase inicial **reconocimiento** La fase de reconocimiento inicial intenta identificar qué extensiones de archivo permite el servidor. Una vez que se conocen esas extensiones, los atacantes pueden intentar subir y ejecutar archivos maliciosos. Si la carga y la ejecución tienen éxito, pueden obtener acceso no autorizado y comprometer el sistema.

* El **WhatWeb** la herramienta indica que el **WebDAV** protocolo se utiliza.

<figure><img src="/files/176955ffda85d2f2f46f505fb3cc45041bcda7a4" alt=""><figcaption></figcaption></figure>

### Fuerza bruta (Davtest):

> La herramienta **Davtest** es una herramienta de línea de comandos utilizada para realizar pruebas de penetración en servidores WebDAV. Davtest puede utilizarse para enumerar recursos protegidos en un servidor WebDAV, así como para probar la configuración de seguridad del servidor. Davtest también puede utilizarse para probar la autenticación y la autorización del servidor, y detectar vulnerabilidades conocidas.

```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 "[+] La contraseña correcta es $password"; break; fi; done

```

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

### Carga de archivos (Cadaver):

> **Cadaver** es otra herramienta de línea de comandos utilizada para interactuar con servidores WebDAV. Cadaver permite a los usuarios explorar los recursos del servidor, subir archivos y ejecutar comandos en el servidor. También puede utilizarse para tareas de pruebas de penetración, como la enumeración de recursos protegidos y la explotación de vulnerabilidades conocidas.

* Una vez que sabemos el **nombre de usuario y la contraseña** mediante el ataque de fuerza bruta, nos conectamos con Cadaver.

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

* Para **subir archivos**, usamos el comando **put** seguido del nombre del archivo:

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

<figure><img src="/files/02c2b1f403abf51568e359c6a2f6143e8b6ba29c" alt=""><figcaption></figcaption></figure>

* Si **WebDAV** interpretado **PHP** código, podríamos ejecutar un [LFI](/es/web-vulnerabilities/owasp-top-10-vulnerabilities/vulnerability-local-file-inclusion-lfi.md) o incluso un [RFI](/es/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/es/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.
