Reconnaissance
First, I added the new host to my known ones:
Then, I performed an Nmap scan:
Once here, I wanted to know what was running behind port 3000, so I performed a second Nmap scan:
I decided to take a look at the website at port 80:
I didnโt find anything interesting, so I decided to take a look at port 3000:
Gitea was found!, so I created a user inside:
Once in, I looked up for the GreenHorn source code:
I discovered a login.php
file, which had the following:
So I took a look at that specific file, which had the passwd stored in sha512:
I took a look at https://crackstation.net/ and this was the output:
So now, I can login into login.php
:
Weโre in:
So itโs time to get a reverse shell.
Weaponization
Found this RCE script: https://www.exploit-db.com/exploits/51592
Exploitation
Go to options
>> manage modules
>> Install a module
:
Then upload a .zip
file containing a php reverse shell:
- Create a
.php
reverse shell
- Zip it:
zip result.zip shell.php
- Start a netcat listener:
nc -lvnp PORT
- Upload it:
Weโve got a shell :D
Stabilise it with:
Sadly weโve got no read permissions onto user.txt
flag:
After some time searching, I managed to use the pluck password with the junior account (kinda noobie btw xd)
Got the user flag!:
Privilege Escalation
I downloaded onto my machine the โUsing OpenVAS.pdfโ
Now, we can try to eliminate the pixels in the password using pdfimage
:
- Install with
apt-get install poppler-utils
We get this result:
Now we can use a tool called Depix to eliminate those pixels on the image:
We get this ouput:
So letโs try this password for the user root:
root:sidefromsidetheothersidesidefromsidetheotherside
We got the root flag :D
Machine pwned!