47 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 5800,5801,5900,5901 - Pentesting VNC
{{#include ../banners/hacktricks-training.md}}
## 基本信息
**虚拟网络计算 (VNC)** 是一个强大的图形桌面共享系统,利用 **远程帧缓冲 (RFB)** 协议来实现对另一台计算机的远程控制和协作。通过 VNC用户可以通过双向传输键盘和鼠标事件与远程计算机无缝互动。这允许实时访问并促进通过网络进行高效的远程协助或协作。
VNC 通常使用端口 **5800 或 5801 或 5900 或 5901.**
```
PORT STATE SERVICE
5900/tcp open vnc
```
## 枚举
```bash
nmap -sV --script vnc-info,realvnc-auth-bypass,vnc-title -p <PORT> <IP>
msf> use auxiliary/scanner/vnc/vnc_none_auth
```
### [**暴力破解**](../generic-hacking/brute-force.md#vnc)
## 使用Kali连接到vnc
```bash
vncviewer [-passwd passwd.txt] <IP>::5901
```
## 解密 VNC 密码
默认 **密码存储** 在: \~/.vnc/passwd
如果你有 VNC 密码并且看起来是加密的(几字节,像是可能是加密密码),它可能是用 3des 加密的。你可以使用 [https://github.com/jeroennijhof/vncpwd](https://github.com/jeroennijhof/vncpwd) 获取明文密码。
```bash
make
vncpwd <vnc password file>
```
您可以这样做,因为用于加密明文 VNC 密码的 3des 中使用的密码多年前已被破解。\
对于 **Windows**,您还可以使用此工具:[https://www.raymond.cc/blog/download/did/232/](https://www.raymond.cc/blog/download/did/232/)\
我也将工具保存在这里以便于访问:
{{#file}}
vncpwd.zip
{{#endfile}}
## Shodan
- `port:5900 RFB`
{{#include ../banners/hacktricks-training.md}}