Previously we have learned all about the port SMB and how to identify its working on the remote host. To read that click here
In this article, we will learn how to gain control over our victim’s PC through SMB Port. There are various ways to do it and let take time and learn all those because different circumstances call for different measure.
SMB Login Check Scanner
This module will test a SMB login on a range of machines and report successful logins. If you have loaded a database plugin and connected to a database this module will record successful logins and hosts so you can track your access.
Once the metasploit opens type:
use auxiliary/scanner/smb/smb_login
msf exploit (smb_login)>set user_file /root/Desktop/user.txt
msf exploit (smb_login)>set set pass_file /root/Desktop/pass.txt
msf exploit (smb_login)>set set rhost 192.168.0.104
msf exploit (smb_login)>set set rport 445
msf exploit (smb_login)>set exploit
Here,
auxiliary/scanner/smb/smb_login –> is a module we will use to attempt to login
/root/Desktop/user.txt –> is the path of text file which is the resident of all the possible usernames.
/root/Desktop/pass.txt –> is the path of text file in which all the possible passwords resides.
Once the commands are executed as you can see in the above image that it will start applying the dictionary attack and so you will have the right username and password in no time.
xHydra
This is the graphical version to apply dictionary attack via SMB port to hack a system. For this method to work:
Open xHydra in your kali. And select Single Target option and their give the IP of your victim PC. And select smb in box against Protocol option and give the port number 445 against the port option.
Now, go to Passwords tab and select Username List and give the path of your text file, which contains usernames, in the box adjacent to it.
Then select Password List and give the path of your text file, which contains all the passwords, in the box adjacent to it.
After doing this, go to Start tab and click on Start button on the left.
Now, the process of dictionary attack will start. Thus, you will attain the username and password of your victim.
Hydra
This is one command method and works efficiently with not much work. This method works in the terminal of kali. Therefore, open the terminal in your kali and type:
hydra -l raj -P /root/Desktop/pass.txt 192.168.0.104 smb
Here,
-l –>denotes the username
-P –> is to denote the path of password
/root/Desktop/pass.txt –> path of password file
And so, with just the working of one command we have password and username of our victim.
Ncrack
This too is a one command method which also works in terminal of kali. Go to your terminal and type:
ncrack -user raj -P /root/Desktop/pass.txt 192.168.0.104:445
Here,
-user –> denotes the username
raj –> is the username
-P –> denotes password file’s path
/root/Desktop/pass.txt –> is the path of password file
445 –> is the port number
And so, with little work we can attain the password and username of our victim’s PC. Hence, all the methods to hack a system through SMB port which is used for file sharing
Author: Yashika Dhir is a passionate Researcher and Technical Writer at Hacking Articles. She is a hacking enthusiast.
The post 4 Ways to Hack SMB Login Password appeared first on Hacking Articles.