Jangow VulnHub

Escaneo de puertos

nmap -p- --min-rate 5000 -sS <IP>

Info:

Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-05-30 05:54 EDT
Nmap scan report for 192.168.5.155
Host is up (0.00043s latency).

PORT   STATE SERVICE VERSION
21/tcp open  ftp     vsftpd 3.0.3
80/tcp open  http    Apache httpd 2.4.18
| http-ls: Volume /
| SIZE  TIME              FILENAME
| -     2021-06-10 18:05  site/
|_
|_http-server-header: Apache/2.4.18 (Ubuntu)
|_http-title: Index of /
MAC Address: 00:0C:29:1A:67:37 (VMware)
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Aggressive OS guesses: Linux 3.10 - 4.11 (97%), Linux 3.16 - 4.6 (97%), Linux 3.2 - 4.9 (97%), Linux 4.4 (97%), Linux 3.13 (94%), Linux 3.13 - 3.16 (91%), OpenWrt Chaos Calmer 15.05 (Linux 3.18) or Designated Driver (Linux 4.1 or 4.4) (91%), Linux 4.10 (91%), Linux 5.1 (91%), Android 5.0 - 6.0.1 (Linux 3.4) (91%)
No exact OS matches for host (test conditions non-ideal).
Network Distance: 1 hop
Service Info: Host: 127.0.0.1; OS: Unix

TRACEROUTE
HOP RTT     ADDRESS
1   0.43 ms 192.168.5.155

OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 15.36 seconds

Gobuster

Info:

Pero nada interesante...

Puerto 80

Si le damos a Buscar en la URL nos aparecera una especie de .php en el cual podemos poner comandos de linux normales, por lo que podremos inyectar una Reverse Shell...

Info:

Vemos que hay 1 usuario...

Haremos la Reverse Shell...

Eso hay que encodearlo en URL...

Teniendo la shell ya con el usuario www-data, sanitizamos la shell...

Nos vamos a /home/jangow01/ para leer la flag...

user.txt (flag1)

Si hacemos lo siguiente...

Veremos lo siguiente...

El que mas nos tiene que interesar es la siguiente linea...

Es como un /bin/bash pero de otra manera, por lo que utilizaremos un exploit que te lo automatiza todo...

URL = https://github.com/Almorabea/pkexec-exploit

Esto nos lo llevaremos al servidor victima, ya sea copiando el contenido de python o transferirlo con algun comando como curl o wget, una vez teniendolo dentro...

Info:

Con esto ya seriamos root, por lo que leeremos la flag...

proof.txt (flag2)

Last updated