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

# VNC - 5800,5801,5900,5901

### استغلال VNC على المنافذ 5800 و5801 و5900 و5901

تحديد المنافذ المستمعة:

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

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

#### **نفق SSH لإعادة توجيه منافذ 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/2c2b96b50183e4d23ae43bc5ab03f12090729ea1" alt=""><figcaption></figcaption></figure>

فحص خدمات 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/4d299f177c179b472d122afbda66d08948e540d4" alt=""><figcaption></figcaption></figure>

#### **الاتصال عبر vncviewer**

استخدم كلمة المرور الموجودة في `secret.zip`:

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

توفر جلسة VNC **وصول root** على الجهاز.

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