is an easy room released on August 18th, 2019 by MrSeth6797.
User Own
How many services are running under port 1000?
Nmap scan:
Starting Nmap 7.93 ( https://nmap.org ) at 2023-04-21 22:39 EDT
Nmap scan report for 10.10.xx.xx
Host is up (0.11s latency).
Not shown: 997 filtered tcp ports (no-response)
PORT STATE SERVICE VERSION
21/tcp open ftp vsftpd 3.0.3
| ftp-anon: Anonymous FTP login allowed (FTP code 230)
|_Can't get directory listing: TIMEOUT
| ftp-syst:
| STAT:
| FTP server status:
| Connected to ::ffff:10.6.xx.xx
| Logged in as ftp
| TYPE: ASCII
| No session bandwidth limit
| Session timeout in seconds is 300
| Control connection is plain text
| Data connections will be plain text
| At session startup, client count was 3
| vsFTPd 3.0.3 - secure, fast, stable
|_End of status
80/tcp open http Apache httpd 2.4.18 ((Ubuntu))
| http-robots.txt: 2 disallowed entries
|_/ /openemr-5_0_1_3
|_http-server-header: Apache/2.4.18 (Ubuntu)
|_http-title: Apache2 Ubuntu Default Page: It works
2222/tcp open ssh OpenSSH 7.2p2 Ubuntu 4ubuntu2.8 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 2048 294269149ecad917988c27723acda923 (RSA)
| 256 9bd165075108006198de95ed3ae3811c (ECDSA)
|_ 256 12651b61cf4de575fef4e8d46e102af6 (ED25519)
Service Info: OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernel
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 46.04 seconds
There are 2 services running under port 1000, those being FTP on port 21 and HTTP on port 80.
What is running on the higher port?
The highest port is port 2222, with SSH communicating on that port.
What's the CVE you're using against the application?
Going to http://10.10.xx.xx/simple/ shows the system is running CMS Made Simple.
The bottom of the page reveals the version of CMSMS to be 2.2.8. This version of CMSMS is vulnerable to CVE-2019-9053.
To what kind of vulnerability is the application vulnerable?
The description of CVE-2019-9053:
An issue was discovered in CMS Made Simple 2.2.8. It is possible with the News module, through a crafted URL, to achieve unauthenticated blind time-based SQL injection via the m1_idlist parameter.
CVE-2019-9053 uses SQL injection, also known as SQLi.
The Python script determines the password to be secret.
Where can you login with the details obtained?
Password reuse is common, and the password obtained from before can be reused for SSH.
What's the user flag?
The user flag is located in mitch's home directory.
ssh mitch@10.10.xx.xx -p 2222
mitch@10.10.xx.xx's password:
Welcome to Ubuntu 16.04.6 LTS (GNU/Linux 4.15.0-58-generic i686)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
0 packages can be updated.
0 updates are security updates.
Last login: Sat Apr 22 05:25:10 2023 from 10.6.xx.xx
$ ls
user.txt
$ cat user.txt
G00d j0b, keep up!
Inside user.txt is the user flag, G00d j0b, keep up!
System Own
Is there any other user in the home directory? What's its name?
Looking at the /home directory shows another user, sunbath.
What can you leverage to spawn a privileged shell?
Using sudo -l:
User mitch may run the following commands on Machine:
(root) NOPASSWD: /usr/bin/vim
We can run Vim as root. If we can edit anything as root, we can change the password of a privileged user in /etc/shadow to login as them.
Using mkpasswd -5 will create a password from input encrypted with md5crypt in a format acceptible by /etc/shadow. We can replace the password for sunbath with the newly created password.