# 5800,5801,5900,5901 - Pentesting VNC
{% hint style="success" %}
Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
Support HackTricks
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
* **Join the** ๐ฌ [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** ๐ฆ [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
{% endhint %}
If you are interested in **hacking career** and hack the unhackable - **we are hiring!** (_์ ์ฐฝํ ํด๋๋์ด ๊ตฌ์ฌ ํ์_).
{% embed url="https://www.stmcyber.com/careers" %}
## Basic Information
**๊ฐ์ ๋คํธ์ํฌ ์ปดํจํ
(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
msf> use auxiliary/scanner/vnc/vnc_none_auth
```
### [**๋ฌด์ฐจ๋ณ ๋์
๊ณต๊ฒฉ**](../generic-methodologies-and-resources/brute-force.md#vnc)
## Kali๋ฅผ ์ฌ์ฉํ์ฌ vnc์ ์ฐ๊ฒฐํ๊ธฐ
```bash
vncviewer [-passwd passwd.txt] ::5901
```
## VNC ๋น๋ฐ๋ฒํธ ๋ณตํธํ
๊ธฐ๋ณธ **๋น๋ฐ๋ฒํธ๋ ์ ์ฅ๋จ**: \~/.vnc/passwd
VNC ๋น๋ฐ๋ฒํธ๊ฐ ์๊ณ ์ํธํ๋ ๊ฒ์ฒ๋ผ ๋ณด์ธ๋ค๋ฉด(๋ช ๋ฐ์ดํธ, ์ํธํ๋ ๋น๋ฐ๋ฒํธ์ผ ์ ์๋ ๊ฒฝ์ฐ), ์๋ง๋ 3des๋ก ์ํธํ๋์์ ๊ฒ์
๋๋ค. [https://github.com/jeroennijhof/vncpwd](https://github.com/jeroennijhof/vncpwd)๋ฅผ ์ฌ์ฉํ์ฌ ํ๋ฌธ ๋น๋ฐ๋ฒํธ๋ฅผ ์ป์ ์ ์์ต๋๋ค.
```bash
make
vncpwd
```
You can do this because the password used inside 3des to encrypt the plain-text VNC passwords was reversed years ago.\
**Windows**์์๋ ์ด ๋๊ตฌ๋ฅผ ์ฌ์ฉํ ์๋ ์์ต๋๋ค: [https://www.raymond.cc/blog/download/did/232/](https://www.raymond.cc/blog/download/did/232/)\
์ ๊ทผ์ ์ฉ์ดํ๊ฒ ํ๊ธฐ ์ํด ์ด ๋๊ตฌ๋ฅผ ์ฌ๊ธฐ์๋ ์ ์ฅํฉ๋๋ค:
{% file src="../.gitbook/assets/vncpwd.zip" %}
## Shodan
* `port:5900 RFB`
**ํดํน ๊ฒฝ๋ ฅ**์ ๊ด์ฌ์ด ์๊ณ ํดํนํ ์ ์๋ ๊ฒ์ ํดํนํ๊ณ ์ถ๋ค๋ฉด - **์ฐ๋ฆฌ๋ ์ธ์ฌ๋ฅผ ๋ชจ์งํฉ๋๋ค!** (_์ ์ฐฝํ ํด๋๋์ด ํ๊ธฐ ๋ฐ ๊ตฌ์ฌ ํ์_).
{% embed url="https://www.stmcyber.com/careers" %}
{% hint style="success" %}
AWS ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
GCP ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
HackTricks ์ง์ํ๊ธฐ
* [**๊ตฌ๋
๊ณํ**](https://github.com/sponsors/carlospolop) ํ์ธํ๊ธฐ!
* **๐ฌ [**Discord ๊ทธ๋ฃน**](https://discord.gg/hRep4RUj7f) ๋๋ [**ํ
๋ ๊ทธ๋จ ๊ทธ๋ฃน**](https://t.me/peass)์ ์ฐธ์ฌํ๊ฑฐ๋ **Twitter** ๐ฆ [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**๋ฅผ ํ๋ก์ฐํ์ธ์.**
* **[**HackTricks**](https://github.com/carlospolop/hacktricks) ๋ฐ [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํ์ ๊ณต์ ํ์ธ์.**
{% endhint %}