Hutch

ldap bloodhound.py kerberos laps

  • Nom machine : Hutch

  • Difficulté : Intermédiaire

  • OS : Windows

Enumération

NMAP

Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-08-03 08:23 EDT
Nmap scan report for 192.168.218.122
Host is up (0.038s latency).
Not shown: 65514 filtered tcp ports (no-response)
PORT      STATE SERVICE       VERSION
53/tcp    open  domain        Simple DNS Plus
80/tcp    open  http          Microsoft IIS httpd 10.0
| http-webdav-scan: 
|   WebDAV type: Unknown
|   Public Options: OPTIONS, TRACE, GET, HEAD, POST, PROPFIND, PROPPATCH, MKCOL, PUT, DELETE, COPY, MOVE, LOCK, UNLOCK
|   Server Date: Sat, 03 Aug 2024 12:28:06 GMT
|   Allowed Methods: OPTIONS, TRACE, GET, HEAD, POST, COPY, PROPFIND, DELETE, MOVE, PROPPATCH, MKCOL, LOCK, UNLOCK
|_  Server Type: Microsoft-IIS/10.0
| http-methods: 
|_  Potentially risky methods: TRACE COPY PROPFIND DELETE MOVE PROPPATCH MKCOL LOCK UNLOCK PUT
|_http-title: IIS Windows Server
|_http-server-header: Microsoft-IIS/10.0
88/tcp    open  kerberos-sec  Microsoft Windows Kerberos (server time: 2024-08-03 12:27:17Z)
135/tcp   open  msrpc         Microsoft Windows RPC
139/tcp   open  netbios-ssn   Microsoft Windows netbios-ssn
389/tcp   open  ldap          Microsoft Windows Active Directory LDAP (Domain: hutch.offsec0., Site: Default-First-Site-Name)
445/tcp   open  microsoft-ds?
464/tcp   open  kpasswd5?
593/tcp   open  ncacn_http    Microsoft Windows RPC over HTTP 1.0
636/tcp   open  tcpwrapped
3268/tcp  open  ldap          Microsoft Windows Active Directory LDAP (Domain: hutch.offsec0., Site: Default-First-Site-Name)
3269/tcp  open  tcpwrapped
5985/tcp  open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
|_http-server-header: Microsoft-HTTPAPI/2.0
|_http-title: Not Found
9389/tcp  open  mc-nmf        .NET Message Framing
49666/tcp open  msrpc         Microsoft Windows RPC
49667/tcp open  msrpc         Microsoft Windows RPC
49673/tcp open  ncacn_http    Microsoft Windows RPC over HTTP 1.0
49674/tcp open  msrpc         Microsoft Windows RPC
49676/tcp open  msrpc         Microsoft Windows RPC
49692/tcp open  msrpc         Microsoft Windows RPC
49856/tcp open  msrpc         Microsoft Windows RPC
Service Info: Host: HUTCHDC; OS: Windows; CPE: cpe:/o:microsoft:windows

(Domain: hutch.offsec0., Site: Default-First-Site-Name)

Nous avons ajouté " hutch.offsec " au fichier /etc/hosts

LDAP (389)

Nous allons extraire des noms d'utilisateurs

La sortie est très longue, nous allons donc la réduire et selectionnant uniquement ce qui nous intéresse.

Bingo ! Maintenant nous pouvons recopier ces noms d'utilisateurs dans un fichier. Nous pouvons par exemple utiliser gedit et utiliser la fonction rechercher et modifier.

Nous allons voir si on ne trouve pas d'autres informations importantes ...

Nous trouvons donc un mot de passe

Kerberos (88)

Aucun hash de retrouver.

Nous allons utiliser le mot de passe retrouvé plus tôt.

Le mot de passe appartient à fmcsorley !

Accès initial

Cadaver (webDAV)

Nous pouvons nous connecter au port 80 et upload un shell. Nous avons obtenu ses informations grâce au scan nmap où "post" est autorisé pour webdav.

J'ai copié le reverse-shell PowerShell base64 de :

Puis lancer la commande, tout en ayant un listeneur sur ma macine kali

Elévation des privilèges

Nous pouvous voir un service LAPS .

Nous pouvons l'exploiter.

Ce qui nous intéresse : ms-Mcs-AdmPwd: 0sxhC1%Om9UK(C

Nous avons exécuté psexec :

Nous sommes nt authority\system !

Il y avait encore d'autres moyens de finir la box, par exemple, il était possible d'utiliser PrintSpoofer (SeImpersonate privileges : enabled).

Mis à jour