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

# VNC - 5800,5801,5900,5901

### Exploração de VNC nas portas 5800, 5801, 5900 e 5901

Identifique as portas em escuta:

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

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

#### **Túnel SSH para redirecionar portas 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/e67ec5930b4719e4f795d7e053e2031b85ae0c1c" alt=""><figcaption></figcaption></figure>

Faça a varredura dos serviços 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/1b9e5e0355d21cdcfac0056f3d7da667e1ecc2e9" alt=""><figcaption></figcaption></figure>

#### **Conexão via vncviewer**

Use a senha encontrada em `secret.zip`:

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

A sessão VNC fornece **acesso root** na máquina.

<figure><img src="/files/93f2ec9e4cad3add8b7054dd73a01df99e1500d9" 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/pt-br/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.
