After starting default nmap scan I found out there are a lot of ports with nothing interesting so i will skip them here
Port 113 hints about file. Let’s try to get it:
wget
[http://10.10.69.130/key_rev_key](http://10.10.69.130/key_rev_key)
It’s ELF so let’s run strings maybe we will get it!
I wasn’t able to decode it but I will remember about it
After checking ftp server i found that:
Just an image that might have some info hidden inside.
After running stegseek on that image it found b64.txt.
Let’s decode it
So it’s
/etc/shadow
let’s crack it with john!
Untitled-7.avif
We need to create such a file that mimics output of unshadow command
And just run john hash -w=/usr/share/wordlists/rockyou.txt
Untitled-1-4.avif
I wasn’t able to log in with that password but we can try it on webpage
We can run commands! I’ll open burp now to make it easier to work with.
Let’s save it and try to ssh with this key! (Don’t forget to run
chmod 400 id_rsa
)
First thing you should try in privesc is always
sudo -l
So we can run vi without password with sudo.
Using vim i know what we can run shell commands in it.
So we run sudo vi
And in it :!bash
But there is no root flag! only
root.py
Let’s check it.
After replacing that input with key string cause i don’t want to escape
=
symbol i got a flag!
Quite fun but too easy and too straight forward.