githubEdit

Codify

Initial Scan

sudo nmap -T4 -v 10.129.82.199
sudo nmap -T4 -Pn -p 22,80,3000 -sV -sC -v 10.129.82.199 -oA Codify

HTTP

Had to edit the host file to get the Webpage

Checking out their About Us page

Looking around for VM2 CVE's, found this article on snykarrow-up-right about RCE with VM2 after seeing a couple others. Testing the other PoC's I didn't get anywhere until I found this one. We can run commands on the host bypassing the VM.

whoami shows us the svc user. Also looking at /etc/passwd we see an additional user, joshua

BruteForce

Trying to run Hydra against the user joshua for a password

joshua:spongebob1

Obtaining shell

Working to get a shall as svc. Looking around for reverse shell, I found PayloadAllTheThingsarrow-up-right.

Running it normally didn't work so I encoded it

Full command

Foothold

We have shell as svc

Seeing what permissions we have

User Flag

After getting into shell from the SVC user, I got Joshuas password with hydra.

User flag: c53cdd4688463871ba3f4020ab6f3ccb

Priv Esc

We have run the note of "User joshua may run the following commands on codify: (root) /opt/scripts/mysql-backup.sh" So looking at the shell file

Running that as root as get

Get PSPYarrow-up-right Initiate another SSH session. Get pspy64 onto the target machine, run it, then run the /opt/scripts/mysql-backup.sh script

Root pass: kljh12k3jhaskjh12kjh3

Root flag: 4e43f866588b3b3433196af3cef8b768

Last updated