This is a writeup of the Windows machine Active from HTB , itβs an easy difficulty windows machine which featured credentials stored in insecure Group Policy Preferences, and Kerberoastable accounts.
π₯ User
π Enumeration
An initial nmap scan of the host gave the following results:
nmap -sV -sC 10.129.230.204 Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-05-30 08:57 EDT Nmap scan report for 10.129.230.204 Host is up (0.023s latency). Not shown: 982 closed tcp ports (conn-refused) PORT STATE SERVICE VERSION 53/tcp open domain Microsoft DNS 6.1.7601 (1DB15D39) (Windows Server 2008 R2 SP1) | dns-nsid: |_ bind.version: Microsoft DNS 6.1.7601 (1DB15D39) 88/tcp open kerberos-sec Microsoft Windows Kerberos (server time: 2024-05-30 12:57:48Z) 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: active.htb, 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: active.htb, Site: Default-First-Site-Name) 3269/tcp open tcpwrapped 49152/tcp open msrpc Microsoft Windows RPC 49153/tcp open msrpc Microsoft Windows RPC 49154/tcp open msrpc Microsoft Windows RPC 49155/tcp open msrpc Microsoft Windows RPC 49157/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0 49158/tcp open msrpc Microsoft Windows RPC 49165/tcp open msrpc Microsoft Windows RPC Service Info: Host: DC; OS: Windows; CPE: cpe:/o:microsoft:windows_server_2008:r2:sp1, cpe:/o:microsoft:windows
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 71.01 seconds
SMB
I was able to anonymously list SMB shares on the host, and found a couple notable ones:
Initially we only have the ability to read the Replication share, which contained some group policy backups. Notably thereβs a Groups.xml file. This file comes from Group Policy Preferences, a configuration which allows domain joined machines to be managed through group policy.
GPP
In older implementations of this the Groups.xml files stored on Domain Controllers contain encrypted credentials, called a cPassword. These cPasswords are encrypted with AES, but the key is published by Microsoft.