Reconnaissance
I used RustScan for port discovery.

Five ports were open.
Service identification
I used Nmap for service detection.

The results indicated Apache, Samba (smbd 4.6.2), and MiniServ web services, including ports 10000 and 20000. The banners suggested Debian.
Enumeration
Port 80 displayed the default Apache page.

The page source contained an encoded message.

I decoded the message and retained the resulting string as a credential candidate.

The decoded value was:
`.2uqPEfj3D<P’a-3
SMB enumeration on ports 139 and 445 followed.
enum4linux identified the accounts cyber and nobody.
The candidate credential failed on port 10000.
The same credential worked on the service at port 20000.

Initial access
I opened the application’s command shell.

I prepared a listener for a callback.
I used a Perl callback payload.

I submitted the payload to the command shell.

The callback yielded a shell, from which I retrieved local.txt.
Privilege escalation
I investigated a tar binary available in the user directory. 
GTFOBins described a file-read technique for tar.
I tested whether the binary could read restricted files.

I first requested /etc/passwd.

The read succeeded, so I examined root’s shell history.
The history pointed to /var/backups/.old_pass.bak.
That backup contained a candidate root password.

I tested the candidate with su.
It authenticated successfully as root.

Outcome
The decoded page hint led to access on port 20000; the application shell provided user access; and a readable backup exposed the root password and final flag.