Exploitation
Logging in with found Credentials

Downloading the file and trying to read it shows us that it is base64. decoding the file with a different name shows us that the file is a zip file and trying to unzip the file shows us that it needs a password. These are the following commands to get this done.
The file needs a password, therefore we're going to brute force the zip file using fcrackzip
password is magicword
Found source code
While analyzing the source code, something that we want to do is a find a password we can search for passwords by typing the following command
After looking through the source code not much stood out, but we did notice that it ran mongodb

In order to figure out where the mongo connection is controlled, we can look at app.js

Found Username and password
Username: mark
Password: 5AYRft73VtFpc84k
Initial Access
After obtaing mongo db password, we attempt to SSH and it worked. Mark was using the same credentials for SSH and MongoDB. Bad practice Mark, bad practice.

Pivoting to TOM
After running LinEnum.sh somthing that stood out is teh running process running as tom.

Node scheduler running as tom. looking at it
Reading that file we are able to find credentials. The script takes everything in the task selection and passes it through exec.

username: mark
password: 5AYRft73VtFpc84k
PrivEsc to Tom User
That first one did not work, however retyping with different stickbits (hope thats right) we are able to escalate to tom
It would be ideal in this case to drop an ssh key so you can login as tom, unfortanetley, we don't have permissions to do so. So we will run LinEnum on it once more to see if we have any other findings.
PrivEsc to admin group
After running a more thourough nmap scan, we are able to look at the SUID's.
something that stood out:

looks to be owned by root and is in the admin group. To PrivEsc into the admin group we will have to go through mongo db.
Successful PrivEsc of group. Now that we are in the admin group we can acess usr/local/bin/backup we will use netcat to transfer since this is a big boi.
On our machine set up a listner as so.
On the target machine:
Analyzing Backup Binary File
Last updated