Retro2 is a Easy Windows machine, that starts off with Guest auth enabled to look at shares finding a Microsoft Access Database file. After finding the user and password we are able to obtain a bloodhound dump. This shows a relatively simple path with some twists, we are able to find a couple of Pre-Windows machine and change the password for one. Allowing us to change/reset the password for the computer ADMWS01$ which has a particular attribute that allows the reset of the password. Once we’ve done this we are able to add our user to the Services group allowing for RDP access. Upon getting a session we find that with the version of Windows Server 2008 we are able to control the full path to a windows registry value that allows us to escalate to NT AUTHORITY\SYSTEM.
PORT STATE SERVICE VERSION 53/tcp open domain Microsoft DNS 6.1.7601 (1DB15F75) (Windows Server 2008 R2 SP1) | dns-nsid: |_ bind.version: Microsoft DNS 6.1.7601 (1DB15F75) 88/tcp open kerberos-sec Microsoft Windows Kerberos (server time: 2024-11-08 15:45:22Z) 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: retro2.vl, Site: Default-First-Site-Name) 445/tcp open microsoft-ds Windows Server 2008 R2 Datacenter 7601 Service Pack 1 microsoft-ds (workgroup: RETRO2) 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: retro2.vl, Site: Default-First-Site-Name) 3269/tcp open tcpwrapped 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 Service Info: Host: BLN01; OS: Windows; CPE: cpe:/o:microsoft:windows_server_2008:r2:sp1, cpe:/o:microsoft:windows
Now we can get a bloodhound dump and look at our attack path. From there the path is relatively simple. We can use FS01$ or FS02$. I’m using FS01$.
Seeing as Pre-Windows machines use the same password as their hostname, we can check to see if we have an error that indicates a password change is needed.
There are 3 ways to abuse the GenericWrite permission:
Shadow Credentials (applicable with Windows Server 2016 and later)
Targeted Kerberoasting(affective if your targets password is weak and crackable)
Resource-Based Constrained Delegation
None of which will work on this 2008 machine. 😒
Yet the Windows Server 2008 has an attribute, which if writable we can perform a password reset of ADMWS01$ Computer. This article explains some context.
With the attribute writable, we can change/reset the password for ADMWS01$. I found it difficult to do with bloodyAD but I used changepassword.py from Impacket that got the job done.
[*] Setting the password of retro2.vl\ADMWS01$ as retro2.vl\FS01$ [*] Connecting to DCE/RPC as retro2.vl\FS01$ [*] Password was changed successfully. [!] User no longer has valid AES keys for Kerberos, until they change their password again.
Once we’ve done this, we can add ldapreader to the Services group which will allow him to RDP to the machine.
I looked around and did some research about Windows Server 2008 R2, finding some articles but I came across something of a no fix by itm4n. Explaining that using Get-WmiObject Win32_Perf can query the Performance counters of the machine and when doing so the WMI service should load a specified DLL that gets us NT AUTHORITY\SYSTEM.
PrivEsc
Once downloading the repo, and compiling, we can transfer it over to the machine and execute it.