Andres Diaz

andres@diaz:~$ whoami

Andres Diaz

Defect Reproduction Engineer at Filevine

andresdiaztech@gmail.com

LinkedIn GitHub Blog



andres@diaz:~/blog$ cat day-07.md

cd ..

Day 07: Web and SMB enumeration on Kioptrix

Day 07 ยท Oct 24, 2026

Today in one line

I dug into the Kioptrix web server with Nikto, DirBuster and Burp Suite, and tracked down its Samba (SMB) version by reading the packets in Wireshark when the usual tools would not show it.

Web server enumeration

I pointed a few web tools at the Kioptrix site on port 80 (HTTP).

Nikto scans a web server for known problems in one pass:

kali@kali: ~
$sudo nikto -h http://192.168.56.101
+ Server: Apache/1.3.20 (Unix) mod_ssl/2.8.4 OpenSSL/0.9.6b
+ Apache/1.3.20 appears to be outdated (current is at least 2.4.68)
+ mod_ssl/2.8.4 - vulnerable to a remote buffer overflow which may allow a remote shell
+ OPTIONS: Allowed HTTP Methods: GET, HEAD, OPTIONS, TRACE
+ /manual/: Directory indexing found
+ /usage/: Webalizer may be installed
+ /test.php: This might be interesting
# nikto flags old software, risky methods and interesting files in one pass. the old Apache and mod_ssl stand out, and /test.php is worth a look.

I also opened two other web tools:

  • DirBuster (OWASP): brute forces directories and files on a web server with a wordlist, so it finds pages that are not linked anywhere. I pointed it at the site with the directory-list-2.3-small.txt wordlist and a php extension.
  • Burp Suite: an intercepting proxy. It sits between my browser and the target so I can see and change every HTTP request. I caught a plain GET request to the site in the Proxy > Intercept tab.

Finding the Samba (SMB) version

The service on port 139 is Samba, but pinning down the exact version was the whole challenge today. Metasploit came up empty:

kali@kali: ~
$msfconsole
msf > use auxiliary/scanner/smb/smb_version
msf > set RHOSTS 192.168.56.101
msf > run
[*] 192.168.56.101:139 - SMB Detected (versions: ) (preferred dialect: ) (signatures: optional)
[+] 192.168.56.101:139 - Host is running Unix
# SMB confirmed on a Unix host, but the version field was empty

Two more tools also would not give the version:

  • enum4linux confirmed it is a Samba server and gave me plenty: the workgroup (MYGROUP), that null sessions are allowed (a login with a blank username and password), a disabled password policy, and a full list of users and groups. But no version.
  • nmap with --script smb-os-discovery returned nothing at all.

The exact version lives in the old SMB1 banner, and modern tools do not read it. So I watched the traffic myself. I opened Wireshark and set the capture interface to eth1, where Kioptrix lives, then ran smbclient in a terminal:

kali@kali: ~
$smbclient -L //192.168.56.101

The SMB packets showed up in Wireshark as the connection happened.

In Wireshark, the server's Session Setup AndX Response had it in plain text:

Native OS: Unix
Native LAN Manager: Samba 2.2.1a

The catch was reading the response from the server (192.168.56.101), not the request my own machine sent, which only said "Samba" with no number.

Researching exploits for the versions

With the versions in hand (Apache 1.3.20 with mod_ssl 2.8.4, and Samba 2.2.1a), the next step is checking whether those versions have public exploits. Two ways: google the version plus the word "exploit", and search the local Exploit-DB copy with searchsploit.

kali@kali: ~
$searchsploit samba
Samba 2.2.x - 'call_trans2open' Remote Buffer Overflow | unix/remote/22468.c
Samba < 2.2.8 (Linux/BSD) - Remote Code Execution | multiple/remote/10.c
# my version is 2.2.1a, so the Samba 2.2.x remote overflows match (trans2open)
$searchsploit mod_ssl
Apache mod_ssl < 2.8.7 OpenSSL - 'OpenFuckV2.c' Remote Buffer Overflow | unix/remote/764.c
# mod_ssl 2.8.4 is below 2.8.7, so OpenFuck matches too (CVE-2002-0082)

That gives two candidate ways in:

  • Web: mod_ssl 2.8.4 is vulnerable to OpenFuck / OpenFuckV2 (CVE-2002-0082), a remote buffer overflow that can give a shell.
  • SMB: Samba 2.2.x is vulnerable to the trans2open buffer overflow.

The Exploit-DB categories I kept seeing: remote means it is triggered over the network with no prior access, which is exactly what I want for a first way in. local needs access to the box already (more for privilege escalation), and dos just crashes the service. A remote buffer overflow that drops a shell is remote code execution.

What I learned

1. Nikto for a quick web server check.
nikto -h http://<ip> scans a web server and reports old software, dangerous HTTP methods, default files and known issues. On Kioptrix it flagged the old Apache and mod_ssl right away.

2. DirBuster and Burp Suite.
DirBuster brute forces hidden directories and files with a wordlist. Burp Suite is an intercepting proxy that lets me watch and edit the HTTP requests my browser sends.

3. When the tools will not give you a version, read the packets.
Metasploit, enum4linux and nmap all failed to show the Samba version, but it was sitting in plain text in the SMB Session Setup response on the wire. Wireshark showed it once I looked at the server's response, not my own request. The course's older Metasploit printed it directly, so part of this was just newer tools dropping old SMB1 support.

4. Not every SMB box has a share to loot.
Kioptrix only exposes IPC$ and ADMIN$, with no browsable share like the Dancing box, a Hack The Box Starting Point machine, had. Here the weakness is the old Samba version itself, not readable files. SMB can be either, so I check both.

5. After enumeration, research the versions for exploits.
With the versions in hand, I look for public exploits by googling the version plus "exploit" and with searchsploit. On Exploit-DB, "remote" means it works over the network (what I want for a first way in), "local" needs access already, and "dos" just crashes the service.

The commands are collected in my Web Enumeration, Service Commands and Exploit Research notes.

Next up

  • Try one of the exploits I found (mod_ssl OpenFuck or Samba trans2open) against Kioptrix
  • Look at /test.php and the web app on Kioptrix