<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sherwin Laconsay on Medium]]></title>
        <description><![CDATA[Stories by Sherwin Laconsay on Medium]]></description>
        <link>https://medium.com/@sherwinlaconsay?source=rss-b5dcb51de0a4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*WN0fHhChWGdacLly</url>
            <title>Stories by Sherwin Laconsay on Medium</title>
            <link>https://medium.com/@sherwinlaconsay?source=rss-b5dcb51de0a4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 25 Nov 2026 01:13:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sherwinlaconsay/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[My Active Directory Penetration Testing Journey: From Recon to Root]]></title>
            <link>https://medium.com/@sherwinlaconsay/my-active-directory-penetration-testing-journey-from-recon-to-root-7e98ccdc499d?source=rss-b5dcb51de0a4------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e98ccdc499d</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[white-hat-hacker]]></category>
            <category><![CDATA[windows-server-2022]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Sherwin Laconsay]]></dc:creator>
            <pubDate>Sat, 19 Apr 2025 14:24:27 GMT</pubDate>
            <atom:updated>2025-09-04T13:35:06.117Z</atom:updated>
            <content:encoded><![CDATA[<h3>👋 Introduction</h3><p>As part of my cybersecurity learning, I built a fully simulated internal Active Directory (AD) environment designed to mimic real-world enterprise networks. My goal was simple: understand how attackers gain a foothold, move laterally, escalate privileges, and ultimately compromise an entire Windows domain.</p><p>This post walks you through the full process — reconnaissance, exploitation, privilege escalation, and mitigation — all through practical, hands-on examples. If you’re preparing for red teaming, OSCP, CRTP, or just hungry to learn, this breakdown is for you.</p><h3>🧱 The Lab Setup</h3><p>The environment included:</p><ul><li>A Windows Server running as the Domain Controller for FAMILYGUY.local.</li><li>Two Windows 10 client machines joined to the domain.</li><li>An attacker machine running Parrot OS (you can also use Kali).</li><li>A Hack The Box (HTB) AD VM to simulate a closed-box, real-world. scenario.</li></ul><h3><strong>🔍 Phase 1: Reconnaissance &amp; Enumeration</strong></h3><p>The first step was identifying what systems were online, what ports were exposed, and what AD-related services I could see from an internal perspective.</p><h4>NMAP Scan</h4><p>I started with a simple ping sweep using Nmap:</p><pre>nmap -sn 10.10.3.0/24</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*VvoZPOEVsWm3jqYzfGCrhg.png" /></figure><p>After discovering active hosts, I ran a comprehensive port and version scan:</p><pre>nmap -sC -sV -Pn -p- 10.10.3.1–10</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*soH6zdmBYKPhsxjVTJEbJQ.png" /><figcaption>Port scan on 10.10.3.1 — I assume this is the default gateway, which is out of our scope.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*3_doLTPI1G5xQPMfrcwXdg.png" /><figcaption>Port scan on 10.10.3.2</figcaption></figure><p>This revealed a domain controller with services like LDAP (389), Kerberos (88), SMB (445), and DNS (53). From here, I confirmed that 10.10.3.2 was the DC.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*n20N2ERiiR1tFgZQ1mEmaA.png" /><figcaption>Port scan on 10.10.3.3</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*cXcmMG-1Y7DUyl-lse1ZDA.png" /><figcaption>Port scan on 10.10.3.5</figcaption></figure><h4>Kerbrute</h4><p>To enumerate valid usernames, I used kerbrute with a custom wordlist:</p><pre>kerbrute userenum - dc 10.10.3. 2-d FAMILYGUY.local {your_username_list.txt}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*R9ALOveIrnFHVMlSwO66yA.png" /><figcaption>These are the only valid users that returned to us. We can use these usernames to execute a password spray attack using a password wordlist.</figcaption></figure><h4>NetExec</h4><p>Using netexec (a fork of CrackMapExec), I scanned for misconfigurations:</p><pre>netexec smb 10.10.3.3 - shares -u administrator -p rockyou.txt - ignore-pw-decoding</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*C1qhuMDpXyKUXTC2ljTNRQ.png" /></figure><h4>passive_discovery6</h4><p>Lastly, I used passive_discovery6 to check for IPv6 traffic. Several hosts were IPv6-enabled, which meant attacks like MITM6 were now on the table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P698DtrfA8yy3y9o1Z-kbw.png" /><figcaption>Summary of the port scan</figcaption></figure><h3>💥 Phase 2: Exploitation</h3><p>With solid recon data in hand, I moved on to exploiting vulnerabilities within the AD environment.</p><h4><strong>LLMNR Poisoning and NTLMv2 Hash Capture</strong></h4><p>Active Directory (AD) is essential for managing organizational networks, but its default settings, including protocols like LLMNR, can introduce security risks. LLMNR allows local name resolution without a DNS server, but it lacks authentication, making it vulnerable to exploitation. Attackers can intercept LLMNR queries and respond with malicious IP addresses, potentially gaining unauthorized access to Active Directory. This technique, known as LLMNR poisoning, can lead to credential theft and relay attacks.</p><p>I launched responder to spoof LLMNR requests:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*rsDi7krZFoftU3p0FnR8tQ.png" /></figure><p>I then triggered the LLMNR poisoning by navigating to the IP address of my attacker’s machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*3G3bF7ZdZu_Qj1uLx1XFVg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*8nrDkjMQkFuAsrVOmh55YA.png" /></figure><p>Returning to Responder, I successfully obtained the user’s NTLMv2 hash. I then cracked this using my host machine’s GPU and Hashcat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*MP_ClQ7yPkh75m1BIq-ycg.png" /></figure><p>To my surprise, the user was using the default password <strong>“P@ssw0rd.”</strong></p><h4><strong>SMB Relay Attack</strong></h4><p>An <strong>SMB relay attack</strong> exploits authentication requests between a client and a server. The attacker uses techniques like <strong>LLMNR poisoning</strong> to trick a victim into connecting to a rogue SMB server. When the victim attempts to authenticate, the attacker relays the credentials to the legitimate server, impersonating the victim and dumping <strong>SAM hashes</strong>. This attack is particularly effective when <strong>SMB signing</strong> is disabled or when NTLM authentication lacks additional security measures.</p><p>Since <strong>SMB signing</strong> is disabled by default, as observed during our enumeration phase, there is a high chance this attack will succeed.</p><p>I set up ntlmrelayx.py from the Impacket suite to relay captured credentials <em>(I saved all the targets’ IP addresses to a file I named targets)</em>. Next, I turned on responder to spoofed a service, causing the victim to authenticate and send their NTLM hash.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*qGT0ZYj3jIfmiOVKepZWiw.png" /></figure><p>With Responder capturing the hash, ntlmrelayx relayed it to the clients machine and successfully dumped local user SAM hashes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*IRjIvjsr9u3-vOWZWlz34A.png" /></figure><p>Using the interactive shell option, I gained command-line access to the target.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*ary0PUaX0I3Iz9gincyrKw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*cemE3kTrOXo5UJ85lPp-CQ.png" /></figure><p>I then accessed the SMB shell connected to my attacker’s port 11001 using <strong>netcat.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*808gvgeOadGx3-z8FVhU6g.png" /></figure><h4><strong>IPv6 Attack with MITM6 + NTLMRelay</strong></h4><p>MITM6 is a man-in-the-middle attack that exploits Windows’ preference for IPv6 by setting up a rogue IPv6 DHCP server. This tricks devices into using a fake domain controller controlled by the attacker. The attacker can then redirect authentication traffic (e.g., LDAPS, SMB) to steal credentials and perform NTLM relay attacks. It’s dangerous because it intercepts sensitive data and abuses weak certificate validation to impersonate trusted services.</p><p>I launched MITM6:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*1Oj6BwQS3m-qRaKHNhN7ng.png" /></figure><p>Then configured ntlmrelayx to perform LDAPS relaying with WPAD hijacking:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*H1ZZjFsektyN0TldGuWneQ.png" /></figure><p>In my experience, this didn’t work on Windows Server 2022 right away due to certificate requirements. I manually bound a certificate to LDAPS using PowerShell:</p><pre>netsh http add sslcert ipport=0.0.0.0:636 certhash=&lt;Thumbprint&gt; appid={GUID}</pre><p>After binding, the relay succeeded, and I was able to create a new domain user with delegated privileges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*8iBUnWTDXPHbwE3nF9tgag.png" /></figure><h3>🔼 Phase 3: Privilege Escalation</h3><p>After gaining user-level access, the goal shifted to domain domination.</p><h4>PowerView Enumeration</h4><p><a href="https://github.com/PowerShellMafia/PowerSploit/blob/master/Recon/PowerView.ps1">PowerView</a> is a PowerShell script used in penetration testing to gather situational awareness within a Windows domain network. Developed by Will Schroeder and part of the PowerSploit framework and Empire, it allows red team members to enumerate domain information stealthily using PowerShell and WMI queries, avoiding detection by traditional monitoring tools.</p><p>Using evil-winrm, I logged into the domain controller and ran PowerView:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*qUbtur8mT_vCFla99gq-Qg.png" /></figure><pre>. .\PowerView.ps1<br>Get-NetUser | Where-Object { $_.memberof -like &quot;*Admins*&quot; } | Select-Object samaccountname,memberof</pre><p>I identified admin-level users and the machines they accessed using PowerView. There are numerous commands available with PowerView; for a comprehensive list and usage details, please refer to its <a href="https://github.com/PowerShellMafia/PowerSploit/tree/master/Recon">GitHub repository</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*HRcXnX9X-574kqfqngKBvQ.png" /></figure><h4>BloodHound</h4><p><a href="https://github.com/SpecterOps/BloodHound"><strong>BloodHound</strong></a><strong> </strong>is a tool designed to help organizations understand how people, computers, and permissions are connected within their networks, particularly in <strong>Active Directory</strong> and <strong>Azure</strong> environments.</p><p>I uploaded and executed SharpHound to gather AD data on the target machine:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*LPs9xqccdATLcmRLZaHJzA.png" /></figure><p>I imported the data into BloodHound and found a clear attack path from p.griffin to Domain Admin due to excessive group membership.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*t8D_HaTHTYHv9GdHFv40rA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*xVPbkXT40ojU6jIbSiBx3Q.png" /><figcaption>Using the pre-loaded queries to detect shortest path to Domain Admins</figcaption></figure><h4>Mimikatz</h4><p><a href="https://github.com/ParrotSec/mimikatz">Mimikatz</a> is a tool developed by Benjamin Delpy to learn C and experiment with Windows security. It is now widely recognized for its ability to extract plaintext passwords, hashes, PIN codes, and Kerberos tickets from memory. Additionally, Mimikatz can execute pass-the-hash and pass-the-ticket attacks or generate Golden Tickets.</p><p>On a compromised endpoint, I used Mimikatz to dump credentials and Kerberos hashes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*v9B0Ni5dH2kX1q2fd4b2RA.png" /><figcaption>Running mimikatz on a compromised machine.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*eA8qVS6F61dgP0n1WeNgoA.png" /><figcaption>Acquired Krbtgt hashes that can be use for Golden Ticket Attack.</figcaption></figure><h4>Token Impersonation</h4><p>A <strong>token</strong> is a digital pass that allows users to access a system without repeatedly entering their password. It’s like a special cookie that proves your identity after you log in once, giving you seamless access to different parts of the system.</p><p>I used Incognito and <a href="https://www.metasploit.com/">Metasploit</a> to dump credentials and steal an active user token:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*NQb_cea4Ab_nDHCyiKIkjA.png" /><figcaption>Running Metasploit to access the target machine.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*ODuJJUGmfGE9ZTI5lWoA1g.png" /><figcaption>Impersonating available tokens</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*_nUdS79CTKtAufjKtSpETQ.png" /><figcaption>Successful token impersonation and owning Domain Admin’s account.</figcaption></figure><h4>Kerberoasting</h4><p>In the digital world, Kerberoasting works when an attackers request special “tickets” from the network’s authentication system (called Kerberos) that allow users to access certain services. These tickets are protected by passwords, but if the password isn’t strong enough, attackers can crack it and gain access.</p><p>Kerberoasting using <a href="https://github.com/fortra/impacket">Impacket’s</a> GetUserSPNs.py:</p><p>GetUserSPNs.py FAMILYGUY.local/p.griffin:P@ssw0rd -dc-ip 10.10.3.2 -request</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*B2ogUzgjFXMnydjiQKDX4g.png" /></figure><p>Once I got the Kerberos Ticket Granting Service hash of SQLService, I cracked it in my host machine using hashcat and rockyou.txt wordlist.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*KVig6mG6KKweA5Te0N13Kg.png" /></figure><h4>Pass-the-Hash</h4><p>A technique used in cybersecurity attacks where an attacker bypasses password authentication by using the <strong>NTLM hash</strong> of a user’s password instead of the plaintext password itself. This is a very effective attack especially when the password hash is hard to crack. If the organization is reusing passwords to setup their machines, there’s a high chance that this attack will succeed since the same password will produce the same ntlm hash.</p><p>Since we obtained this list of hashes from our SMB relay attack, let’s try using one of the user’s NT hashes (BrianGriffin) to see if it grants access to other machines. <strong>Note: Only NTLMv1 hashes are usable in Pass-the-Hash attacks.</strong></p><pre>psexec.py FAMILYGUY.local/BrianGriffin@10.10.3.5 -hashes e19ccf75ee54e06b06a5907af13cef42:e19ccf75ee54e06b06a5907af13cef42</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*pOAbYdOngAaTppcw8atDuA.png" /></figure><p><strong>secretsdump (DCSync attack)</strong></p><p>In case you were unable to obtain the hashes during the SMB relay attack, you can use a tool called secretsdump, which is part of the Impacket toolkit, to dump the hashes — provided you already have a compromised account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*m2yfQE4uvPoEmKUsCWDDgw.png" /><figcaption>Acquiring NTLMv1 hashes using Impacket-secretsdump</figcaption></figure><p>I was able to gain a shell on <strong>PC2</strong> using <strong>psexec</strong> and the stolen NT hash. Although <strong>psexec</strong> requires the <strong>LMHash</strong> (even though Windows 10 no longer uses it), I used the <strong>NTLM hash</strong> as a substitute placeholder in this case.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*Pr-pcTvUNzBxIjptV6dX_Q.png" /></figure><h4>Golden Ticket Attack</h4><p>A <strong>Golden Ticket Attack</strong> is a powerful Kerberos-based attack that allows an attacker to create forged authentication tickets (TGTs) for any user in the domain, effectively granting <strong>unrestricted access</strong> to domain resources.</p><p>With the krbtgt hash obtained earlier, I forged a Kerberos TGT. <strong>Note: In my experience, only the AES key works for forging tickets on Windows Server 2022. You must also use an existing user account.</strong></p><pre>ticketer.py -aesKey &lt;krbtgt_hash_aeskey&gt; -domain-sid &lt;domain_sid&gt; -domain familyguy.local administrator</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*mQSqZtSxYJiSkupeu8wYHg.png" /><figcaption>Forging the golden ticket</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*fQKDxmRPFNyfnyuPEVgUOA.png" /><figcaption>Exporting the forged ticket</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*j6c-AA4cU9Wmc8W8lxlysA.png" /><figcaption>Using the golden ticket to gain shell</figcaption></figure><h4>Zero Day Exploit — <strong>LDAPNightmare (CVE-2024–49113) December 2024</strong></h4><p>LDAP Nightmare is a security flaw in Microsoft’s Lightweight Directory Access Protocol.It allows attackers to crash unpatched Windows servers or even gain remote control of them. The vulnerability affects all unpatched Windows Server versions (2019–2022) and requires no special access, only the ability to connect over the internet.</p><p>Here’s an explanation of how the <strong>LDAP Nightmare</strong> attack works step by step:</p><p><strong>Step 1: DCE/RPC Request</strong>: The attacker sends a special type of request (called a DCE/RPC request) to the target server (the victim).</p><p><strong>Step 2: DNS SRV Query</strong>: The victim server, in response, is triggered to make a DNS query to resolve the domain <strong>SafeBreachLabs.pro</strong>.</p><p><strong>Step 3: Attacker’s DNS Response</strong>: The attacker controls a malicious DNS server that responds to the victim’s query. The attacker’s server provides the victim with its own hostname and the port for the LDAP service.</p><p><strong>Step 4: NBNS Broadcast</strong>: The victim server then tries to find the IP address of the attacker’s hostname by sending a broadcast network request (NBNS request).</p><p><strong>Step 5: Attacker’s NBNS Response</strong>: The attacker sends back a response to the victim with the IP address of the attacker’s machine.</p><p><strong>Step 6: LDAP Client Activation</strong>: At this point, the victim server starts acting like an LDAP client and sends an LDAP-like request (called a CLDAP request) to the attacker’s machine.</p><p><strong>Step 7: Malicious CLDAP Response</strong>: The attacker responds with a specially crafted CLDAP packet that contains a value designed to cause the victim’s <strong>LSASS (Local Security Authority Subsystem Service)</strong> process to crash.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*jRJcDrIi7UwiMZS_heJNCQ.png" /><figcaption><a href="https://www.safebreach.com/blog/ldapnightmare-safebreach-labs-publishes-first-proof-of-concept-exploit-for-cve-2024-49113/">https://www.safebreach.com/blog/ldapnightmare-safebreach-labs-publishes-first-proof-of-concept-exploit-for-cve-2024-49113/</a></figcaption></figure><p>This is the latest Zero Day Exploit that against AD that I can find. This was already patched asap so it’s not working anymore.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*m_GCnBlheaBDT6VBc-4mzw.png" /><figcaption>PoC: <a href="https://github.com/SafeBreach-Labs/CVE-2024-49113">https://github.com/SafeBreach-Labs/CVE-2024-49113</a></figcaption></figure><h3>🛡️ Defending Against These Attacks</h3><p>The following lessons and defenses emerged from this experience:</p><h4>Disable LLMNR and NetBIOS to prevent poisoning attacks</h4><p><strong>LLMNR</strong>: Disable through <strong>Group Policy</strong> to prevent name resolution spoofing.</p><ul><li>Open Group Policy Editor</li><li>Go to <strong>Local Computer Policy &gt; Computer Configuration &gt; Administrative Templates &gt; Network &gt; DNS Client</strong></li><li>Set <strong>“Turn OFF Multicast Name Resolution”</strong> to Enabled</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*laiOGmofygvNYnJ-KfAM-A.png" /><figcaption>Disabling LLMNR via GPO</figcaption></figure><p><strong>NBT-NS</strong>: Disable via <strong>network adapter settings</strong> to mitigate downgrade and spoofing attacks.</p><ul><li>Go to Network Connections</li><li>Open Network Adapter Properties</li><li>Select <strong>TCP/IPv4 Properties &gt; Advanced tab &gt; WINS tab</strong></li><li>Choose <strong>“Disable NetBIOS over TCP/IP”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*PPyXdpM1_37LU-D7R0aE6A.png" /><figcaption>Disabling NetBIOS over TCP/IP in your network adapters</figcaption></figure><h4>Enforce SMB signing across all machines</h4><p>Enabling <strong>SMB signing</strong> helps prevent man-in-the-middle attacks by ensuring message integrity.</p><ul><li>Open <strong>Group Policy Management Editor (gpedit.msc).</strong></li><li>Navigate to <strong>Computer Configuration &gt; Windows Settings &gt; Security Settings &gt; Local Policies &gt; Security Options</strong>.</li><li>Locate <strong>Microsoft network client: Digitally sign communications (always), </strong>set it to <strong>Enabled</strong>, and <strong>Apply.</strong></li><li>Locate <strong>Microsoft network server: Digitally sign communications (always)</strong> and set it to <strong>Enabled</strong>, and <strong>Apply.</strong></li></ul><p><strong>Pros &amp; Cons:</strong></p><ul><li><strong>Pro:</strong> Completely stops SMB relay attacks.</li><li><strong>Con:</strong> May cause performance degradation in file transfers.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*o7yUED7nn3hiRaraIR9n2Q.png" /><figcaption>Enable SMB Signing via GPO</figcaption></figure><h4><strong>Disable NTLM Authentication</strong></h4><ol><li>Open <strong>Group Policy Management Editor (gpedit.msc)</strong>.</li><li>Navigate to <strong>Computer Configuration &gt; Windows Settings &gt; Security Settings &gt; Local Policies &gt; Security Options</strong>.</li><li>Find <strong>Network Security: Restrict NTLM: NTLM authentication in this domain</strong> and set it to <strong>Deny all</strong>.</li><li>Apply and restart for changes to take effect.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Dfrph3IVqHoB6KxtXRYIXQ.png" /><figcaption>Disable NTLM Authentication via GPO</figcaption></figure><h4><strong>Implement Account Tiering</strong></h4><p>Restrict <strong>domain admin</strong> accounts to only perform administrative tasks on designated <strong>high-privilege systems</strong> (e.g., domain controllers). This reduces the risk of credential theft and <strong>limits the impact of compromised admin accounts</strong>.</p><ul><li><strong>Pro:</strong> Prevents attackers from easily escalating privileges.</li><li><strong>Con:</strong> Enforcing the policy can be challenging.</li></ul><h4><strong>Restrict Local Administrator Access</strong></h4><p>Limit <strong>local admin rights</strong> to prevent unauthorized lateral movement within the network. Attackers often exploit local admin accounts to pivot across systems, making this an essential security measure.</p><ul><li><strong>Pro:</strong> Reduces the attack surface and mitigates lateral movement.</li><li><strong>Con:</strong> May lead to increased <strong>help desk tickets</strong> for privileged access requests.</li></ul><h4><strong>Prevent IPv6 Poisoning (mitm6 Attack)</strong></h4><p>Instead of disabling IPv6 entirely, block DHCPv6 traffic and router advertisements using Windows Firewall via Group Policy.</p><ol><li><strong>Open Group Policy Management Editor (gpedit.msc).</strong></li><li>Navigate to<strong> Computer Configuration &gt; Windows Settings &gt; Security Settings &gt; Windows Defender Firewall with Advanced Security &gt; Inbound Rules &gt; New Rule &gt; Predefined &gt; Core Networking</strong></li><li>Find and set the following rules to <strong>“Block”</strong> instead of “Allow”:</li></ol><ul><li>Core Networking — Dynamic Host Configuration Protocol for IPv6 (DHCPV6-In)</li><li>Core Networking — Router Advertisement (ICMPv6-In)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*UYJNtcFXqBezqMuFYOymkA.png" /></figure><ol><li>Navigate to <strong>Computer Configuration &gt; Windows Settings &gt; Security Settings &gt; Windows Defender Firewall with Advanced Security &gt; Outbound Rules &gt; New Rule &gt; Predefined &gt; Core Networking</strong></li><li>Find and set the following rule to <strong>“Block”:</strong></li></ol><ul><li>Core Networking — Dynamic Host Configuration Protocol for IPv6 (DHCPV6-Out)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*rD5TYvViotb7qAsI8zOrEA.png" /></figure><h4><strong>Disable WPAD (Web Proxy Auto-Discovery Protocol)</strong></h4><p>Disabling WPAD prevents attacks using rogue proxy configurations to intercept network traffic.</p><ol><li>Open Group Policy Management Editor (gpedit.msc).</li><li>Navigate to <strong>Computer Configuration &gt; Policies &gt; Administrative Templates &gt; Windows Components &gt; Internet Explorer</strong></li><li>Locate <strong>“Disable changing Automatic Configuration settings”</strong> and set it to “Enabled”.</li><li>Apply changes and close the editor.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*ufr0vEOXd2Mud-s_dF9amw.png" /></figure><h4><strong>Secure LDAP Authentication (Mitigate LDAP &amp; LDAPS Relaying Attacks)</strong></h4><p>Enabling LDAP signing and LDAP channel binding ensures encrypted and authenticated LDAP communications, preventing credential relay attacks.</p><ol><li>Open Group Policy Management Editor (gpedit.msc).</li><li>Navigate to <strong>Computer Configuration &gt; Windows Settings &gt; Security Settings &gt; Local Policies &gt; Security Options</strong></li><li>Locate<strong> “Network security: LDAP client signing requirements”</strong> and set it to <strong>“Require Signing”.</strong></li><li>Apply the policy.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Qw1YkjNS5ZRVylS_6xxq-Q.png" /></figure><p><strong>How to Enable LDAP Channel Binding via Registry Editor</strong></p><ol><li>Open Registry Editor (regedit.exe) as Administrator.</li><li>Navigate to <strong>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Parameters</strong></li><li>Create or modify the DWORD value <strong>“LdapEnforceChannelBinding” </strong>and set it to:</li></ol><ul><li>→Enabled (but not enforced)</li><li>→ Strict enforcement (Recommended)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*CO97zFMPy708tKlNbUAJMQ.png" /></figure><h4><strong>Protect Administrative Accounts from Delegation Attacks</strong></h4><p>To prevent attackers from impersonating privileged accounts:</p><ul><li>Add administrative users to the <strong>Protected Users group</strong>.</li><li>Enable <strong>Account is sensitive and cannot be delegated</strong> for critical accounts.</li></ul><h4>Kerberoasting Defenses</h4><p>Kerberos is a feature in Windows, not a vulnerability or misconfiguration. However, attackers can abuse it by extracting service account credentials. To reduce risk, implement the following:</p><p><strong>Strong Passwords</strong></p><ul><li>Use <strong>long, complex passwords</strong> (≥25 characters) for service accounts to make brute-force attacks impractical.</li><li>Consider <strong>Managed Service Accounts (MSA) or Group Managed Service Accounts (gMSA)</strong> to automatically rotate service account passwords.</li></ul><p><strong>Least Privilege</strong></p><ul><li>Avoid using <strong>high-privilege accounts (e.g., Domain Admins)</strong> as service accounts.</li><li>Assign only the <strong>minimum necessary permissions</strong> to service accounts.</li></ul><h4><strong>Detecting Kerberoasting Attacks</strong></h4><p>Kerberoasting is challenging to detect because it leverages <strong>normal Kerberos operations</strong> in Active Directory, making it blend in with regular network activity. However, by analyzing <strong>domain controller logs</strong>, security teams can identify suspicious behavior.</p><p><strong>Key Detection Method: Monitoring Event ID 4769</strong></p><p>When a Kerberos service ticket is requested, <strong>Event ID 4769</strong> is recorded in the <strong>Security Logs</strong> of the domain controller.</p><p>Due to the high volume of Kerberos events, filtering for <strong>service ticket requests (TGS-REQ)</strong> is crucial.</p><p><strong>Suspicious Indicator:</strong></p><ul><li>A <strong>Ticket Encryption Type of 0x17 (RC4 encryption)</strong> instead of <strong>0x12 (AES256) or 0x11 (AES128)</strong> may indicate an attacker requesting a ticket that is easier to brute-force.</li><li>An account name that does <strong>not</strong> belong to a service or machine account (i.e., does not end with “$”), indicating a regular domain user account.</li><li>Service names that do <strong>not</strong> end with “$,” indicating they are not machine or service accounts.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*_qecZu9K0O5uGt1iOWjiKQ.png" /></figure><h4>Pass the Hash Attack Defenses</h4><p>While <strong>Pass-the-Hash (PtH) attacks</strong> are difficult to completely prevent, these measures can make them significantly harder for attackers to exploit:</p><p><strong>1. Limit Account Reuse</strong></p><ul><li>Avoid <strong>re-using local admin passwords</strong> across multiple systems.</li><li><strong>Disable Guest and built-in Administrator accounts</strong> to reduce attack surface.</li><li>Apply <strong>least privilege principles</strong>, limiting who has <strong>local administrator</strong> rights.</li></ul><p><strong>2. Utilize Strong Passwords</strong></p><ul><li>Use passwords <strong>longer than 14 characters</strong> to make cracking more difficult.</li><li>Avoid <strong>common words</strong> or predictable patterns.</li><li><strong>Passphrases (long sentences)</strong> provide both security and memorability.</li></ul><p><strong>3. Implement Privileged Access Management (PAM)</strong></p><ul><li>Require <strong>check-out/check-in</strong> processes for <strong>sensitive accounts</strong> (e.g., domain admins).</li><li><strong>Automatically rotate passwords</strong> upon check-out/check-in to prevent reuse.</li><li>Limits <strong>pass-the-hash attacks</strong> by ensuring hashes are <strong>constantly rotated</strong> and difficult to exploit.</li></ul><p>Examples: Microsoft LAPS, Microsoft Entra PIM, CyberArk PAM, BeyondTrust Privileged Remote Access</p><h4>Token Impersonation Defenses</h4><ol><li><strong>Limit User/Group Token Creation Permissions</strong> — Restrict which users and groups can create or manipulate security tokens to reduce the risk of abuse.</li><li><strong>Account Tiering</strong> — Separate user accounts based on privilege levels to <strong>minimize exposure</strong> of high-privilege credentials.</li><li><strong>Local Admin Restriction</strong> — Limit local administrator privileges to <strong>essential users only</strong> to prevent attackers from escalating privileges using token impersonation.</li></ol><p>I’ve shared the full learning journal and report template on GitHub for anyone interested in replicating this or using it as a learning resource:</p><p>👉 <a href="https://github.com/solaconsay/Active-Directory-Penetration-Testing">GitHub: Active Directory Penetration Testing</a></p><h3>🙌 Final Thoughts</h3><p>This was one of the most valuable hands-on exercises I’ve done. It helped me fully grasp the inner workings of Active Directory, from both offensive and defensive perspectives.</p><p>What starts as one weak password or an unpatched config can quickly spiral into complete domain compromise. Understanding that attack chain — and how to break it — is vital in today’s threat landscape.</p><p>If you’re learning AD security or prepping for a cert, build a lab. Get your hands dirty. Simulate the attacks. Then secure them.</p><p>Thanks for reading!</p><h3>💬 Let’s Connect</h3><ul><li>GitHub: <a href="https://github.com/solaconsay">@solaconsay</a></li><li>LinkedIn: <a href="https://www.linkedin.com/in/s-laconsay/">Sherwin Laconsay</a></li><li>More of my work in my <a href="https://laconsaylab.com/">website!</a></li><li>Medium: More posts coming soon!</li></ul><h3>📚 References</h3><ul><li><a href="https://academy.tcm-sec.com/">TCM Security Academy</a> — Practical, hands-on cybersecurity training for pentesters and defenders</li><li><a href="https://www.youtube.com/channel/UCa6eh7gCkpPo5XXUDfygQQA">Ippsec</a> — Great channel for red teaming, CTFs, and exploit tutorials</li><li><a href="https://academy.hackthebox.com/course/preview/introduction-to-active-directory">Hack The Box Academy — Introduction to Active Directory</a> — Foundational course on AD concepts and attacks in lab environments</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e98ccdc499d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>