<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Master in Progress IT blog</title>
	<atom:link href="https://masterinprogress.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://masterinprogress.com</link>
	<description>Forever learning, turning real-world problems into real IT solutions.</description>
	<lastBuildDate>Thu, 26 Sep 2024 16:47:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>

<image>
	<url>/wp-content/uploads/2024/09/cropped-Untitled-design-e1726036468518-150x150.png</url>
	<title>Master in Progress IT blog</title>
	<link>https://masterinprogress.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Avoid Long Hours of Troubleshooting: Fixing NTLM Logon Failures (Error 0xC000006A)</title>
		<link>https://masterinprogress.com/troubleshooting-ntlm-version/</link>
					<comments>https://masterinprogress.com/troubleshooting-ntlm-version/#respond</comments>
		
		<dc:creator><![CDATA[Alexander Mora]]></dc:creator>
		<pubDate>Fri, 20 Sep 2024 05:37:44 +0000</pubDate>
				<category><![CDATA[Authentication]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[NTLM]]></category>
		<category><![CDATA[0xC000006A]]></category>
		<category><![CDATA[4625]]></category>
		<guid isPermaLink="false">https://masterinprogress.com/?p=255</guid>

					<description><![CDATA[In this post, we explore a real-world case of authentication failures that occurred after patching domain controllers. The issue, triggered by NTLM compatibility mismatches, caused a critical financial application to fail, impacting transaction processing. We delve into the root cause, which centered around error code 0xC000006A, and walk through the troubleshooting steps that led to a quick resolution. If you've experienced logon failures or are managing domain controllers, this guide will help you understand and resolve NTLM-related issues efficiently.]]></description>
										<content:encoded><![CDATA[
<p></p>



<div class="wp-block-rank-math-toc-block" id="rank-math-toc"><h2>Table of Contents</h2><nav><ul><li><a href="#introduction">Introduction</a></li><li><a href="#application-and-impact">Application and Impact</a></li><li><a href="#evidence-and-root-cause-analysis">Evidence and Root Cause Analysis</a></li><li><a href="#authentication-flow">Authentication Flow</a></li><li><a href="#action-plan">Action Plan</a></li><li><a href="#in-case-you-are-not-familiar-with-the-ntlm-protocol-and-its-versions">In case you are not familiar with the NTLM protocol and its versions</a><ul><li><a href="#lm-compatibility-level-and-ntlm-versions">LMCompatibilityLevel and NTLM Versions</a></li><li><a href="#configuring-ntlm-via-group-policy">Configuring NTLM via Group Policy</a></li><li><a href="#configuring-ntlm-via-registry">Configuring NTLM via Registry</a></li><li><a href="#ntlm-version-compatibility">NTLM version compatibility</a></li></ul></li><li><a href="#resolution">Resolution</a></li><li><a href="#lessons-learned-and-final-thoughts">Lessons Learned and Final Thoughts</a></li><li><a href="#conclusion">Conclusion</a></li><li><a href="#references">References</a></li></ul></nav></div>



<p></p>



<h3 class="wp-block-heading" id="introduction">Introduction</h3>



<p>In this blog post, I’ll walk you through an interesting case we encountered where a financial transaction processing application, Postilion, failed after the customer applied security patches to their domain controllers. The problem was critical, affecting their entire environment, and the resolution required a deep understanding of authentication protocols and timely action.</p>



<p></p>



<h3 class="wp-block-heading" id="application-and-impact">Application and Impact</h3>



<p>The customer reported that after patching their domain controllers, Postilion, a transactional processing software used by financial institutions, started failing. Postilion relies on Windows authentication to access its database, and the failures caused a major disruption in their environment.</p>



<p>The system administrators initially suspected authentication issues, and they had already spent significant time rolling back and reapplying patches to troubleshoot the issue. Compounding the problem was the fact that the domain controllers hadn’t been patched for several months, leaving the system vulnerable to security threats.</p>



<p></p>



<h3 class="wp-block-heading" id="evidence-and-root-cause-analysis">Evidence and Root Cause Analysis</h3>



<p>A root cause analysis revealed several key clues. The security event log showed multiple <strong>4625 events</strong>, which indicate failed logon attempts. These failures occurred when the system attempted to use the NTLM authentication protocol. The error pointed to a wrong password as the reason for the logon failure, which seemed unusual given that the password hadn’t been changed.</p>



<ul class="wp-block-list">
<li><strong>Event ID</strong>: 4625</li>



<li><strong>Failure Reason</strong>: Unknown username or bad password</li>



<li><strong>Status</strong>: 0xC00006D</li>



<li><strong>Sub Status</strong>: 0xC000006A</li>



<li><strong>Authentication Package</strong>: NTLM</li>
</ul>



<p>At the same time, the database logs showed a similar authentication error with <strong>event 17806</strong>, stating that the connection handshake failed due to an operating system error.</p>



<ul class="wp-block-list">
<li><strong>Database Event</strong>: 17806</li>



<li><strong>Error</strong>: 0x8009030c (SEC_E_LOGON_DENIED)</li>



<li><strong>Message</strong>: The logon attempt failed.</li>
</ul>



<p></p>



<h3 class="wp-block-heading" id="authentication-flow">Authentication Flow</h3>



<p>To better understand the problem, let’s look at the authentication flow in this setup.</p>



<ol class="wp-block-list">
<li>The <code>servicespostilion</code> service account runs on two application servers, which communicate with two dedicated SQL database servers.</li>



<li>The authentication method between Postilion and the database servers is Windows authentication using NTLM.</li>



<li>The service account sends jobs to the database server, which works smoothly until domain controllers are patched.</li>
</ol>



<p>The typical NTLM authentication flow is as follows:</p>



<ul class="wp-block-list">
<li><strong>Step A</strong>: The <code>servicespostilion</code> service sends the username to the database server.</li>



<li><strong>Step B</strong>: The database server sends back a challenge (nonce).</li>



<li><strong>Step C</strong>: The service responds with a challenge-response.</li>



<li><strong>Step D</strong>: The database server sends the username, challenge, and challenge-response to the domain controller for verification.</li>
</ul>



<p></p>



<h3 class="wp-block-heading" id="action-plan">Action Plan</h3>



<p>Given the impact on a production financial system, our priority was to resolve the issue without rolling back the patches and to address the security risks posed by unpatched domain controllers.</p>



<p>The customer scheduled their monthly maintenance window, and we prepared for a night of troubleshooting. I had a theory that the issue was related to <strong>NTLM compatibility level mismatches</strong> between the domain controllers and the application servers. If that was indeed the case, adjusting the settings should resolve the problem. </p>



<p>However, I also had a backup plan to switch to Kerberos if NTLM continued to fail.</p>



<p></p>



<h3 class="wp-block-heading" id="in-case-you-are-not-familiar-with-the-ntlm-protocol-and-its-versions">In case you are not familiar with the NTLM protocol and its versions</h3>



<p>NTLM (NT LAN Manager) is an authentication protocol used in Microsoft environments. While newer systems favor Kerberos, NTLM is still required in legacy scenarios. NTLM works via a challenge-response mechanism where a client sends a username, receives a challenge (nonce) from the server, and responds with a hashed password. The domain controller then verifies the response.</p>



<p></p>



<h4 class="wp-block-heading" id="lm-compatibility-level-and-ntlm-versions">LMCompatibilityLevel and NTLM Versions</h4>



<p>NTLM has two main versions: <strong>NTLMv1</strong> (less secure) and <strong>NTLMv2</strong> (more secure). The <strong>LMCompatibilityLevel</strong> setting determines which version is used. Higher values enforce stronger security. For example:</p>



<ul class="wp-block-list">
<li><strong>0</strong>: Accepts both LM and NTLM.</li>



<li><strong>3</strong>: Uses NTLMv2 for authentication.</li>



<li><strong>5</strong>: Uses only NTLMv2, rejecting older versions.</li>
</ul>



<p></p>



<h4 class="wp-block-heading" id="configuring-ntlm-via-group-policy">Configuring NTLM via Group Policy</h4>



<p>You can manage NTLM through <strong>Group Policy</strong>:</p>



<ol class="wp-block-list">
<li>Open <strong>Group Policy Management</strong>.</li>



<li>Go to <strong>Computer Configuration &gt; Windows Settings &gt; Security Settings &gt; Local Policies &gt; Security Options</strong>.</li>



<li>Set <strong>Network security: LAN Manager authentication level</strong> to <strong>5</strong> for NTLMv2.</li>
</ol>



<p></p>



<h4 class="wp-block-heading" id="configuring-ntlm-via-registry">Configuring NTLM via Registry</h4>



<p>For smaller setups, use the Registry:</p>



<ol class="wp-block-list">
<li>Open <strong>regedit</strong> and navigate to:</li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#39404f;color:#c8d0e0">Windows Registry</span><span role="button" tabindex="0" data-code="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9FF">HK</span><span style="color: #B48EAD">E</span><span style="color: #D8DEE9FF">Y_LO</span><span style="color: #B48EAD">CA</span><span style="color: #D8DEE9FF">L_M</span><span style="color: #B48EAD">AC</span><span style="color: #D8DEE9FF">HIN</span><span style="color: #B48EAD">E</span><span style="color: #81A1C1">\</span><span style="color: #D8DEE9FF">SYST</span><span style="color: #B48EAD">E</span><span style="color: #D8DEE9FF">M</span><span style="color: #81A1C1">\</span><span style="color: #B48EAD">C</span><span style="color: #D8DEE9FF">urr</span><span style="color: #B48EAD">e</span><span style="color: #D8DEE9FF">nt</span><span style="color: #B48EAD">C</span><span style="color: #D8DEE9FF">ontrolS</span><span style="color: #B48EAD">e</span><span style="color: #D8DEE9FF">t</span><span style="color: #81A1C1">\</span><span style="color: #B48EAD">C</span><span style="color: #D8DEE9FF">ontrol</span><span style="color: #81A1C1">\</span><span style="color: #D8DEE9FF">Ls</span><span style="color: #B48EAD">a</span></span></code></pre></div>



<ol start="2" class="wp-block-list">
<li>Modify <strong>LMCompatibilityLevel</strong> (DWORD) and set it to <strong>5</strong>.</li>
</ol>



<p></p>



<h4 class="wp-block-heading" id="ntlm-version-compatibility">NTLM version compatibility</h4>



<p>NTLM versions have varying degrees of compatibility, which can lead to authentication failures if misconfigured:</p>



<ul class="wp-block-list">
<li><strong>NTLMv1</strong>: This older version uses a less secure challenge-response mechanism. It is compatible with servers accepting NTLMv1 or LM responses (lower security).</li>



<li><strong>NTLMv2</strong>: A more secure version, required by higher security levels. It can authenticate with servers set to accept NTLMv2, but is <strong>incompatible</strong> with servers or clients set to use only NTLMv1 or LM.</li>



<li><strong>LM (LAN Manager)</strong>: This is the oldest and least secure method. Modern systems reject it if they are set to enforce NTLMv2 only.</li>
</ul>



<p>For example, if a domain controller is configured for <strong>NTLMv2 only</strong> (LMCompatibilityLevel 5) but a client is using <strong>NTLMv1</strong> (LMCompatibilityLevel 1 or 2), authentication will fail. Both client and server need to be on compatible NTLM versions for successful authentication.</p>



<p></p>



<h3 class="wp-block-heading" id="resolution">Resolution</h3>



<p>Once the servers were patched, I joined the customer’s troubleshooting session and was able to reproduce the failure immediately. The NTLM compatibility level was the first thing I checked, and my suspicions were confirmed. The <strong>LMCompatibilityLevel</strong> setting was mismatched:</p>



<ul class="wp-block-list">
<li><strong>Application servers (Postilion)</strong>: NTLM compatibility level set to 1.</li>



<li><strong>Domain controllers</strong>: NTLM compatibility level set to 5.</li>
</ul>



<p>This mismatch was causing the challenge-response mechanism to fail, resulting in the &#8220;bad password&#8221; error. Interestingly, the application worked fine before patching, but this discrepancy caused issues after the patches were applied.</p>



<p>We changed the compatibility level on the application servers to <strong>3</strong>, aligning it with the domain controllers. The system immediately started functioning again, and the authentication failures were resolved within 30 minutes. This not only restored functionality but also enhanced the security of the application by using a more secure NTLM version.</p>



<p></p>



<h3 class="wp-block-heading" id="lessons-learned-and-final-thoughts">Lessons Learned and Final Thoughts</h3>



<p>While we always strive to understand every detail of why something works or doesn’t, some nuances remain unexplained. In this case, the fact that the application worked with unpatched domain controllers but failed after patching is still somewhat mysterious. However, in production environments, the immediate priorities are <strong>security</strong> and making the system work.</p>



<p>For this case, we succeeded in both: we resolved the problem without rolling back patches and strengthened security by using a higher NTLM version. That said, there is always room for improvement. In the future, switching to <strong>Kerberos</strong>, the industry-standard authentication protocol, would be a better long-term solution.</p>



<p></p>



<h3 class="wp-block-heading" id="conclusion">Conclusion</h3>



<p>This case highlights the importance of proper authentication configurations and the potential impact of security patching on enterprise applications. By aligning the NTLM settings across systems, we were able to quickly resolve the issue and ensure the continued operation of a critical financial application. It serves as a reminder to review and understand the authentication mechanisms in your environment, especially when applying patches to domain controllers.</p>



<p>If you’re running applications that rely on NTLM authentication, now might be a good time to review your <strong>LMCompatibilityLevel</strong> settings across your environment or even start thinking about moving them to Kerberos. Have you experienced similar issues post-patching? Drop a comment below or share your story</p>



<p></p>



<h3 class="wp-block-heading" id="references">References</h3>



<ul class="wp-block-list">
<li><a href="https://docs.microsoft.com/windows/security" target="_blank" rel="noopener noreferrer nofollow">Network security: LAN Manager authentication level</a>.</li>



<li><a href="https://learn.microsoft.com/en-us/windows/whats-new/deprecated-features" target="_blank" rel="noopener noreferrer nofollow">NTLM deprecation</a></li>
</ul>



<p><a href="https://learn.microsoft.com/en-us/windows/whats-new/deprecated-features" target="_blank" rel="noopener noreferrer nofollow"><strong><a href="https://learn.microsoft.com/en-us/windows/whats-new/deprecated-features" target="_blank" rel="noopener noreferrer nofollow"></a></strong></a></p>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://masterinprogress.com/troubleshooting-ntlm-version/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>The Case of the Persistent 3DES Cipher: Sweet32 Birthday Attack Unwrapped</title>
		<link>https://masterinprogress.com/3desandsweet32/</link>
					<comments>https://masterinprogress.com/3desandsweet32/#respond</comments>
		
		<dc:creator><![CDATA[Alexander Mora]]></dc:creator>
		<pubDate>Thu, 19 Sep 2024 05:23:27 +0000</pubDate>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[PKI]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[3des]]></category>
		<category><![CDATA[birthday attack]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[sweet 32]]></category>
		<category><![CDATA[sweet32]]></category>
		<category><![CDATA[triple des]]></category>
		<guid isPermaLink="false">https://masterinprogress.com/?p=245</guid>

					<description><![CDATA[In this post, I dive into a real-world case where a vulnerability scan flagged a server for the Sweet32 birthday attack due to an outdated 3DES cipher. Despite disabling the cipher at the registry level, the vulnerability persisted. It wasn’t until we discovered that another SSL provider on a different port was accepting the weak cipher that the mystery was solved. If you’re facing stubborn SSL vulnerabilities, this story might just give you the clues you need to resolve them. Read on to learn how we cracked the case and the lessons we learned along the way.]]></description>
										<content:encoded><![CDATA[
<p></p>



<div class="wp-block-rank-math-toc-block" id="rank-math-toc"><h2>Table of Contents</h2><nav><ul><li><a href="#the-vulnerability-report">The Vulnerability Report</a></li><li><a href="#the-first-fix-disable-3-des-cipher-suite">The First Fix: Disable 3DES Cipher Suite</a></li><li><a href="#the-mystery-continues-false-positive-or-missed-configuration">The Mystery Continues: False Positive or Missed Configuration?</a></li><li><a href="#the-sherlock-moment-different-port-different-story">The Sherlock Moment: Different Port, Different Story</a></li><li><a href="#the-real-lesson-more-than-just-schannel">The Real Lesson: More Than Just Schannel</a></li><li><a href="#how-to-identify-the-process-listening-on-a-port">How to Identify the Process Listening on a Port</a></li><li><a href="#conclusion-call-to-action">Conclusion &amp; Call to Action</a></li><li><a href="#references">References</a></li></ul></nav></div>



<p></p>



<p>A few moons back, I found myself wrestling with an interesting case that gave me a fresh lesson on SSL and security providers. The customer I was working with had a vulnerability scanner (Rapid7, in this case) that flagged their server as vulnerable to Sweet32. If you’ve ever had to deal with vulnerability scans, this might sound familiar!</p>



<p>Let me walk you through the scenario, the fix, and the curveball that a thrid party process threw at us.</p>



<p></p>



<h3 class="wp-block-heading" id="the-vulnerability-report">The Vulnerability Report</h3>



<p>Our story begins with a standard security scan, which operates by sending multiple &#8220;client hello&#8221; messages to the server with different cipher suites. The server responds with a &#8220;server hello&#8221; for every cipher it accepts—secure or not. The scanner then flags anything it sees as insecure. Enter Sweet32.</p>



<p><strong>What is Sweet32?</strong><br>Sweet32, or the birthday attack, targets encryption algorithms like 3DES or Blowfish that use 64-bit block sizes. It’s kind of like having a lock on your door, but after enough time, the key pattern starts repeating itself. When a cipher’s encrypted blocks start repeating, an attacker can piece together sensitive data. In high-traffic environments, this is a big no-no. For modern security, we need to switch to stronger encryption algorithms like AES that use larger block sizes and avoid this vulnerability.</p>



<p></p>



<h3 class="wp-block-heading" id="the-first-fix-disable-3-des-cipher-suite">The First Fix: Disable 3DES Cipher Suite</h3>



<p>The customer&#8217;s server was flagged for accepting the 3DES cipher, a known weak link in the encryption chain. So, the first logical step was to configure the server to stop allowing this cipher by tweaking both local and Group Policy-controlled registry settings.</p>



<p><strong>We tweaked the following registry keys:</strong></p>



<ul class="wp-block-list">
<li><code>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL</code></li>



<li><code>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Cryptography\Configuration\Local\SSL\0010002</code></li>



<li><code>HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Cryptography\Configuration\SSL\0010002</code></li>
</ul>



<p>The server was rebooted, and we expected the issue to be resolved. But, spoiler alert—it wasn’t.</p>



<p></p>



<h3 class="wp-block-heading" id="the-mystery-continues-false-positive-or-missed-configuration">The Mystery Continues: False Positive or Missed Configuration?</h3>



<p>After the reboot, the vulnerability scan still flagged the 3DES cipher as enabled. We thought, “Okay, it must be a false positive.” But network traces said otherwise. Despite our changes, the handshake process was still completing using the 3DES cipher.</p>



<p>So, we went back to square one—double-checking policies, reviewing registries, running the scan again. Everything seemed in place for the cipher to be disabled. Yet the vulnerability persisted.</p>



<p></p>



<h3 class="wp-block-heading" id="the-sherlock-moment-different-port-different-story">The Sherlock Moment: Different Port, Different Story</h3>



<p>Eventually, we started noticing a pattern. While port 443 (used for HTTPS connections) rejected the 3DES cipher as expected, port 5989—now that was a different story. The cipher was still being accepted there!</p>



<p>A quick internet search didn’t turn up anything definitive about port 5989, but we were determined to solve the mystery. So, we took a deeper dive using the trusty <code>Netstat -anob</code> and <code>Tasklist</code> commands. And guess what? We found the culprit: <strong>WMIServer.exe</strong>, owned by HPE at the time.</p>



<p></p>



<h3 class="wp-block-heading" id="the-real-lesson-more-than-just-schannel">The Real Lesson: More Than Just Schannel</h3>



<p>Here’s the big takeaway: Windows servers can have more SSL credential providers than just Schannel. In this case, WMIServer.exe was accepting the weak 3DES cipher, and it had its own SSL settings independent of Schannel.</p>



<p>So, when you&#8217;re dealing with SSL vulnerability scans like those from Nessus, QualysGuard, or OpenVAS, don&#8217;t forget to check <strong>all</strong> the SSL credential providers, not just Schannel. There might be other services on your server accepting those insecure ciphers without you even realizing it.</p>



<p></p>



<h3 class="wp-block-heading" id="how-to-identify-the-process-listening-on-a-port">How to Identify the Process Listening on a Port</h3>



<p>In case you ever find yourself in this situation, here’s a quick guide:</p>



<ol class="wp-block-list">
<li>Collect a Wireshark Network trace while you are running the scanner</li>



<li>After the scanner report is done, start analyzing the network trace, you can use the filter &#8220;tls.handshake.type == 2&#8221; to show server hello only packets</li>



<li>Expand the transport layer security and find the cipher suite included, look for any that you would like to eliminate</li>



<li>Take note of the port in your local server, that port number is being used by a process that is accepting the vulnerable connection</li>



<li>Run <code>netstat -anob</code> to see all active connections, the associated process IDs, and the listening ports.</li>



<li>Use <code>tasklist</code> to match the process ID to the name of the running process.</li>



<li>Optionally, use Process Monitor (ProcMon) or Windows Performance Recorder (WPR) with Windows Performance Analizer (WPA) to get the name of the company that owns the process (but usually you don&#8217;t need to go this far).</li>
</ol>



<p></p>



<h3 class="wp-block-heading" id="conclusion-call-to-action">Conclusion &amp; Call to Action</h3>



<p>The moral of the story? Never assume Schannel is the only SSL provider at play. Windows can have more lurking in the background, especially with third-party software involved.</p>



<p>If you&#8217;re facing a similar vulnerability scan issue and are banging your head trying to figure out why your configurations aren&#8217;t sticking, consider checking for other SSL providers on your system. The solution might be right there in front of you!</p>



<p><strong>Have you encountered something similar with SSL configurations or vulnerability scans? Drop your thoughts in the comments, and let’s discuss!</strong> </p>



<p></p>



<h3 class="wp-block-heading" id="references">References</h3>



<ul class="wp-block-list">
<li><a href="Sweet32: Birthday attacks on 64-bit block ciphers in TLS and OpenVPN">Sweet32 info</a></li>



<li><a href="https://techcommunity.microsoft.com/t5/ask-the-directory-services-team/more-speaking-in-ciphers-and-other-enigmatic-tongues-with-a/ba-p/4047491" target="_blank" rel="noopener noreferrer nofollow">Speaking about ciphers </a></li>
</ul>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://masterinprogress.com/3desandsweet32/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>GPOs That Won’t Let Go: Tackling Group Policy Tattooing in Active Directory</title>
		<link>https://masterinprogress.com/grouppolicytatooing/</link>
					<comments>https://masterinprogress.com/grouppolicytatooing/#respond</comments>
		
		<dc:creator><![CDATA[Alexander Mora]]></dc:creator>
		<pubDate>Tue, 17 Sep 2024 18:33:03 +0000</pubDate>
				<category><![CDATA[Group Policy]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Registry]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[tattooing]]></category>
		<guid isPermaLink="false">https://masterinprogress.com/?p=190</guid>

					<description><![CDATA[In this post, we dive into the technical challenge of GPO registry tattooing, where settings applied by Group Policy Objects persist even after the GPO is removed. We’ll explain why this occurs, particularly with security-related settings, and provide a step-by-step approach to identifying and resolving these lingering configurations. Using resources like ADMX Help and PowerShell, you’ll learn how to restore proper system behavior and avoid future issues with tattooed policies.]]></description>
										<content:encoded><![CDATA[
<p></p>



<div class="wp-block-rank-math-toc-block" id="rank-math-toc"><h2>Table of Contents</h2><nav><ul><li><a href="#what-is-gpo-registry-tattooing">What is GPO Registry Tattooing?</a></li><li><a href="#why-does-this-happen">Why Does This Happen?</a></li><li><a href="#how-to-avoid-or-mitigate-gpo-tattooing">How to Avoid or Mitigate GPO Tattooing</a></li><li><a href="#how-to-identify-tattooed-registry-settings">How to Identify Tattooed Registry Settings</a></li><li><a href="#conclusion">Conclusion</a></li><li><a href="#references">References</a></li></ul></nav></div>



<p></p>



<p>Welcome back to <em>Master in Progress</em>! Today, we’re diving into a topic that might feel like your machines have a bit of a rebellious streak: Group Policy Object (GPO) registry tattooing. Yes, it’s real, and no, it&#8217;s not as cool as it sounds. So, what’s the deal with these &#8220;tattoos&#8221; your GPOs are leaving behind, and why won’t they just go away?</p>



<p></p>



<h3 class="wp-block-heading" id="what-is-gpo-registry-tattooing">What is GPO Registry Tattooing?</h3>



<p>Let’s start with the basics.</p>



<p>GPO (Group Policy Object) registry tattooing occurs when a GPO applies specific settings to a machine&#8217;s registry, and when that GPO is removed, the registry settings aren’t automatically reset to their default values. The settings are &#8220;tattooed&#8221; onto the system, sticking around like a bad tattoo from your rebellious teenage years.</p>



<p>This can be especially persistent when it comes to <strong>security settings</strong>, as these settings are stored in a local database on your computer. Whenever a security setting is applied via GPO or local policy, it gets saved in this database. Even if the policy is later removed or unlinked, the security settings don&#8217;t automatically revert to previous values unless they were explicitly defined beforehand. If there’s no previous value in the database, the setting remains stuck with its last defined value, a behavior commonly referred to as &#8220;tattooing.&#8221;</p>



<p></p>



<h3 class="wp-block-heading" id="why-does-this-happen">Why Does This Happen?</h3>



<p>Normally, when a GPO is removed, you expect the system to revert to its pre-GPO state. However, certain registry keys modified by the GPO remain unchanged unless specifically instructed otherwise.</p>



<p>Here’s why:</p>



<ul class="wp-block-list">
<li><strong>One-Way Ticket:</strong> Some GPO settings are designed to <strong>apply a value</strong> but not revert it. Once the setting is tattooed into the registry, the GPO doesn&#8217;t include instructions for what happens when it’s removed.</li>



<li><strong>No Cleanup Logic:</strong> In some cases, the GPO doesn’t have logic to revert or reset the change after it’s no longer applied. The settings are left behind, sitting in the registry like an awkward guest who didn’t realize the party was over.</li>
</ul>



<p></p>



<h3 class="wp-block-heading" id="how-to-avoid-or-mitigate-gpo-tattooing">How to Avoid or Mitigate GPO Tattooing</h3>



<p>Just like avoiding a bad tattoo, you can avoid GPO registry tattoos with careful planning. Here’s how to prevent or fix tattooed settings:</p>



<ol class="wp-block-list">
<li><strong>Set the GPO to the Desired Value Before Removal</strong><br>Instead of simply deleting or disabling a GPO, <strong>set the policy to the value you actually want</strong>. By explicitly setting the correct value before unlinking or removing the GPO, you ensure the desired state is applied. This avoids leaving an undesired setting stuck in place.</li>



<li><strong>Run Cleanup Scripts</strong><br>If tattooing has already occurred, scripts can be a lifesaver. Use PowerShell scripts to manually reset the registry keys that were modified by the GPO. This is the manual “tattoo removal” you need to bring your systems back to a clean state. Example PowerShell snippet to reset a specific registry key:</li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#39404f;color:#c8d0e0">PowerShell</span><span role="button" tabindex="0" data-code="   Set-ItemProperty -Path 'HKLM:\Software\Policies\' -Name 'YourKeyName' -Value 0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9FF">   </span><span style="color: #88C0D0">Set-ItemProperty</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF">Path </span><span style="color: #ECEFF4">&#39;</span><span style="color: #A3BE8C">HKLM:\Software\Policies\</span><span style="color: #ECEFF4">&#39;</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF">Name </span><span style="color: #ECEFF4">&#39;</span><span style="color: #A3BE8C">YourKeyName</span><span style="color: #ECEFF4">&#39;</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF">Value </span><span style="color: #B48EAD">0</span></span></code></pre></div>



<ol start="3" class="wp-block-list">
<li><strong>Leverage GPO Removal Features (Where Available)</strong><br>For certain policies, there may be an option to specify behavior on removal. If available, use this feature to automatically undo the settings when the GPO is no longer applied.</li>
</ol>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading" id="how-to-identify-tattooed-registry-settings">How to Identify Tattooed Registry Settings</h3>



<p>Now that you’ve removed a GPO but suspect a lingering setting, how can you find the &#8220;tattooed&#8221; registry key? Here’s a practical approach:</p>



<ol class="wp-block-list">
<li><strong>Identify the Misbehaving Behavior</strong><br>First, pinpoint the behavior or setting that seems to be stuck. Let’s use an example where your system is still enforcing a custom SSL cipher suite order, even though you’ve removed the GPO that configured it. This could cause issues with SSL/TLS negotiations that are out of sync with your current security requirements.</li>



<li style="margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20)"><strong>Use Websites Like ADMX Help to Find Corresponding Registry Keys</strong><br>Now that you’ve identified the misbehaving setting, the next step is to track down the registry key associated with the GPO. <a href="https://admx.help/" target="_blank" rel="noopener noreferrer nofollow">ADMX Help</a> is a great resource for this task. Let’s walk through how you can find the relevant registry key for the <strong>SSL Cipher Suite Order</strong> policy. <strong>Example: Tracking Down the Registry Key for SSL Cipher Suite Order Policy</strong></li>
</ol>



<ul style="margin-top:0;margin-bottom:0" class="wp-block-list">
<li style="margin-top:var(--wp--preset--spacing--20);margin-right:var(--wp--preset--spacing--60);margin-bottom:var(--wp--preset--spacing--20);margin-left:var(--wp--preset--spacing--60)"><strong>Step A: Navigate to ADMX Help.</strong><br>Head over to <a href="https://admx.help/" target="_blank" rel="noopener noreferrer nofollow">ADMX Help</a> in your browser. This site provides a detailed breakdown of ADMX policies, including the registry paths and keys that they modify.</li>



<li style="margin-top:var(--wp--preset--spacing--20);margin-right:var(--wp--preset--spacing--60);margin-bottom:var(--wp--preset--spacing--20);margin-left:var(--wp--preset--spacing--60)"><strong>Step B: Search for the GPO setting.</strong><br>In this case, you want to look up the <strong>SSL Cipher Suite Order</strong> policy. In the search bar, type “SSL Cipher Suite Order” or directly go to this link: <a href="https://admx.help/?Category=Windows_10_2016&amp;Policy=Microsoft.Policies.CypherStrength::SSLCipherSuiteOrder" target="_blank" rel="noopener noreferrer nofollow">ADMX Help &#8211; SSL Cipher Suite Order</a>.</li>



<li style="margin-top:var(--wp--preset--spacing--20);margin-right:var(--wp--preset--spacing--60);margin-bottom:var(--wp--preset--spacing--20);margin-left:var(--wp--preset--spacing--60)"><strong>Step C: Review the Policy Details.</strong><br>Once you land on the page for the SSL Cipher Suite Order policy, you’ll find all the critical information:<ul><li>The <strong>policy name</strong> as it appears in the Group Policy Management Editor: &#8220;SSL Cipher Suite Order.&#8221;The <strong>ADMX file</strong> where this policy is defined: <code>cipherstrength.admx</code>.The <strong>registry path and key</strong>:</li></ul><code>Registry Key: HKLM\SOFTWARE\Policies\Microsoft\Cryptography\Configuration\SSL\00010002 Value Name: Functions</code>
<ul class="wp-block-list">
<li>The <strong>value</strong> this policy sets: a long string that specifies the order of SSL ciphers (for example, &#8220;TLS_RSA_WITH_AES_128_CBC_SHA256, …&#8221;).</li>
</ul>
</li>



<li style="margin-top:var(--wp--preset--spacing--20);margin-right:var(--wp--preset--spacing--60);margin-bottom:var(--wp--preset--spacing--20);margin-left:var(--wp--preset--spacing--60)"><strong>Step D: Check the Registry.</strong><br>With this information, open the Registry Editor (<code>regedit.exe</code>) on the machine where the GPO was previously applied. Navigate to the following path:<br><code>HKLM\SOFTWARE\Policies\Microsoft\Cryptography\Configuration\SSL\00010002</code><br>Inside, look for the <code>Functions</code> value. If it’s still present with the custom cipher order, even though you’ve removed the GPO, then this is your tattooed setting. The machine is still enforcing this order because the registry key wasn’t reverted when the policy was removed.</li>
</ul>



<ol start="3" class="wp-block-list">
<li><strong>Modify or Remove the Registry Entry</strong><br>Now that you’ve found the tattooed setting, you can manually modify the <code>Functions</code> value to reflect the default or desired cipher suite order. Alternatively, if you no longer want any custom order applied, you can simply delete the key or reset it to a neutral value. Example of removing the setting via PowerShell:</li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#39404f;color:#c8d0e0">PowerShell</span><span role="button" tabindex="0" data-code="   Remove-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Cryptography\Configuration\SSL\00010002' -Name 'Functions'" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9FF">   </span><span style="color: #88C0D0">Remove-ItemProperty</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF">Path </span><span style="color: #ECEFF4">&#39;</span><span style="color: #A3BE8C">HKLM:\SOFTWARE\Policies\Microsoft\Cryptography\Configuration\SSL\00010002</span><span style="color: #ECEFF4">&#39;</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF">Name </span><span style="color: #ECEFF4">&#39;</span><span style="color: #A3BE8C">Functions</span><span style="color: #ECEFF4">&#39;</span></span></code></pre></div>



<ol start="4" class="wp-block-list">
<li><strong>PowerShell for Quick Queries</strong><br>To check for this tattooed setting on multiple machines, you can use PowerShell to quickly query the registry key. Here’s an example:</li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#39404f;color:#c8d0e0">PowerShell</span><span role="button" tabindex="0" data-code="   Get-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Cryptography\Configuration\SSL\00010002' -Name 'Functions'" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9FF">   </span><span style="color: #88C0D0">Get-ItemProperty</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF">Path </span><span style="color: #ECEFF4">&#39;</span><span style="color: #A3BE8C">HKLM:\SOFTWARE\Policies\Microsoft\Cryptography\Configuration\SSL\00010002</span><span style="color: #ECEFF4">&#39;</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF">Name </span><span style="color: #ECEFF4">&#39;</span><span style="color: #A3BE8C">Functions</span><span style="color: #ECEFF4">&#39;</span></span></code></pre></div>



<p>This will return the current value of the SSL Cipher Suite Order if it&#8217;s still applied. You can then decide whether to reset, modify, or remove it based on your requirements.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading" id="conclusion">Conclusion</h3>



<p>GPO registry tattooing might sound intimidating, but with tools like ADMX Help, identifying lingering registry keys becomes much easier. By taking the time to properly remove or reset these settings, you can ensure your systems aren’t following outdated rules.</p>



<p>Remember, always check the registry for tattooed settings and use resources like ADMX Help or Group Policy Search to track down the corresponding keys. For persistent policies, like the SSL Cipher Suite Order, manually resetting the registry key is key to keeping your systems secure and up-to-date.</p>



<p>Has GPO registry tattooing caused you trouble in the past? Share your experiences in the comments below, check other posts in <em>Master in Progress</em> for more tips, tricks, and insights into mastering Active Directory and beyond!</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading" id="references">References</h3>



<ul class="wp-block-list">
<li><a href="https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/security-policy-settings/security-policy-settings" target="_blank" rel="noopener noreferrer nofollow"><strong>Security policies</strong></a></li>
</ul>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://masterinprogress.com/grouppolicytatooing/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>7 Reasons Why Load Balancers Don’t Belong Between Clients and Domain Controllers</title>
		<link>https://masterinprogress.com/loadbalancerswithactivedirectory/</link>
					<comments>https://masterinprogress.com/loadbalancerswithactivedirectory/#respond</comments>
		
		<dc:creator><![CDATA[Alexander Mora]]></dc:creator>
		<pubDate>Tue, 17 Sep 2024 04:42:38 +0000</pubDate>
				<category><![CDATA[Load balancers]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Kerberos]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[domain controller]]></category>
		<category><![CDATA[failure]]></category>
		<category><![CDATA[load balancer]]></category>
		<guid isPermaLink="false">https://masterinprogress.com/?p=177</guid>

					<description><![CDATA[If you’re considering adding a load balancer between your clients and domain controllers (DCs), stop right there! While load balancers can work wonders in many networking scenarios, Active Directory (AD) isn’t one of them. Here’s why this setup is more trouble than it’s worth. We’ll dive into five detailed reasons why you should let AD do its job without getting a load balancer involved.]]></description>
										<content:encoded><![CDATA[
<p></p>



<div class="wp-block-rank-math-toc-block" id="rank-math-toc"><h2>Table of Contents</h2><nav><ul><li><a href="#1-active-directorys-built-in-load-balancing-is-all-you-need">1. Active Directory’s Built-In Load Balancing Is All You Need</a></li><li><a href="#2-tcp-communication-dont-mess-with-the-three-way-handshake">2. TCP Communication: Don’t Mess with the Three-Way Handshake</a></li><li><a href="#3-kerberos-doesnt-like-load-balancers-either">3. Kerberos Doesn’t Like Load Balancers Either</a></li><li><a href="#4-ssl-tls-handshake-for-ldaps-the-certificate-nightmare">4. SSL/TLS Handshake for LDAPS: The Certificate Nightmare</a></li><li><a href="#5-ldap-channel-binding-dont-let-your-load-balancer-break-the-chain">5. LDAP Channel Binding: Don’t Let Your Load Balancer Break the Chain</a></li><li><a href="#6-account-lockouts-the-detectives-nightmare">6. Account Lockouts: The Detective’s Nightmare</a></li><li><a href="#7-if-your-application-needs-a-load-balancer-to-communicate-with-active-directory-it-wasnt-built-for-ad">7. If Your Application Needs a Load Balancer to Communicate with Active Directory, It Wasn’t Built for AD</a></li><li><a href="#final-thoughts-let-active-directory-do-its-thing">Final Thoughts: Let Active Directory Do Its Thing</a></li><li><a href="#r">References</a></li></ul></nav></div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p>If you’re considering adding a load balancer between your clients and domain controllers (DCs), stop right there! While load balancers can work wonders in many networking scenarios, Active Directory (AD) isn’t one of them. Here’s why this setup is more trouble than it’s worth. We’ll dive into five detailed reasons why you should let AD do its job without getting a load balancer involved.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading" id="1-active-directorys-built-in-load-balancing-is-all-you-need">1. Active Directory’s Built-In Load Balancing Is All You Need</h3>



<p>Active Directory already comes with robust tools that handle load balancing across domain controllers—so why complicate things with a load balancer? Let’s break this down:</p>



<ul class="wp-block-list">
<li><strong>Sites and Services Snap-in</strong>: AD allows you to set up sites and assign DCs to each one. This lets you group your DCs based on geographical regions or network topology. You decide which DCs are responsible for which site, ensuring that users connect to the closest one for optimal performance. It’s like setting up traffic signs that direct users to the nearest gas station.</li>



<li><strong>Subnets Linked to Sites</strong>: AD lets you map subnets to sites. This way, a client in New York won’t accidentally connect to a DC in California—unless you want it to. This is a seamless, automatic process that reduces latency and improves login speed for users.</li>



<li><strong>DNS Priorities and Weights</strong>: When you have multiple DCs within a site, AD uses DNS records to balance the load. It assigns priorities and weights to each DC, distributing client connections evenly. It’s like having multiple checkout lines at a grocery store, and a store manager directs people to the least busy line. There’s no overcrowding, and everyone gets served efficiently.</li>
</ul>



<p><em>Why add a load balancer?</em> AD already handles the heavy lifting here. Adding an external load balancer just adds complexity and expense with no real benefit.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading" id="2-tcp-communication-dont-mess-with-the-three-way-handshake">2. TCP Communication: Don’t Mess with the Three-Way Handshake</h3>



<p>When it comes to TCP connections, load balancers can wreak havoc. Every TCP connection begins with a “three-way handshake,” and if the load balancer decides to switch servers mid-communication, things fall apart fast.</p>



<ul class="wp-block-list">
<li><strong>TCP Handshake Breakdown</strong>: TCP requires this handshake to establish a reliable connection. If your load balancer moves the client to a different DC halfway through, the new DC will not recognize the connection because it wasn’t part of the original handshake. This leads to dropped packets, timeouts, and user frustration. Imagine you’re ordering a pizza, and halfway through the call, your phone suddenly connects you to a completely different restaurant. You can’t expect them to know your order—they weren’t part of the conversation from the start!</li>



<li><strong>TCP Reset Floods</strong>: Additionally, if the load balancer aggressively switches DCs, it can lead to TCP reset storms where one DC keeps closing connections that it didn’t start. This can overwhelm your DCs and affect network performance.</li>
</ul>



<p><em>Takeaway</em>: AD’s native site-based load balancing works with TCP’s needs, while a load balancer could disrupt the connection flow, causing delays and dropped communication.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading" id="3-kerberos-doesnt-like-load-balancers-either">3. Kerberos Doesn’t Like Load Balancers Either</h3>



<p>Kerberos, AD’s go-to authentication protocol, is a sensitive beast. It doesn’t play well with load balancers for one simple reason: tickets. When a client authenticates, Kerberos gives it a ticket, which is essentially a “permission slip” to access resources via a specific DC. But if your load balancer reroutes the client to a different DC, that ticket becomes invalid.</p>



<ul class="wp-block-list">
<li><strong>Ticket Mismatch</strong>: Kerberos tickets are encrypted with the original DC’s key. When a client presents a ticket to a different DC, that DC will reject it because it can’t decrypt the ticket. It’s like showing up to a concert with a ticket for a completely different venue—the bouncer won’t let you in.</li>



<li><strong>Sticky Sessions?</strong>: You could configure Sticky Sessions on the load balancer to ensure the client sticks to the same DC for the entire session. But this workaround only adds more complexity. If the sticky session fails, you’ll still have ticket decryption issues.</li>



<li><strong>Performance Hits</strong>: Every time a Kerberos ticket is rejected due to mismatched DCs, the client has to request a new ticket from the Key Distribution Center (KDC). This adds overhead to both the client and DC, ultimately affecting performance.</li>
</ul>



<p><em>Takeaway</em>: Kerberos doesn’t like surprises. When you throw a load balancer into the mix, it becomes a guessing game of which DC holds the right ticket.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading" id="4-ssl-tls-handshake-for-ldaps-the-certificate-nightmare">4. SSL/TLS Handshake for LDAPS: The Certificate Nightmare</h3>



<p>If you’re using LDAPS (LDAP over SSL/TLS), things get even messier with a load balancer. Why? Because SSL/TLS handshakes depend on certificate matching, and your load balancer can break this chain of trust.</p>



<ul class="wp-block-list">
<li><strong>Certificate Subject Name Mismatch</strong>: SSL/TLS requires that the server’s certificate matches the hostname the client is trying to connect to. So, if your client is trying to connect to <code>dc1.domain.com</code> but your load balancer routes it to <code>dc2.domain.com</code>, the client will receive a certificate mismatch warning. The SSL handshake will fail, and the connection won’t be established.</li>



<li><strong>Managing SAN Certificates</strong>: One workaround is to create a Subject Alternative Name (SAN) certificate, which lists all your DCs in the certificate’s SAN field. This works, but if you have many DCs, your certificate could end up with a dozen or more entries. Keeping this updated as DCs come and go can become a headache. It’s like trying to maintain a guest list for a wedding when people keep RSVPing at the last minute.</li>



<li><strong>Wildcard Certificates: Not a Great Solution</strong>: Alternatively, you might consider using a wildcard certificate (<code>*.domain.com</code>), but this is a security risk. If that wildcard certificate is ever compromised, it could be used to impersonate any server in your domain—not just your DCs.</li>
</ul>



<p><em>Takeaway</em>: SSL/TLS handshakes require exact matching between the certificate and the hostname. A load balancer just complicates this, and the alternatives aren’t much better.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading" id="5-ldap-channel-binding-dont-let-your-load-balancer-break-the-chain">5. LDAP Channel Binding: Don’t Let Your Load Balancer Break the Chain</h3>



<p>LDAP channel binding is a security feature that was designed to prevent man-in-the-middle attacks, and guess what? Your load balancer can mess this up too, especially if it’s doing SSL offloading.</p>



<ul class="wp-block-list">
<li><strong>SSL Offloading Breaks Binding</strong>: With SSL offloading, the load balancer terminates the SSL connection and then re-establishes it with the DC. While this might improve performance, it also breaks the integrity of the SSL session, effectively negating channel binding. The client and DC are no longer directly communicating, which opens up the possibility for tampering.</li>



<li><strong>Security Risk</strong>: The whole point of LDAP channel binding is to ensure that the client and DC have a direct, secure connection. By offloading SSL, the load balancer inserts itself in the middle, which is exactly what channel binding is supposed to prevent.</li>



<li><strong>Troubleshooting Pain</strong>: Once SSL offloading breaks channel binding, tracking down the issue can be a nightmare. You might be scratching your head wondering why perfectly valid SSL certificates are failing, only to realize that your load balancer is breaking the chain.</li>
</ul>



<p><em>Takeaway</em>: SSL offloading may seem like a good idea to reduce load on your DCs, but it breaks a crucial security mechanism—LDAP channel binding.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading" id="6-account-lockouts-the-detectives-nightmare">6. Account Lockouts: The Detective’s Nightmare</h3>



<p>One of the biggest challenges with load balancers is account lockouts. Specifically, troubleshooting them becomes incredibly difficult when your load balancer doesn’t preserve the client’s IP address.</p>



<ul class="wp-block-list">
<li><strong>No IP Preservation, No Clues</strong>: Without IP preservation, all your DCs see is the load balancer’s IP address. So, when a client is repeatedly sending bad login attempts, you have no idea where those attempts are really coming from. It’s like trying to solve a crime when all the witnesses give you the wrong description of the suspect.</li>



<li><strong>Bad Logon Attempts</strong>: Imagine a user typing the wrong password several times and getting locked out. With no IP preservation, all you see is the load balancer’s IP, so you’re stuck playing detective to figure out which user is at fault. This can be especially tricky if the bad logon attempts are coming from multiple devices or locations.</li>



<li><strong>Best Practice</strong>: If you must use a load balancer, at least configure IP preservation. This ensures that each DC sees the client’s actual IP address, making troubleshooting much easier.</li>
</ul>



<p><em>Takeaway</em>: Account lockouts are hard enough to troubleshoot without a load balancer getting in the way. If you’re not preserving IP addresses, you’re adding unnecessary complexity to an already frustrating process.</p>



<p></p>



<h3 class="wp-block-heading" id="7-if-your-application-needs-a-load-balancer-to-communicate-with-active-directory-it-wasnt-built-for-ad">7. If Your Application Needs a Load Balancer to Communicate with Active Directory, It Wasn’t Built for AD</h3>



<p>Let’s be real—if your application <strong>requires</strong> a load balancer to talk to Active Directory, then it probably wasn’t designed with AD in mind. And that’s a red flag! Here’s why:</p>



<ul class="wp-block-list">
<li><strong>AD-Aware Applications Don’t Need Load Balancers</strong>: Any well-designed application that integrates with Active Directory should already know how to leverage AD’s built-in load balancing mechanisms. AD’s <strong>DCLocator function</strong> does this heavy lifting automatically. DCLocator ensures that your application finds the most appropriate domain controller based on the client’s location and network configuration. It’s like having a built-in GPS that always directs you to the nearest and least busy DC.</li>



<li><strong>Developer Oversight</strong>: If the application’s developers didn’t consider DCLocator when building the app, then it’s likely they also missed other important Active Directory best practices. This could lead to more issues down the road, such as poor performance, security vulnerabilities, or broken authentication flows.</li>



<li><strong>Microsoft’s Stance</strong>: Here’s the kicker—<strong>Microsoft doesn’t officially support load balancers between clients and domain controllers</strong>. This should be a clear sign that it’s not a recommended practice. When something breaks (and it will), you might find yourself in a support dead-end, as Microsoft won’t offer assistance for a setup that includes load balancers in the middle of AD traffic.</li>
</ul>



<p><em>Takeaway</em>: If your application relies on a load balancer to communicate with AD, it wasn’t built with AD in mind. You’re better off finding or developing applications that natively support Active Directory’s load balancing and fault tolerance features.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading" id="final-thoughts-let-active-directory-do-its-thing">Final Thoughts: Let Active Directory Do Its Thing</h3>



<p>In conclusion, while it may be tempting to introduce a load balancer into your AD infrastructure, it’s often more trouble than it’s worth. AD has built-in mechanisms like Sites and Services, DNS priorities, and the DCLocator function to handle traffic distribution and fault tolerance. Introducing a load balancer can disrupt TCP communication, Kerberos authentication, SSL/TLS handshakes, and LDAP channel binding, and make troubleshooting account lockouts a nightmare. And let’s not forget—if your app <em>needs</em> a load balancer to talk to AD, it’s probably not built with AD best practices in mind.</p>



<p><em>Call to Action</em>: Have any stories of load balancers causing havoc in your AD environment? Drop them in the comments below, or feel free to reach out for help optimizing your AD infrastructure. Let’s keep it simple—let AD do the job it was designed to do!</p>



<p></p>



<h3 class="wp-block-heading" id="r">References</h3>



<ul class="wp-block-list">
<li><a href="https://learn.microsoft.com/en-us/archive/technet-wiki/33547.load-balancers-and-active-directory" target="_blank" rel="noopener noreferrer nofollow">Microsoft statement about Load balancers and DCs</a></li>



<li><a href="https://www.carlstalhood.com/domain-controller-ldaps-load-balancing/" target="_blank" rel="noopener noreferrer nofollow">&#8220;Simple&#8221; load balancer configuration</a></li>
</ul>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://masterinprogress.com/loadbalancerswithactivedirectory/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Clearing SIDHistory in Active Directory with PowerShell: Unlock Your Admin Powers and Defeat &#8216;Access is Denied&#8217; 0x5</title>
		<link>https://masterinprogress.com/clearingsidhistoryattribute/</link>
					<comments>https://masterinprogress.com/clearingsidhistoryattribute/#respond</comments>
		
		<dc:creator><![CDATA[Alexander Mora]]></dc:creator>
		<pubDate>Sun, 15 Sep 2024 07:57:45 +0000</pubDate>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Accounts]]></category>
		<category><![CDATA[ADMT]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Migration]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[access is denied]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[attribute bloat]]></category>
		<category><![CDATA[sidHistory]]></category>
		<guid isPermaLink="false">https://masterinprogress.com/?p=117</guid>

					<description><![CDATA[This post will show you how to easily clear the sidHistory attribute without getting the Access is Denied error message]]></description>
										<content:encoded><![CDATA[
<p></p>



<div class="wp-block-rank-math-toc-block" id="rank-math-toc"><h2>Table of Contents</h2><nav><ul><li><a href="#1-identifying-the-root-cause-sid-history-strikes-again">Identifying the Root Cause: SID History Strikes Again!</a></li><li><a href="#2-access-denied-adsi-edit-and-the-locked-sid-history">Access Denied: ADSIEdit and the Locked SIDHistory</a></li><li><a href="#the-power-of-power-shell-cleaning-up-sid-history">The Power of PowerShell: Cleaning Up SIDHistory</a></li><li><a href="#mission-accomplished-migrating-users-with-a-clean-slate">Mission Accomplished: Migrating Users with a Clean Slate</a></li><li><a href="#key-takeaways">Key Takeaways</a></li><li><a href="#r">References</a></li></ul></nav></div>



<p>Picture this: You&#8217;re migrating a user from one Active Directory (AD) domain to another. All seems to be going well until you hit a roadblock: the dreaded error message <strong>&#8220;The maximum size of an object has been exceeded.&#8221;</strong> Let&#8217;s break down how to solve this, step by step, with a dash of humor and a ton of technical insight.</p>



<p></p>



<h3 class="wp-block-heading" id="1-identifying-the-root-cause-sid-history-strikes-again"><strong>Identifying the Root Cause: SID History Strikes Again!</strong></h3>



<p>When dealing with Active Directory migrations, there’s one attribute that loves to throw a wrench in your well-oiled machine: <strong>SIDHistory</strong>. In this case, the error was triggered because the <strong>SIDHistory</strong> attribute had grown way too large, thanks to multiple migrations over the years. Think of it like your email inbox after 10 years without clearing out spam—it gets bloated!</p>



<ul class="wp-block-list">
<li><strong>SIDHistory</strong>: This attribute stores the Security Identifiers (SIDs) of a user from their previous domains. Handy for keeping access during a migration but can quickly become oversized if left unchecked.</li>



<li><strong>The problem</strong>: Users with an excessively large <strong>SIDHistory</strong> attribute exceeded the maximum object size that AD could handle.</li>
</ul>



<p></p>



<h3 class="wp-block-heading" id="2-access-denied-adsi-edit-and-the-locked-sid-history"><strong>Access Denied: ADSIEdit and the Locked SIDHistory</strong></h3>



<p>Now, you might think, “No problem, I’ll just fire up <strong>ADSIEdit</strong> and clean up the <strong>SIDHistory</strong> manually.” But when you try, you get another lovely error:</p>



<p><strong>&#8220;Operation failed. Error code: 0x5 Access is denied. PROBLEM 4003 INSUFF_ACCESS_RIGHTS&#8221;</strong></p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="423" height="249" src="/wp-content/uploads/2024/09/deniedadsiedit.png" alt="An error message of Access is denied 0x5 when attempting to modify sidHistory attribute" class="wp-image-118" srcset="/wp-content/uploads/2024/09/deniedadsiedit.png 423w, /wp-content/uploads/2024/09/deniedadsiedit-300x177.png 300w" sizes="(max-width: 423px) 100vw, 423px" /></figure>



<p>Why? Well, <strong>SIDHistory</strong> is a system-controlled attribute. Even with administrative rights, AD locks you out from directly modifying this attribute.</p>



<p></p>



<h3 class="wp-block-heading" id="the-power-of-power-shell-cleaning-up-sid-history"><strong>The Power of PowerShell: Cleaning Up SIDHistory</strong></h3>



<p>Here’s how I resolved the issue:</p>



<ol start="1" class="wp-block-list">
<li><strong>Set up the lab</strong>: Always a good practice when you’re testing something new or potentially destructive.</li>



<li><strong>Run the PowerShell command</strong>: To remove all the SIDs from the <strong>SIDHistory</strong> attribute, I used the following command:</li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#39404f;color:#c8d0e0">PowerShell</span><span role="button" tabindex="0" data-code="Get-ADUser migUser -Properties sidhistory | ForEach-Object {Set-ADUser $_ -Remove @{sidhistory = $_.sidhistory.value}}" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #88C0D0">Get-ADUser</span><span style="color: #D8DEE9FF"> migUser </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF">Properties sidhistory </span><span style="color: #81A1C1">|</span><span style="color: #D8DEE9FF"> </span><span style="color: #88C0D0">ForEach-Object</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">{</span><span style="color: #88C0D0">Set-ADUser</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">$</span><span style="color: #D8DEE9FF">_ </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF">Remove </span><span style="color: #81A1C1">@</span><span style="color: #ECEFF4">{</span><span style="color: #D8DEE9">sidhistory</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">$</span><span style="color: #D8DEE9FF">_</span><span style="color: #D8DEE9">.sidhistory.value</span><span style="color: #ECEFF4">}}</span></span></code></pre></div>



<ol start="1" class="wp-block-list">
<li>This command retrieves the user (in this case, migUser) and removes all <strong>SIDHistory</strong> entries.</li>



<li>It works like a charm because it handles the system-controlled attribute in a way that AD approves of—no more access denied errors.</li>
</ol>



<p></p>



<h3 class="wp-block-heading" id="mission-accomplished-migrating-users-with-a-clean-slate"><strong>Mission Accomplished: Migrating Users with a Clean Slate</strong></h3>



<p>Once we removed the bloated <strong>SIDHistory</strong>, we were able to successfully migrate the user to the new domain without any issues. And since the customer wanted the users’ SIDs migrated to the new domain, we ensured that their <strong>SIDHistory</strong> was clear to start fresh.</p>



<p></p>



<h3 class="wp-block-heading" id="key-takeaways"><strong>Key Takeaways</strong></h3>



<ul class="wp-block-list">
<li><strong>Watch out for large SIDHistory attributes</strong>: If a user has been migrated multiple times, this attribute can cause migration failures. There are other attributes that can also impact this, like mSMQSignCertificates, mSMQDigests, UserCertificates, etc.</li>



<li><strong>ADSIEdit isn’t always your friend</strong>: Don’t expect to edit system-controlled attributes like <strong>SIDHistory</strong> directly, even as an admin. There are other ways to edit system-controlled attributes that I will cover in a future blog post.</li>



<li><strong>PowerShell to the rescue</strong>: Use the right tools for the job. PowerShell is a powerful ally in dealing with AD challenges.</li>
</ul>



<p>Next time you face an AD migration, remember to check the size of the <strong>SIDHistory</strong> attribute, especially for users with a complex migration history. Share your own war stories with Active Directory in the comments. Let’s learn together!</p>



<p>Happy migrating, fellow techies! </p>



<p></p>



<h3 class="wp-block-heading" id="r">References</h3>



<ul class="wp-block-list">
<li><a href="https://learn.microsoft.com/en-us/windows/win32/adschema/a-systemonly" target="_blank" rel="noopener noreferrer nofollow">System-Only attributes</a></li>



<li><a href="https://learn.microsoft.com/en-us/windows/win32/adschema/a-sidhistory" target="_blank" rel="noopener noreferrer nofollow">sidHistory attribute</a></li>
</ul>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://masterinprogress.com/clearingsidhistoryattribute/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>When Cached Credentials Refuse to Leave: Stop Old Admin Passwords from Elevating Tasks!</title>
		<link>https://masterinprogress.com/refreshcachedcredentials/</link>
					<comments>https://masterinprogress.com/refreshcachedcredentials/#respond</comments>
		
		<dc:creator><![CDATA[Alexander Mora]]></dc:creator>
		<pubDate>Sat, 14 Sep 2024 07:24:59 +0000</pubDate>
				<category><![CDATA[Accounts]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[CyberArk]]></category>
		<category><![CDATA[Passwords]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[administrator]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[cached password]]></category>
		<category><![CDATA[credentials]]></category>
		<category><![CDATA[cyberark]]></category>
		<guid isPermaLink="false">https://masterinprogress.com/?p=125</guid>

					<description><![CDATA[This blog shows you how to force the machine to update the administrator cached credentials to the newest when elevating an application]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-rank-math-toc-block" id="rank-math-toc"><h2><br>Table of Contents</h2><nav><ul><li class=""><a href="#the-problem-the-ghost-of-passwords-past">The Problem: The Ghost of Passwords Past</a></li><li class=""><a href="#digging-into-event-logs-sherlock-mode-on">Digging into Event Logs: Sherlock Mode On</a></li><li class=""><a href="#the-root-cause-cached-credentials-arent-playing-fair">The Root Cause: Cached Credentials Aren’t Playing Fair</a></li><li class=""><a href="#the-fix-taming-the-cached-credentials">The Fix: Taming the Cached Credentials</a><ul><li class=""><a href="#whats-happening-here">What’s Happening Here?</a></li></ul></li><li class=""><a href="#but-wait-the-admin-workaround">But Wait… The “Admin Workaround”</a></li><li class=""><a href="#final-thoughts-and-call-to-action">Final Thoughts and Call to Action</a></li><li class=""><a href="#r">References</a></li></ul></nav></div>



<p>Ever had a situation where everything seems to be secure, but sneaky old passwords still work their magic? Recently, we dealt with a curious case from a customer who uses CyberArk to rotate admin credentials daily. Sounds like a solid plan, right? The admins would grab their shiny new password at the start of the day and use it for their daily tasks. Simple, clean, and secure. Or so it seemed.</p>



<p></p>



<h3 class="wp-block-heading" id="the-problem-the-ghost-of-passwords-past">The Problem: The Ghost of Passwords Past</h3>



<p>The issue? Administrators found out they could still use <strong>yesterday&#8217;s password</strong> to elevate tasks on their local machines. They could open a terminal or run any app as admin, using not just the freshly-minted password but also the previous day&#8217;s credentials.</p>



<p>The customer was understandably not thrilled. They wanted admins to use only the <strong>new password</strong>—yesterday’s password needed to stay in the past. But why was the old password still working?</p>



<p></p>



<h3 class="wp-block-heading" id="digging-into-event-logs-sherlock-mode-on">Digging into Event Logs: Sherlock Mode On</h3>



<p>Cue our deep dive into the event logs. We found that when admins were using the old password to elevate their tasks, no call was being made to the domain controller. A local authentication was happening instead.</p>



<p>Here’s what we saw in <strong>Event ID 4624 (Successful Logon):</strong></p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#39404f;color:#c8d0e0">XML</span><span role="button" tabindex="0" data-code="SubjectUserSid         S-1-5….
SubjectUserName        SomeUser
SubjectDomainName      SomeDomain
SubjectLogonId         0x3e7
TargetUserSid          S-1-12-1-….
TargetUserName         alex@contoso.com
TargetDomainName       SomeDomain
TargetLogonId          0x123456
LogonType              11
LogonProcessName       User32
AuthenticationPackage  Negotiate" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9FF">SubjectUserSid         S-1-5….</span></span>
<span class="line"><span style="color: #D8DEE9FF">SubjectUserName        SomeUser</span></span>
<span class="line"><span style="color: #D8DEE9FF">SubjectDomainName      SomeDomain</span></span>
<span class="line"><span style="color: #D8DEE9FF">SubjectLogonId         0x3e7</span></span>
<span class="line"><span style="color: #D8DEE9FF">TargetUserSid          S-1-12-1-….</span></span>
<span class="line"><span style="color: #D8DEE9FF">TargetUserName         alex@contoso.com</span></span>
<span class="line"><span style="color: #D8DEE9FF">TargetDomainName       SomeDomain</span></span>
<span class="line"><span style="color: #D8DEE9FF">TargetLogonId          0x123456</span></span>
<span class="line"><span style="color: #D8DEE9FF">LogonType              11</span></span>
<span class="line"><span style="color: #D8DEE9FF">LogonProcessName       User32</span></span>
<span class="line"><span style="color: #D8DEE9FF">AuthenticationPackage  Negotiate</span></span></code></pre></div>



<p>The key here is <strong>LogonType 11</strong>: <strong>CachedInteractive</strong>, which means the user logged in using credentials that were stored locally, and no one bothered to check in with the domain controller.</p>



<p></p>



<p></p>



<h3 class="wp-block-heading" id="the-root-cause-cached-credentials-arent-playing-fair">The Root Cause: Cached Credentials Aren’t Playing Fair</h3>



<p>After some research (and maybe a few cups of coffee), we discovered this is actually <strong>default behavior</strong> for elevated tasks. Cached credentials aren&#8217;t updated when you run an elevated task with a different account. Even if you change the admin&#8217;s group membership in the domain, the cached data on the machine remains, letting the old password through.</p>



<p></p>



<h3 class="wp-block-heading" id="the-fix-taming-the-cached-credentials">The Fix: Taming the Cached Credentials</h3>



<p>Luckily, we found a solution! By tweaking the registry, we can force Windows to verify credentials with the domain controller before allowing elevation. Here’s the magic PowerShell script we used:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#39404f;color:#c8d0e0">PowerShell</span><span role="button" tabindex="0" data-code="# Define the path to the registry subkey
$registryPath = &quot;HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System&quot;

# Check if the registry path exists, if not create it
if (-not (Test-Path $registryPath)) {
    New-Item -Path $registryPath
}

# Define the new registry key and set its value
$registryKey = &quot;InteractiveLogonFirst&quot;
New-ItemProperty -Path $registryPath -Name $registryKey -PropertyType DWORD -Value 1 -Force

# Confirm the value has been set
$registryValue = Get-ItemProperty -Path $registryPath -Name $registryKey
Write-Host &quot;Registry key '$registryKey' set to value:&quot; $registryValue.$registryKey" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #616E88"># Define the path to the registry subkey</span></span>
<span class="line"><span style="color: #81A1C1">$</span><span style="color: #D8DEE9">registryPath</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System</span><span style="color: #ECEFF4">&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #616E88"># Check if the registry path exists, if not create it</span></span>
<span class="line"><span style="color: #81A1C1">if</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">(</span><span style="color: #81A1C1">-not</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">(</span><span style="color: #88C0D0">Test-Path</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">$</span><span style="color: #D8DEE9">registryPath</span><span style="color: #ECEFF4">))</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">{</span></span>
<span class="line"><span style="color: #D8DEE9FF">    </span><span style="color: #88C0D0">New-Item</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF">Path </span><span style="color: #81A1C1">$</span><span style="color: #D8DEE9">registryPath</span></span>
<span class="line"><span style="color: #ECEFF4">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #616E88"># Define the new registry key and set its value</span></span>
<span class="line"><span style="color: #81A1C1">$</span><span style="color: #D8DEE9">registryKey</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">InteractiveLogonFirst</span><span style="color: #ECEFF4">&quot;</span></span>
<span class="line"><span style="color: #88C0D0">New-ItemProperty</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF">Path </span><span style="color: #81A1C1">$</span><span style="color: #D8DEE9">registryPath</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF">Name </span><span style="color: #81A1C1">$</span><span style="color: #D8DEE9">registryKey</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF">PropertyType DWORD </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF">Value </span><span style="color: #B48EAD">1</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF">Force</span></span>
<span class="line"></span>
<span class="line"><span style="color: #616E88"># Confirm the value has been set</span></span>
<span class="line"><span style="color: #81A1C1">$</span><span style="color: #D8DEE9">registryValue</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9FF"> </span><span style="color: #88C0D0">Get-ItemProperty</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF">Path </span><span style="color: #81A1C1">$</span><span style="color: #D8DEE9">registryPath</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF">Name </span><span style="color: #81A1C1">$</span><span style="color: #D8DEE9">registryKey</span></span>
<span class="line"><span style="color: #88C0D0">Write-Host</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">Registry key &#39;</span><span style="color: #81A1C1">$</span><span style="color: #D8DEE9">registryKey</span><span style="color: #A3BE8C">&#39; set to value:</span><span style="color: #ECEFF4">&quot;</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">$</span><span style="color: #D8DEE9">registryValue</span><span style="color: #D8DEE9FF">.</span><span style="color: #81A1C1">$</span><span style="color: #D8DEE9">registryKey</span></span></code></pre></div>



<p></p>



<h4 class="wp-block-heading" id="whats-happening-here">What’s Happening Here?</h4>



<ul class="wp-block-list">
<li><strong>$registryPath</strong>: Points to the right spot in the Windows registry.</li>



<li><strong>Test-Path</strong>: Ensures the registry path exists before creating anything.</li>



<li><strong>New-ItemProperty</strong>: Creates a new DWORD (32-bit) registry value called <code>InteractiveLogonFirst</code> and sets it to <strong>1</strong>.</li>



<li><strong>Get-ItemProperty</strong>: Checks that the value was set correctly.</li>
</ul>



<p>Setting <code>InteractiveLogonFirst</code> to 1 forces Windows to verify with the domain controller for any elevation task. If the domain controller is unavailable? Well, cached credentials are still used.</p>



<p></p>



<h3 class="wp-block-heading" id="but-wait-the-admin-workaround">But Wait… The “Admin Workaround”</h3>



<p>Administrators are clever creatures. If they disconnect from the network, they can still use cached credentials. You can counter this by configuring the machine to not use cached credentials at all. But do you really want to go to war with your admins? Remember, they are the <strong>ADMINISTRATORS</strong>.</p>



<p></p>



<h3 class="wp-block-heading" id="final-thoughts-and-call-to-action">Final Thoughts and Call to Action</h3>



<p>This tweak could save you from a lot of headaches if you&#8217;re rotating admin passwords and want to avoid yesterday&#8217;s ghosts popping up where they’re not wanted. It’s a simple registry fix, but it can have a big impact on how credentials are handled in your environment.</p>



<p>Have you run into any strange caching behaviors in your environment? Or maybe you&#8217;ve got an interesting workaround? Share your experiences in the comments below! </p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>Stay secure, stay smart, and don’t let yesterday’s passwords haunt you!</strong></p>



<p></p>



<h3 class="wp-block-heading" id="r">References</h3>



<ul class="wp-block-list">
<li><a href="https://learn.microsoft.com/en-us/troubleshoot/windows-server/active-directory/outdated-cached-credentials-used-when-run-elevated-task" target="_blank" rel="noopener noreferrer nofollow">Default behavior for cached credentials</a></li>



<li><a href="https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4625" target="_blank" rel="noopener noreferrer nofollow">Logon types</a></li>
</ul>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://masterinprogress.com/refreshcachedcredentials/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
