Seppuku
Ran a TCP scan via Nmap
# Nmap 7.95 scan initiated Tue Oct 14 10:12:45 2025 as: /usr/lib/nmap/nmap -sC -sV -p 21,22,80,139,445,7080,7601,8088 -oA nmap 192.168.106.90
Nmap scan report for 192.168.106.90
Host is up (0.072s latency).
PORT STATE SERVICE VERSION
21/tcp open ftp vsftpd 3.0.3
22/tcp open ssh OpenSSH 7.9p1 Debian 10+deb10u2 (protocol 2.0)
| ssh-hostkey:
| 2048 cd:55:a8:e4:0f:28:bc:b2:a6:7d:41:76:bb:9f:71:f4 (RSA)
| 256 16:fa:29:e4:e0:8a:2e:7d:37:d2:6f:42:b2:dc:e9:22 (ECDSA)
|_ 256 bb:74:e8:97:fa:30:8d:da:f9:5c:99:f0:d9:24:8a:d5 (ED25519)
80/tcp open http nginx 1.14.2
|_http-server-header: nginx/1.14.2
|_http-title: 401 Authorization Required
| http-auth:
| HTTP/1.1 401 Unauthorized\x0D
|_ Basic realm=Restricted Content
139/tcp open netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)
445/tcp open netbios-ssn Samba smbd 4.9.5-Debian (workgroup: WORKGROUP)
7080/tcp open ssl/empowerid LiteSpeed
|_ssl-date: TLS randomness does not represent time
|_http-server-header: LiteSpeed
| tls-alpn:
| h2
| spdy/3
| spdy/2
|_ http/1.1
|_http-title: Did not follow redirect to https://192.168.106.90:7080/
| ssl-cert: Subject: commonName=seppuku/organizationName=LiteSpeedCommunity/stateOrProvinceName=NJ/countryName=US
| Not valid before: 2020-05-13T06:51:35
|_Not valid after: 2022-08-11T06:51:35
7601/tcp open http Apache httpd 2.4.38 ((Debian))
|_http-server-header: Apache/2.4.38 (Debian)
|_http-title: Seppuku
8088/tcp open http LiteSpeed httpd
|_http-server-header: LiteSpeed
|_http-title: Seppuku
Service Info: Host: SEPPUKU; OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernel
Host script results:
|_clock-skew: mean: 1h19m59s, deviation: 2h18m34s, median: -1s
| smb-os-discovery:
| OS: Windows 6.1 (Samba 4.9.5-Debian)
| Computer name: seppuku
| NetBIOS computer name: SEPPUKU\x00
| Domain name: \x00
| FQDN: seppuku
|_ System time: 2025-10-14T00:43:04-04:00
| smb-security-mode:
| account_used: guest
| authentication_level: user
| challenge_response: supported
|_ message_signing: disabled (dangerous, but default)
| smb2-time:
| date: 2025-10-14T04:43:04
|_ start_date: N/A
| smb2-security-mode:
| 3:1:1:
|_ Message signing enabled but not required
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
# Nmap done at Tue Oct 14 10:13:11 2025 -- 1 IP address (1 host up) scanned in 26.12 seconds
Here several services like FTP and SMB were running on the target but nothing was found in them upon enumeration.
I opened the webpage at port 80 but it showed a prompt for username and password which I didn't have then.
Next, I checked the web server running on port 7601 and found this cryptic image

I brute-forced the directories on this port via Gobuster and found the following.

I checked the
keyssubdirectory and found the following

Here both the files contained the same SSH key as follows.

This one was interesting, next I visited the
/secretsubdirectory.

The
hostnamefile had onlyseppukuwritten inside it which could mean that it was one of the users on the target.passwd.bakhad a list of user accounts and information.

Similarly,
shadow.bakhad a hashed password.

It was made clear here that this approach was a rabbit hole. Initially I was thinking of dehashing the password and use it further.
We also had a
password.lstfile which was a small wordlist of keywords which maybe would be used to bruteforce something.
Foothold
My first approach was to use the obtained SSH key and login to the target from user
seppuku. I tried to do so but it didn't work hence it was evident that a password was required.This is where the wordlist came in. I ran Hydra to bruteforce the password on the target's SSH service for
seppukuuser.

The password for
seppukuwas obtained successfully! I used it to login to the target and gain an initial foothold.

The first flag was successfully obtained.
Privilege Escalation
I was inside a restricted shell by default, and due to that I was unable to change directories or use
/slash in my commands.

To break out of it I copied
/bin/bashto my working directory and ranbashfrom there.Next, I ran
sudo -land found the following

But I was unable to use it to escalate my privileges.
I checked the user directory of
seppukuand found a.passwdfile.

This was apparently the password for some user.
Next, I checked the home directory and found that there were two other users on the system named
tantoandsamuraiI tried logging in to both the users via SSH using the password but it didn't work. Next, I tried switching the user from the foothold and I could successfully login as
samuraiuser.I ran
sudo -land found the following

As it is stated above, I could run a
binfile inside thetanto/.cgi_bindirectory with sudo permissions, but I could find no such directory intanto.But one approach could be used here. I could create the
.cgi_bindirectory myself and create a filebinhaving custom code to escalate privileges.But to do that I needed to login as
tantouser.Maybe I could use the previously obtained SSH key on either of the two.
I tried logging on to the target as
tantouser via the SSH key and I successfully got in.

There was yet again a restricted shell which I broke out of using the same method described above.
I created the
binfile and added/bin/bash -pto it.Next, from the
samuraiuser, I executed the command as follows and gained a root shell.

The next step was to obtain the root flag from
proof.txtand that was all for this room.
Last updated