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

# Техники WebDAV

<figure><img src="/files/86c13f4a547aa63e49dbbe39f7b6b37f4d72ad61" alt=""><figcaption></figcaption></figure>

### Разведка (whatweb):

> Первоначальная **разведка** Фаза пытается определить, какие расширения файлов разрешает сервер. Как только эти расширения будут известны, злоумышленники могут попытаться загрузить и выполнить вредоносные файлы. Если загрузка и выполнение будут успешны, они могут получить несанкционированный доступ и скомпрометировать систему.

* У **WhatWeb** инструмент указывает, что **WebDAV** используется протокол.

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

### Брутфорс (Davtest):

> Инструмент **Davtest** это командная строка, используемая для проведения тестов на проникновение на серверах WebDAV. Davtis можно использовать для перечисления защищённых ресурсов на сервере WebDAV, а также для проверки конфигурации безопасности сервера. Davtis также можно использовать для проверки аутентификации и авторизации сервера и обнаружения известных уязвимостей.

```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 "[+] Правильный пароль: $password"; break; fi; done

```

<figure><img src="/files/371e09fec1f68ea9f6454a264729944087de6491" alt=""><figcaption></figcaption></figure>

### Загрузка файлов (Cadaver):

> **Cadaver** это ещё один инструмент командной строки, используемый для взаимодействия с серверами WebDAV. Cadaver позволяет пользователям просматривать ресурсы сервера, загружать файлы и выполнять команды на сервере. Его также можно использовать для задач тестирования на проникновение, таких как перечисление защищённых ресурсов и эксплуатация известных уязвимостей.

* Как только мы узнаем **имя пользователя и пароль** с помощью атаки перебором, мы подключаемся к Cadaver.

<figure><img src="/files/00fb06558529fdee0d6d353abb7d8fb72b72baeb" alt=""><figcaption></figcaption></figure>

* Чтобы **загружать файлы**, мы используем команду **put** за которым следует имя файла:

<figure><img src="/files/3f2e0efb588b987a4b4765479b7b5880fed4bd72" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/1faa2a00abc823d8637893707d36abe7aa975d5d" alt=""><figcaption></figcaption></figure>

* Если **WebDAV** интерпретированный **PHP** код, мы могли бы выполнить [LFI](/ru/web-vulnerabilities/owasp-top-10-vulnerabilities/vulnerability-local-file-inclusion-lfi.md) или даже [RFI](/ru/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/ru/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.
