Box Stats
Box Info | Details |
---|---|
Box Name : | All in One |
Difficulty : | Medium |
Play : | All in One |
Recommended : | Yes ![]() |
Summary
This was a really cool box, It’s about exploiting LFI on a vulnerable wordpress plugin this leads to reverse shell. Privesc to root is a simple SUID exploitation. Let’s start!
Enumeration/Reconnaissance
Now as always let’s continue with a nmap scan.
1 |
|
FTP haven’t any interesting file, so let’s start enumerating the port 80. Once we visit the website we see the apache2 default page so let’s fire up gobuster
.
1 |
|
/wordpress
here we go. Without wasting time let’s start a wpscan
scan.
1 |
|
We have a user elyana
and 2 plugins. Let’s search for possible exploits on mail-masta
plugin.
1 |
|
Shell as www-data
Perfect, LFI one seems perfect. Let’s test it out!
1 |
|
Here we go, i tried to read the SSH private key for elyana and similar stuff but nothing worked. Then i had the idea to read the wp-config.php
since it’s running wordpress & it worked but we need a little trick. When we have LFI we can’t read php files because they get executed by the webserver. So we will do a trick to bypass that using base64. I made a command that does the job:
1 |
|
Now we can login as elyana:H@ckme@123
on wordpress at /wp-admin
. We can spawn a reverse shell if you don’t know how to spawn one follow my steps from this post Vulnhub - ColddBox Easy
1 |
|
Shell as root
Privesc to root is easy, let’s check for SUID files.
1 |
|
We can run /bin/bash
as root, but it needs an argument -p
to allow the shell to run with SUID privileges.
1 |
|
Let’s read the flags. (You have to base64 decode them)
1 |
|
Thank You
Thank you for taking the time to read my writeup. If you don’t understand something from the writeup or want to ask me something feel free to contact me through discord(0xatom#8707) or send me a message through twitter 0xatom
Until next time keep pwning hard!