# 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 %}