For the complete documentation index, see llms.txt. This page is also available as Markdown.

DC EXT

DarkHaven Technologies - Range (Medium) - by Ryan Yager

The following post by 0xb0b is licensed under CC BY 4.0


Entry Point

Reference:

Recon

We use rustscan -b 500 -a dc.ext.darkhaven.local --top -- -sC -sV -Pn to enumerate all TCP ports on the target machine, piping the discovered results into Nmap which runs default NSE scripts -sC, service and version detection -sV, and treats the host as online without ICMP echo -Pn.

A batch size of 500 trades speed for stability, the default 1500 balances both, while much larger sizes increase throughput but risk missed responses and instability.

The target machine is the domain controller of the ext.darkhaven.local domain with exposed services including DNS 53, Kerberos 88/464, an IIS /10.0 web server on port 80, multiple MSRPC endpoints 135, 593, 49664+, SMB 139/445, LDAP and LDAPS 389/636/3268/3269 tied to Active Directory, RDP 3389, WinRM on 5985, and .NET Remoting 9389.

Access as ldap_svc

From compromising the CA host we were able to retrieve the credentials of ldap_svc. But we were not able to successfully authenticate with that since the account is restricted using a password.

To work around this, Kerberos authentication can be used instead. By requesting a Ticket Granting Ticket (TGT), we authenticate via Kerberos, which does not enforce the same logon restrictions.

Request a Kerberos TGT for the ldap_svc account:

Set the Kerberos ticket cache environment variable

Authenticate to SMB using Kerberos and we succesfully logged in. We see we are an administrator.

Access as administrator

Since we are an administrator we try to dump all secrets using secretsdump.py.

We retrieve the local administrator hash and connect to the external DC via evil-winrm.

We find the flag at C:\Users\Administrator\Desktop\root.txt.

Post Compromise

Access as ldap_svc on DC02

Besides the flag we find binary on the Desktop of the administrator.

We download it to oour machine...

And inspect it via strings.

Inside that binary we find hardcoded credentials of ldap_svc. But the password is a different one. It seems to perform an ldap sync between the DCs by reading the comments.

We try to authenticate to the other DCs and are successful with DC02.DARKHAVEN.TECH.

Last updated