arrows-to-circleRootMe (SUID PYTHON)

PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   2048 4a:b9:16:08:84:c2:54:48:ba:5c:fd:3f:22:5f:22:14 (RSA)
|   256 a9:a6:86:e8:ec:96:c3:f0:03:cd:16:d5:49:73:d0:82 (ECDSA)
|_  256 22:f6:b5:a6:54:d9:78:7c:26:03:5a:95:f3:f9:df:cd (ED25519)
80/tcp open  http    Apache httpd 2.4.29 ((Ubuntu))
|_http-server-header: Apache/2.4.29 (Ubuntu)
|_http-title: HackIT - Home
| http-cookie-flags: 
|   /: 
|     PHPSESSID: 
|_      httponly flag not set
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

Buscaremos diretorios:

gobuster dir -u 10.10.34.175 -w /opt/SecLists/Discovery/Web-Content/common.txt

Ahora intentaremos colar un php pero no nos deja para ello le agregamos un php5 y puede ser otros mas php4 etc...

Lo subimos y se agrego exitosamente y podemos agregar comandos

Ahora nos daremos una revershell

Cualquiera:

Cuando es www data tenemos que tratar que sea una tty para tener algo mas interactivo

Con este comando explotanto el SUID python tendriamos root:

Lo que hace este comando es darnos algo mas interectivo el root: script /dev/null -c bash

Last updated